Package IshmaelLocator
Class IshLocProcess
java.lang.Object
PamguardMVC.PamProcess
IshmaelLocator.IshLocProcess
- All Implemented Interfaces:
PamObserver
,ProcessAnnotator
,SpectrogramMarkObserver
- Direct Known Subclasses:
IshLocHyperbProcess
,IshLocPairProcess
This is a superclass to a "real" localization class. It gathers the
necessary data (samples, phone positions, etc.) for the subclass, then calls
calcData(), which the subclass should define. Current children include
IshLocPairProcess and IshLocHyperbProcess.
- Author:
- Dave Mellinger
-
Field Summary
Fields inherited from interface Spectrogram.SpectrogramMarkObserver
MOUSE_DOWN, MOUSE_DRAG, MOUSE_UP
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canMark()
void
Called from the PamControlled unit when a PamControlled unit is removed from the model.void
doLocalisation
(long startSam, long durationSam, double f0, double f1, PamRawDataBlock daqBlock) Do the localization for the call delineated by startMsec, durationMsec, f0, and f1.An IshLocProcess has one input stream (data block).abstract String
getName()
void
newData
(PamObservable o, PamDataUnit arg1) Data for localization can arrive from either an upstream data source or from the user drawing a box on the spectrogram.void
pamStart()
Called for each process to tell it to start (may not be necessary for processes which are listening for data anyway).void
pamStop()
Stops the process.void
Called for each process before any of them receive the PamStart commandvoid
setParentDataBlock
(PamDataBlock newParentDataBlock) Set a parent data block with the default options of rethreading if setvoid
void
called for every process once the systemmodel has been created.boolean
spectrogramNotification
(SpectrogramDisplay display, MouseEvent mouseEvent, int downUp, int channel, long startMsec, long durationMsec, double f0, double f1, TDGraphFX tdDisplay) Data for localization can arrive from either an upstream data source or from the user drawing a box on the spectrogram.Methods inherited from class PamguardMVC.PamProcess
absMillisecondsToSamples, absSamplesToMilliseconds, addData, addMultiPlexDataBlock, addOutputDataBlock, changedThreading, clearOldData, createAnnotations, dumpBufferStatus, flushDataBlockBuffers, getAncestorDataBlock, getAnnotation, getChainPosition, getCompatibleDataUnits, getCpuPercent, getFrequencyRange, getLastSourceNotificationObject, getLastSourceNotificationType, getMuiltiplexDataBlock, getNumAnnotations, getNumMuiltiplexDataBlocks, getNumOutputDataBlocks, getObserverName, getObserverObject, getOfflineData, getOfflineData, getOutputDataBlock, getOutputDataBlocks, getPamControlledUnit, getParentDataBlock, getParentDataBlocks, getParentProcess, getProcessCheck, getProcessName, getRawSourceDataBlock, getRawSourceDataBlock, getRequiredDataHistory, getSampleRate, getSourceDataBlock, getSourceProcess, hasOutputDatablock, isCanMultiThread, isExternalProcess, isMultiplex, makePamProcess, masterClockUpdate, noteNewSettings, notifyModelChanged, prepareProcessOK, processNewBuoyData, receiveSourceNotification, relMillisecondsToSamples, relSamplesToMilliseconds, removeAllDataBlocks, removeAllMultiPlexDataBlocks, removeMultiPlexDataBlock, removeObservable, removeOutputDatablock, resetDataBlocks, saveViewerData, setCanMultiThread, setExternalProcess, setMultiplex, setParentDataBlock, setProcessCheck, setProcessName, setSampleRate, toString, updateData
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface Spectrogram.SpectrogramMarkObserver
getMarkName
-
Field Details
-
inputData
-
-
Constructor Details
-
IshLocProcess
-
-
Method Details
-
getName
-
setParentDataBlock
Description copied from class:PamProcess
Set a parent data block with the default options of rethreading if set- Overrides:
setParentDataBlock
in classPamProcess
- Parameters:
newParentDataBlock
- source data block.
-
getInputDataBlock
An IshLocProcess has one input stream (data block). Return it, or null if it's not available. -
setupProcess
public void setupProcess()Description copied from class:PamProcess
called for every process once the systemmodel has been created. this is a good time to check out and find input data blocks and similar tasks.- Overrides:
setupProcess
in classPamProcess
-
destroyProcess
public void destroyProcess()Description copied from class:PamProcess
Called from the PamControlled unit when a PamControlled unit is removed from the model. Offers an opportunity to disconnect individual processed from the rest of the model. May be necessary to override to clean up some processes.- Overrides:
destroyProcess
in classPamProcess
-
setupConnections
public void setupConnections() -
spectrogramNotification
public boolean spectrogramNotification(SpectrogramDisplay display, MouseEvent mouseEvent, int downUp, int channel, long startMsec, long durationMsec, double f0, double f1, TDGraphFX tdDisplay) Data for localization can arrive from either an upstream data source or from the user drawing a box on the spectrogram. This is the routine for capturing user box-drawing.- Specified by:
spectrogramNotification
in interfaceSpectrogramMarkObserver
- Parameters:
display
- spectrogram display; ignoreddownUp
- mouse action (only MOUSE_UP events are used)channel
- which channel was drawn on; ignoredstartMsec
- in absolute msec (since 1970)durationMsec
-f0
- ,f1 frequency range of the selectionf1
- max frequency in Hz- Returns:
- true if the user has popped up a menu or done something that should stop the sending display from carrying out any further actions on this mouse action (put in place to prevent the spectrogram menu popping up when editing marks in viewer mode).
-
canMark
public boolean canMark()- Specified by:
canMark
in interfaceSpectrogramMarkObserver
- Returns:
- whether or not it's possible to use this marker. Generally false when in viewer mode, but maynot always be.
-
newData
Data for localization can arrive from either an upstream data source or from the user drawing a box on the spectrogram. This is the routine for data arriving from upstream.- Overrides:
newData
in classPamProcess
- Parameters:
arg1
- data arriving from upstream; type must be PamDataUnit (or a subclass of it)
-
doLocalisation
public void doLocalisation(long startSam, long durationSam, double f0, double f1, PamRawDataBlock daqBlock) Do the localization for the call delineated by startMsec, durationMsec, f0, and f1.- Parameters:
startSam
- in absolute msec (since 1970)durationSam
-f0
- ,f1 frequency range to use in calculating the locdaqProcess
- the PamProcess producing raw audio data, needed for getting hydrophone info
-
getMarkObserverName
- Specified by:
getMarkObserverName
in interfaceSpectrogramMarkObserver
- Returns:
- Name for the mark observer to show in the spectrogram dialog.
-
pamStart
public void pamStart()Description copied from class:PamProcess
Called for each process to tell it to start (may not be necessary for processes which are listening for data anyway).- Specified by:
pamStart
in classPamProcess
-
pamStop
public void pamStop()Description copied from class:PamProcess
Stops the process.- Specified by:
pamStop
in classPamProcess
-
prepareProcess
public void prepareProcess()Description copied from class:PamProcess
Called for each process before any of them receive the PamStart command- Overrides:
prepareProcess
in classPamProcess
-