whistleClassifier
Class WhistleFragment

java.lang.Object
  extended by whistleClassifier.WhistleFragment
All Implemented Interfaces:
WhistleContour

public class WhistleFragment
extends java.lang.Object
implements WhistleContour


Field Summary
private static int FITORDER
           
private  double[] freqsHz
           
private  int negInflections
           
private  int posInflections
           
private  double[] shapeFit
           
private  double[] timesSeconds
           
 
Constructor Summary
WhistleFragment(double[] times, double[] freqs)
          Constructor to create a fragment using all of the data passed
WhistleFragment(double[] times, double[] freqs, int start, int fragLen)
          Constructor to automatically extract the fragment from a longer segment.
WhistleFragment(WhistleContour whistleContour, int start, int fragLen)
          Constructor to automatically extract a fragment from a longer contour.
 
Method Summary
private  void createFragment(double[] times, double[] freqs, int start, int fragLen)
           
 double[] getFreqsHz()
           
 double[] getTimesInSeconds()
           
private  void setTimeZero()
          Reference all the times in the fragment to zero
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

timesSeconds

private double[] timesSeconds

freqsHz

private double[] freqsHz

FITORDER

private static int FITORDER

shapeFit

private double[] shapeFit

negInflections

private int negInflections

posInflections

private int posInflections
Constructor Detail

WhistleFragment

public WhistleFragment(double[] times,
                       double[] freqs)
Constructor to create a fragment using all of the data passed

Parameters:
times - times (seconds)
freqs - frequencies (Hz)

WhistleFragment

public WhistleFragment(double[] times,
                       double[] freqs,
                       int start,
                       int fragLen)
Constructor to automatically extract the fragment from a longer segment.

Parameters:
times - segment times (seconds)
freqs - segment frequencies (Hz)
start - first bin in segment to take
fragLen - length of fragment to create

WhistleFragment

public WhistleFragment(WhistleContour whistleContour,
                       int start,
                       int fragLen)
Constructor to automatically extract a fragment from a longer contour.

Parameters:
whistleContour - contour to extract fragment from
start - start position in contour
fragLen - length of fragment
Method Detail

createFragment

private void createFragment(double[] times,
                            double[] freqs,
                            int start,
                            int fragLen)

setTimeZero

private void setTimeZero()
Reference all the times in the fragment to zero


getFreqsHz

public double[] getFreqsHz()
Specified by:
getFreqsHz in interface WhistleContour

getTimesInSeconds

public double[] getTimesInSeconds()
Specified by:
getTimesInSeconds in interface WhistleContour