Package rocca

Class RoccaContourDataBlock


public class RoccaContourDataBlock extends PamDataBlock<RoccaContourDataUnit>
Author:
Michael Oswald
  • Constructor Details

    • RoccaContourDataBlock

      public RoccaContourDataBlock(PamProcess parentProcess, int channelMap)
      Constructor. Set the natural lifetime to the maximum integer value possible so that the data is never deleted unless the
  • Method Details

    • calculateStatistics

      public void calculateStatistics()
      Once the Datablock is filled, this routine will calculate the statistics of the contour.
    • calculateClickStats

      public void calculateClickStats()
      Calculate the statistics specific to a click detection
    • createContourStatsHeader

      public String createContourStatsHeader()
      Creates the header line for the contour status summary file. Note that the individual species tree votes do not get labelled, as this may change if the user switches classifiers at some point. Instead, the species list is included at the end of each row 2014/09/09 added Encounter ID, Cruise ID, Data Provider and Known Species 2015/10/10 serialVersionUID=23 removed spaces and parenthesis from headers serialVersionUID=24 2016/08/10 added lat/long info
      Returns:
      the header string
    • createContourStatsString

      public String createContourStatsString()
      Method to create a string containing the current contour statistics. Also included in the string are the filename, detection number and encounter classification. This method sets the filename equal to the raw data source, and the detection count to 0
      Returns:
      a String containing the contour statistics
    • createContourStatsString

      public String createContourStatsString(String clipFile, int detectionCount)
      Method to create a string containing the current contour statistics. Also included in the string are the filename, date/time, detection count and encounter classification. This method sets the filename equal to the passed String clipFile.
      Parameters:
      clipFile - String to be saved in the 'filename' column
      detectionCount - integer specifying the detection count (the count starts at 1 when the first detection is captured)
      Returns:
      a String containing the contour statistics
    • createContourStatsString

      public String createContourStatsString(String clipFile, int detectionCount, String sightNum)
      Method to create a string containing the current contour statistics. Also included in the string are the filename, date/time, detection count and encounter classification. This method sets the filename equal to the passed String clipFile. 2015/10/10 serialVersionUID=23 removed spaces from columns serialVersionUID=24 2016/08/10 added lat/long info
      Parameters:
      clipFile - String to be saved in the 'filename' column
      detectionCount - integer specifying the detection count (the count starts at 1 when the first detection is captured)
      Returns:
      a String containing the contour statistics
    • getWavFilename

      public File getWavFilename()
      Get the filename of the original wav file
      Returns:
    • getClassifiedAs

      public String getClassifiedAs()
    • setClassifiedAs

      public void setClassifiedAs(String classifiedAs)
    • isStatsRun

      public boolean isStatsRun()
    • setStatsRun

      public void setStatsRun(boolean statsRun)
    • getTreeVotes

      public double[] getTreeVotes()
    • setTreeVotes

      public void setTreeVotes(double[] treeVotes)
    • getFirstUnitWithWhistle

      public int getFirstUnitWithWhistle()
    • setFirstUnitWithWhistle

      public void setFirstUnitWithWhistle(int firstUnitWithWhistle)
    • getLastUnitWithWhistle

      public int getLastUnitWithWhistle()
    • setLastUnitWithWhistle

      public void setLastUnitWithWhistle(int lastUnitWithWhistle)
    • getKeyNames

      public ArrayList<String> getKeyNames()
    • getContour

    • getRCS

      public RoccaContourStats getRCS()
    • getClickDetection

      public ClickDetection getClickDetection()
      Returns:
      the clickDetection
    • setClickDetection

      public void setClickDetection(ClickDetection clickDetection)
      Sets the clickDetection parameter. Also creates a RoccaContourDataUnit object and loads it with basic information from the clickDetection. This prevents errors later in the code where it is assumed that the RoccaContourDataBlock contains at least one data unit.
      Parameters:
      clickDetection - the clickDetection to set
    • getClickNoise

      public ClickDetection getClickNoise()
      Returns:
      the clickNoise
    • setClickNoise

      public void setClickNoise(ClickDetection clickNoise)
      Parameters:
      clickNoise - the clickNoise to set
    • getStartTime

      public double getStartTime()
      Returns:
      the startTime serialVersionUID=15 2014/11/12
    • setStartTime

      public void setStartTime(double startTime)
      Parameters:
      startTime - the startTime to set serialVersionUID=15 2014/11/12
    • getDuration

      public double getDuration()
      Returns:
      the duration serialVersionUID=22 2015/06/13
    • setDuration

      public void setDuration(double duration)
      Parameters:
      duration - the duration to set serialVersionUID=22 2015/06/13
    • isThisAWhistle

      public boolean isThisAWhistle()
      Test whether this data block is a whistle or not serialVersionUID=24 2016/08/10
      Returns:
      true=whistle, false=click
    • setAsAWhistle

      public void setAsAWhistle(boolean thisIsAWhistle)
      Sets whether this data block is a whistle or not. True=whistle, false=click serialVersionUID=24 2016/08/10
      Parameters:
      thisIsAWhistle -
    • getLatitude

      public double getLatitude()
    • setLatitude

      public void setLatitude(double latitude)
    • getLongitude

      public double getLongitude()
    • setLongitude

      public void setLongitude(double longitude)
    • setWavInfo

      public void setWavInfo(double[][] wavInfo)
    • getWavInfo

      public double[][] getWavInfo()