Package detectionPlotFX.plots
Class WignerPlot<D extends PamDataUnit>
java.lang.Object
detectionPlotFX.plots.WignerPlot<D>
- Type Parameters:
D
- the specific pamDetection type.
- All Implemented Interfaces:
DetectionPlot<D>
- Direct Known Subclasses:
MTClassifierPane.WignerTemplateData
,RawWignerPlot
,WhistleWignerPlot
Plots a Wigner transform of a detection.
- Author:
- Jamie Macaulay
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
Runs a Wigner plot in separate thread. -
Field Summary
Fields inherited from interface detectionPlotFX.layout.DetectionPlot
SCROLLPANE_DRAW, STANDARD_DRAW
-
Constructor Summary
ConstructorDescriptionWignerPlot
(DetectionPlotDisplay detectionPlotDisplay) Constructor for the waveform plot. -
Method Summary
Modifier and TypeMethodDescriptionvoid
checWignerRecalc
(WignerPlotParams wignerParameters) Check whether the wigner plot needs recalculated with a new settings.double[][]
conditionWaveform
(double[] clickWave) Perform pre-conditioning of waveform.getName()
Get the name of the plot e.g.boolean
javafx.scene.layout.Pane
Get the settings pane for the particular plot.abstract double[]
getWaveform
(D pamDetection, int chan) Get the waveforms from a PamDetectionGet the parameters for the wigner plot.Get the settings pane.double[]
Get the current waveform used to calculate the wigner plot.boolean
Indicates whether the wigner image needs recalculated.void
paintPlot
(D pamDetection, javafx.scene.canvas.GraphicsContext gc, javafx.scene.shape.Rectangle rectangle, DetectionPlotProjector projector, int flag) Plot the relevent data from a detection.void
Repaint the current data unit.void
setNeedsRecalc
(boolean needsRecalc) Set the needs recalc flag.void
setupAxis
(D pamDetection, double sR, DetectionPlotProjector projector) Called to set up the axis correctly before the plot is createdvoid
Setup the plot.void
setWignerParameters
(WignerPlotParams params) void
setWignerWaveform
(double[] wignerWaveform) Set th current wigner waveform.
-
Constructor Details
-
WignerPlot
Constructor for the waveform plot.
-
-
Method Details
-
getName
Description copied from interface:DetectionPlot
Get the name of the plot e.g. waveform, spectrum etc.- Specified by:
getName
in interfaceDetectionPlot<D extends PamDataUnit>
-
setupPlot
public void setupPlot()Description copied from interface:DetectionPlot
Setup the plot. This may, for example, involve changing axis etc.- Specified by:
setupPlot
in interfaceDetectionPlot<D extends PamDataUnit>
-
setupAxis
Called to set up the axis correctly before the plot is created- Specified by:
setupAxis
in interfaceDetectionPlot<D extends PamDataUnit>
- Parameters:
pamDetection
- - the data of every channel. e.g. might be a waveform with each point representing a sample.sR
- - the sample rate.waveform
- - the waveforms of every channel. Each point represents one sample.pamAxis
- - all the axis of the graph. this is in order TOP, RIGHT, BOTTOM, LEFT.
-
getWaveform
Get the waveforms from a PamDetection- Parameters:
pamDetection
- the detectionchan
- - the single channel to plot (not the channel bitmap)- Returns:
- the waveform for each channel
-
paintPlot
public void paintPlot(D pamDetection, 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 interfaceDetectionPlot<D extends PamDataUnit>
- Parameters:
pamDetection
- - the data of every channel. e.g. might be a waveform with each point representing a sample.gc
- - the graphics handle to draw on.
-
conditionWaveform
public double[][] conditionWaveform(double[] clickWave) Perform pre-conditioning of waveform. Returns both the waveform and bin limits if the waveform has been shortened.- Returns:
- conditioned waveform in first row and bin limits in second row.
-
getSettingsPane
public javafx.scene.layout.Pane getSettingsPane()Description copied from interface:DetectionPlot
Get the settings pane for the particular plot. This sits on the right hand side of the display inside a hiding pane.- Specified by:
getSettingsPane
in interfaceDetectionPlot<D extends PamDataUnit>
- Returns:
- a pane with controls for changing settings in a node.
-
getWignerParameters
Get the parameters for the wigner plot.- Returns:
-
reDrawLastUnit
public void reDrawLastUnit()Repaint the current data unit. -
setWignerParameters
-
checWignerRecalc
Check whether the wigner plot needs recalculated with a new settings.- Parameters:
wignerParameters
-
-
isNeedsRecalc
public boolean isNeedsRecalc()Indicates whether the wigner image needs recalculated.- Returns:
-
setNeedsRecalc
public void setNeedsRecalc(boolean needsRecalc) Set the needs recalc flag. This will force a recalculation of wigner data.- Parameters:
needsRecalc
-
-
getNeedsRecalc
public boolean getNeedsRecalc() -
getWignerSettingsPane
Get the settings pane. This pane changes wigner plot specific settings.- Returns:
- the Wigner settings pane
-
getWignerWaveform
public double[] getWignerWaveform()Get the current waveform used to calculate the wigner plot.- Returns:
- - the current wigner waveform
-
setWignerWaveform
public void setWignerWaveform(double[] wignerWaveform) Set th current wigner waveform.- Parameters:
wignerWaveform
- - the current wigner waveform.
-
getDetectionPlotDisplay
-