Package clickDetector

Class ClickTemplate

java.lang.Object
clickDetector.ClickTemplate

public class ClickTemplate extends Object
Class for storing click templates.

Note that the average log spectrum must also be saved as this cannot be back calculated from the average spectrum (see ClickSpectrumTemplateEditDialog class for details)

Author:
Jamie Macaulay
  • Constructor Details

  • Method Details

    • getN

      public int getN()
    • getSampleRate

      public float getSampleRate()
    • getSpecies

      public String getSpecies()
    • getSpectrum

      public ArrayList<Double> getSpectrum()
    • getSpectrumLog

      public ArrayList<Double> getSpectrumLog()
    • getSpectrumStd

      public ArrayList<Double> getSpectrumStd()
    • getSpectrumStdLog

      public ArrayList<Double> getSpectrumStdLog()
    • setN

      public void setN(int N)
    • setSampleRate

      public void setSampleRate(float sampleRate)
    • setSpecies

      public void setSpecies(String species)
    • setSpectrum

      public void setSpectrum(ArrayList<Double> fft)
    • setSpectrumLog

      public void setSpectrumLog(ArrayList<Double> fftLog)
    • setSpectrum

      public void setSpectrum(double[] spectrum1D)
    • setSpectrumLog

      public void setSpectrumLog(double[] spectrum1D)
    • setSpectrumStd

      public void setSpectrumStd(ArrayList<Double> std)
    • setSpectrumStdLog

      public void setSpectrumStdLog(ArrayList<Double> stdLog)
    • setSpectrumStd

      public void setSpectrumStd(double[] spectrum1D)
    • setSpectrumStdLog

      public void setSpectrumStdLog(double[] spectrum1DLog)
    • setColor

      public void setColor(Color fftColour)
    • getColour

      public Color getColour()
    • writeClickTemptoFile

      public static void writeClickTemptoFile(ClickTemplate clickTemp, ArrayList<ArrayList<Double>> allFFT, String outputFileForAnalysedResults)

      Writes a .csv with mean fft and standard deviation of each fft bin. First line==mean fft, second line==standard deviation FFT,third line==mean 10*log(FFT), fourth line==standard deviation 10*log(FFT). All lines have the following format.

      Format:

      0=Samplerate.

      1=Possible species.

      2=Color1=red.

      3=Color2=blue.

      4=Color3=green.

      5-N=fft result (usually 256 bins long).

      Parameters:
      clickTemp - - a click template.
      allFFT - - an arraylist of fft's which made up the click spectrum.
      outputFileForAnalysedResults - . File name for the output.csv file
    • writeClickTemptoFile

      public static void writeClickTemptoFile(ClickTemplate clickTemp, String outputFileForAnalysedResults)
    • getCSVResults

      public static ClickTemplate getCSVResults(String filename)
      Get a click template. Format 0=Samplerate 1=Possible species 2=Color1=red 3=Color2=blue 4=Color3=green 5-N=fft results
      Parameters:
      filename -
      Returns:
      ClickTemplate from file