Class IshLocProcess

java.lang.Object
PamguardMVC.PamProcess
IshmaelLocator.IshLocProcess
All Implemented Interfaces:
PamObserver, ProcessAnnotator, SpectrogramMarkObserver
Direct Known Subclasses:
IshLocHyperbProcess, IshLocPairProcess

public abstract class IshLocProcess extends PamProcess implements SpectrogramMarkObserver
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 Details Link icon

    • inputData Link icon

      public Complex[] inputData
  • Constructor Details Link icon

    • IshLocProcess Link icon

      public IshLocProcess(IshLocControl ishLocControl)
  • Method Details Link icon

    • getName Link icon

      public abstract String getName()
    • setParentDataBlock Link icon

      public void setParentDataBlock(PamDataBlock newParentDataBlock)
      Description copied from class: PamProcess
      Set a parent data block with the default options of rethreading if set
      Overrides:
      setParentDataBlock in class PamProcess
      Parameters:
      newParentDataBlock - source data block.
    • getInputDataBlock Link icon

      public PamDataBlock getInputDataBlock()
      An IshLocProcess has one input stream (data block). Return it, or null if it's not available.
    • setupProcess Link icon

      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 class PamProcess
    • destroyProcess Link icon

      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 class PamProcess
    • setupConnections Link icon

      public void setupConnections()
    • spectrogramNotification Link icon

      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 interface SpectrogramMarkObserver
      Parameters:
      display - spectrogram display; ignored
      downUp - mouse action (only MOUSE_UP events are used)
      channel - which channel was drawn on; ignored
      startMsec - in absolute msec (since 1970)
      durationMsec -
      f0 - ,f1 frequency range of the selection
      f1 - 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 Link icon

      public boolean canMark()
      Specified by:
      canMark in interface SpectrogramMarkObserver
      Returns:
      whether or not it's possible to use this marker. Generally false when in viewer mode, but maynot always be.
    • newData Link icon

      public 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. This is the routine for data arriving from upstream.
      Overrides:
      newData in class PamProcess
      Parameters:
      arg1 - data arriving from upstream; type must be PamDataUnit (or a subclass of it)
    • doLocalisation Link icon

      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 loc
      daqProcess - the PamProcess producing raw audio data, needed for getting hydrophone info
    • getMarkObserverName Link icon

      public String getMarkObserverName()
      Specified by:
      getMarkObserverName in interface SpectrogramMarkObserver
      Returns:
      Name for the mark observer to show in the spectrogram dialog.
    • pamStart Link icon

      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 class PamProcess
    • pamStop Link icon

      public void pamStop()
      Description copied from class: PamProcess
      Stops the process.
      Specified by:
      pamStop in class PamProcess
    • prepareProcess Link icon

      public void prepareProcess()
      Description copied from class: PamProcess
      Called for each process before any of them receive the PamStart command
      Overrides:
      prepareProcess in class PamProcess