Class TOADBaseAlgorithm

java.lang.Object
group3dlocaliser.algorithm.LocaliserAlgorithm3D
group3dlocaliser.algorithm.toadbase.TOADBaseAlgorithm
All Implemented Interfaces:
LocaliserModel<PamDataUnit>
Direct Known Subclasses:
HyperbolicLocaliser, TOADGridSearch, ToadMCMCLocaliser, ToadSimplexLocaliser

public abstract class TOADBaseAlgorithm extends LocaliserAlgorithm3D
  • Constructor Details

  • Method Details

    • prepare

      public boolean prepare(PamDataBlock sourceBlock)
      Specified by:
      prepare in class LocaliserAlgorithm3D
    • runModel

      public AbstractLocalisation runModel(PamDataUnit groupDataUnit, DetectionGroupOptions detectionGroupOptions, boolean addLoc)
      Description copied from interface: LocaliserModel
      Run the localisation model. Once completed the results are added to the AbstractLoclaisation class of the input PamDataUnit. Note that algorithms may run on a separate thread. Once processing has finished the notifyModelFinished function is called with a progress of 1;.
      Parameters:
      groupDataUnit - the pamDataUnit. This can be a super unit if multiple detections are required.
      addLoc - automatically add the localisation result to the data unit, replacing it's current localisation info.
    • checkTOADInformation

      public boolean checkTOADInformation(TOADInformation toadInformation)
      Check the TOAD information is 'OK', i.e. cross correlations are reasonable, etc.
      Parameters:
      toadInformation -
      Returns:
      true if enough channels have a reasonable TOAD measurement.
    • countUsableTOADS

      public int countUsableTOADS(TOADInformation toadInformation)
      Count the number of TOAD values which have a correlation coefficient or 'score' >= the minimum.
      Parameters:
      toadInformation - TOAD information
      Returns:
      number of scores >= the minimum.
    • countUsableTOADS

      public int countUsableTOADS(TOADInformation toadInformation, double minScore)
      Count the number of TOAD values which have a correlation coefficient or 'score' >= the minimum.
      Parameters:
      toadInformation - TOAD information
      minScore - Minimum correlation score.
      Returns:
      number of scores >= the minimum.
    • calcLogLikelihood

      public LogLikelihoodData calcLogLikelihood(SnapshotGeometry geometry, TOADInformation toadInformation, double[] position)
      Calculate a Log Likelihood value for the given geometry and set of delays.
      Parameters:
      geometry -
      delays -
      Returns:
    • calcChi2

      public Chi2Data calcChi2(SnapshotGeometry geometry, TOADInformation toadInformation, double[] position)
      Calculate a chi2 value for the given geometry and set of delays.
      Parameters:
      geometry - array geometry.
      position - Position relative to the array centre
      delays - time delays
      Returns:
    • estimateEllipticalError

      public EllipticalError estimateEllipticalError(SnapshotGeometry geometry, TOADInformation toadInformation, double[] position)
      Estimate an elliptical error with axes aligned with largest error coordinate based on the curvature of the Chi2 / likelihood surface.
      Parameters:
      geometry - Array geometry
      toadInformation - Current TOAD information
      position - Array geometry
      Returns:
      Elliptical error
    • estimateCartesianError

      public SimpleError estimateCartesianError(SnapshotGeometry geometry, TOADInformation toadInformation, double[] position)
      Estimate the error in Cartesian coordinates based on the curvature of the Chi2 / likelihood surface.
      Parameters:
      geometry - Array geometry
      toadInformation - Current TOAD information
      position - Array geometry
      Returns:
      Cartesian error
    • processTOADs

      public abstract AbstractLocalisation processTOADs(PamDataUnit groupDataUnit, SnapshotGeometry geometry, TOADInformation toadInformation)
      Process the list of delays, which are in seconds
      Parameters:
      groupDataUnit - group data unit.
      geometry -
      toadInformation - all information on delays, errors, channels, etc.
      Returns:
    • getSourceSettingsPane

      public ToadManagedSettingsPane<Serializable> getSourceSettingsPane(Window parent, PamDataBlock<?> detectionSource)
      Description copied from class: LocaliserAlgorithm3D
      Get a source settings pane. This will be inserted into the dialog beneath where the detection source and algorithm have been selected.
      Can be null if the algorithm / data source have no source settings. May also change should there be any changes to the data source type.
      Overrides:
      getSourceSettingsPane in class LocaliserAlgorithm3D
      Returns:
      Pane to insert into the main 3D localiser dialog.
    • canLocalise

      public boolean canLocalise(PamDataBlock pamDataBlock)
      Specified by:
      canLocalise in class LocaliserAlgorithm3D
      Returns:
      true if this algorithm can process this type of data.
    • getToadBaseParams

      public TOADBaseParams getToadBaseParams()
      Returns:
      the toadBaseParams