Class RawSpectrumPlot

java.lang.Object
detectionPlotFX.plots.SpectrumPlot<PamDataUnit>
detectionPlotFX.rawDDPlot.RawSpectrumPlot
All Implemented Interfaces:
DetectionPlot<PamDataUnit>

public class RawSpectrumPlot extends SpectrumPlot<PamDataUnit>
Implementation of the spectrum plot for any data unit that impleements raw data holder.
Author:
Jamie Macaulay
  • Constructor Details

  • Method Details

    • setupAxis

      public void setupAxis(PamDataUnit data, double sR, DetectionPlotProjector plotProjector)
      Description copied from interface: DetectionPlot
      Setup the axis. This is called before paintPlot. Ensures axis are correct values
      Specified by:
      setupAxis in interface DetectionPlot<PamDataUnit>
      Overrides:
      setupAxis in class SpectrumPlot<PamDataUnit>
      Parameters:
      data - - the data of every channel. e.g. might be a waveform with each point representing a sample.
      sR - - the sample rate. Primarily used to convert bins into time values.
    • getPowerSpectrum

      public double[][] getPowerSpectrum(PamDataUnit newClick, int min, int max)
      Description copied from class: SpectrumPlot
      Get the power spectrum for the detection
      Specified by:
      getPowerSpectrum in class SpectrumPlot<PamDataUnit>
      Parameters:
      newClick - - the pamDetection
      Returns:
      the power spectrum for each channel.
    • getCepstrum

      public double[][] getCepstrum(PamDataUnit newClick, int min, int max)
      Description copied from class: SpectrumPlot
      Get the cepstrum for the detection
      Specified by:
      getCepstrum in class SpectrumPlot<PamDataUnit>
      Parameters:
      newClick - - the pamDetection
      Returns:
      the cepstrum for each channel.
    • paintPlot

      public void paintPlot(PamDataUnit data, javafx.scene.canvas.GraphicsContext gc, javafx.scene.shape.Rectangle rectangle, DetectionPlotProjector projector, int flag)
      Description copied from interface: DetectionPlot
      Plot the relevent data from a detection.
      Specified by:
      paintPlot in interface DetectionPlot<PamDataUnit>
      Overrides:
      paintPlot in class SpectrumPlot<PamDataUnit>
      Parameters:
      data - - the data of every channel. e.g. might be a waveform with each point representing a sample.
      gc - - the graphics handle to draw on.