Class TargetMotionLocaliser<T extends PamDataUnit>


public class TargetMotionLocaliser<T extends PamDataUnit> extends AbstractLocaliser
  • Field Details

    • currentEventIndex

      public int currentEventIndex
      Database index of current event. Not the same as the eventListIndex

      Use index instead of reference since the data are often reloaded, so references become out of date.

  • Constructor Details

  • Method Details

    • getLocaliserName

      public String getLocaliserName()
      Specified by:
      getLocaliserName in class AbstractLocaliser
      Returns:
      a name for the localiser for use in dialogs, menus, etc.
    • addDetectorMenuItems

      public int addDetectorMenuItems(Frame parentFrame, JMenu menu)
    • moveToTargetMotionTab

      public void moveToTargetMotionTab()
    • clearResults

      public void clearResults()
    • getResults

      public ArrayList<TargetMotionResult> getResults()
    • addResults

      public void addResults(TargetMotionResult[] newResults)
    • getBestResultIndex

      public int getBestResultIndex()
      Returns:
      the bestResultIndex
    • setBestResultIndex

      public void setBestResultIndex(int bestResultIndex)
      Parameters:
      bestResultIndex - the bestResultIndex to set
    • getModels

      public ArrayList<TargetMotionModel> getModels()
    • findModelByName

      public TargetMotionModel findModelByName(String modelName, boolean shortLength)
      Find a model by it's name. If shortLength is true, then it will accept a match in which the modelName is only partly included in the full model name. This is required since the names in the database may have been truncated and are therefore incomplete.
      Parameters:
      modelName - model name to search for.
      shortLength - allow short model names (if truncated in the database)
      Returns:
      reference to a TM model, or null.
    • localiseEventList

      public void localiseEventList(ArrayList<TargetMotionInformation> targetMotionInfo, TargetMotionModel[] modelList, boolean isSupervised)
    • getCurrentEventIndex

      public int getCurrentEventIndex()
    • runModels

      public TargetMotionResult[] runModels(TargetMotionInformation targetMotionInformation, TargetMotionModel[] modelList)
    • selectBestResult

      public int selectBestResult(TargetMotionResult[] results)
      Work out which is the best result based on Chi2 and AIC.
      Parameters:
      results - array of results to compare.
      Returns:
      index of best result, or -1 if there are no results or none with AIC or Chi2 values.
    • getTargetMotionControl

      public TargetMotionControl getTargetMotionControl()
    • getCurrentRunState

      public int getCurrentRunState()
    • localiseDataUnit

      public boolean localiseDataUnit(PamDataUnit dataUnit)
      Description copied from class: AbstractLocaliser
      Localise a data unit.

      Localisation results will be added to the data unit itself in the AbstractLocalisation field.

      Specified by:
      localiseDataUnit in class AbstractLocaliser
      Parameters:
      dataUnit - data unit to localise
      Returns:
      true if localisation was successful.