Class ExampleClickTrains

java.lang.Object
clickTrainDetector.clickTrainAlgorithms.mht.test.ExampleClickTrains

public class ExampleClickTrains extends Object
Simulates some clicks to test the MHT algorithm on.
Author:
Jamie Macaulay
  • Field Details

    • masterPath

      public static String masterPath
      Default path to the simulated clicks.
  • Constructor Details

    • ExampleClickTrains

      public ExampleClickTrains()
    • ExampleClickTrains

      public ExampleClickTrains(int type)
      The simulated clicks to load.
      Parameters:
      type -
  • Method Details

    • getSimClicksFile

      public File getSimClicksFile(ExampleClickTrains.SimClickImport type)
      Get a .mat file containing simulated clicks.
      Parameters:
      type - - the file type
      Returns:
      the file.
    • importSimClicks

      public SimpleClickDataBlock importSimClicks(File file)
      Import clicks from an MHT file.
      Parameters:
      file - - the .mat file to import.
      Returns:
      the datablock containg simple clicks.
    • importSimClicks

      Convenience function to import simulated click trains.
      Parameters:
      type - - flag for the simulated clicks to import.
      Returns:
      a data block containing the simulated clicks.
    • simClicks1

      public void simClicks1()
      Simulate a set of clicks without importing any clicks.
    • simClickTrack

      public void simClickTrack(double ICI, double amplitude, double start, double end, double randTimeFactor, double randAmpFactor)
      Simulates a single tracks and adds to the data block after clearing previous data.
      Parameters:
      ICI - - the inter click interval
      amplitude - - the amplitude in dB
      start - - the start in seconds
      end - - the end in seconds
      randTimeFactor - - the random error to add to the time
      randAmpFactor - - the random error to add to the amplitude.
    • generateClickSet

      public ArrayList<SimpleClick> generateClickSet(double ICI, double amplitude, double start, double end, double randTimeFactor, double randAmpFactor)
      Generate a set of clicks.
      Parameters:
      ICI - - the inter click interval
      amplitude - - the amplitude in dB
      start - - the start in seconds
      end - - the end in seconds
      randTimeFactor - - the random error to add to the time
      randAmpFactor - - the random error to add to the amplitude.
      Returns:
      the time series of simple clicks.
    • getSimClicks

      public SimpleClickDataBlock getSimClicks()
      Get the last laoded set of simulated clicks.
      Returns:
      data block containing the simulated clicks.