uk.ac.starlink.splat.iface
Class StatsRange

java.lang.Object
  extended by uk.ac.starlink.splat.iface.XGraphicsRange
      extended by uk.ac.starlink.splat.iface.StatsRange
All Implemented Interfaces:
EventListener, uk.ac.starlink.diva.FigureListener

public class StatsRange
extends XGraphicsRange

StatsRange extends the XGraphicsRange class to add four or five new rows that contain statistics values for the spectrum being drawn over (the current spectrum of a PlotControl), under the supervision of a StatsFrame instance.


Field Summary
 
Fields inherited from class uk.ac.starlink.splat.iface.XGraphicsRange
colour, constrain, drawActions, figure, figureListener, listener, model, pane, plot
 
Constructor Summary
StatsRange(StatsFrame statsFrame, StatsRangesModel model, Color colour, boolean constrain, double[] range)
          Create a range interactively or non-interactively.
 
Method Summary
 void figureChanged(uk.ac.starlink.diva.FigureChangedEvent e)
          Sent when the figure is changed (i.e.
 void figureCreated(uk.ac.starlink.diva.FigureChangedEvent e)
          Sent when the figure is created.
 double getFlux()
          Get the flux estimate of the spectrum in this range.
 double getMax()
          Get maximum value of spectrum in this range.
 double getMean()
          Get mean value of the spectrum in this range.
 double getMin()
          Get minimum value of spectrum in this range.
 double getStandardDeviation()
          Get standard deviation of the spectrum in this range.
 double getTSYS()
          Get the TSYS value.
protected  void setControl(PlotControl control)
          Set the PlotControl instance to use.
 void updateStats()
          Make the current statistics match the current range for the current spectrum shown in the assocated plot.
 
Methods inherited from class uk.ac.starlink.splat.iface.XGraphicsRange
createFigure, createFromRange, delete, figureRemoved, getRange, isFigure, registerFigure, setPlot, setRange, startInteraction, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StatsRange

public StatsRange(StatsFrame statsFrame,
                  StatsRangesModel model,
                  Color colour,
                  boolean constrain,
                  double[] range)
Create a range interactively or non-interactively.

Parameters:
statsRange - StatsFrame with a PlotControl that is to display the range.
model - StatsRangesModel model that arranges to have the properties of the range displayed (may be null).
colour - the colour of any figures.
constrain - whether figures are fixed to move only in X and have initial size of the full Y dimension of plot.
range - a pair of doubles containing the range (in physical coordinates) to be used. Set null if the figure is to be created interactively.
Method Detail

setControl

protected void setControl(PlotControl control)
Set the PlotControl instance to use.

Parameters:
control - The PlotControl instance.

updateStats

public void updateStats()
Make the current statistics match the current range for the current spectrum shown in the assocated plot.


getMean

public double getMean()
Get mean value of the spectrum in this range.


getStandardDeviation

public double getStandardDeviation()
Get standard deviation of the spectrum in this range.


getMin

public double getMin()
Get minimum value of spectrum in this range.


getMax

public double getMax()
Get maximum value of spectrum in this range.


getFlux

public double getFlux()
Get the flux estimate of the spectrum in this range.


getTSYS

public double getTSYS()
Get the TSYS value.


figureCreated

public void figureCreated(uk.ac.starlink.diva.FigureChangedEvent e)
Sent when the figure is created.

Specified by:
figureCreated in interface uk.ac.starlink.diva.FigureListener
Overrides:
figureCreated in class XGraphicsRange

figureChanged

public void figureChanged(uk.ac.starlink.diva.FigureChangedEvent e)
Sent when the figure is changed (i.e. moved or transformed).

Specified by:
figureChanged in interface uk.ac.starlink.diva.FigureListener
Overrides:
figureChanged in class XGraphicsRange


Copyright © 2018 Central Laboratory of the Research Councils. All Rights Reserved.