casa
$Rev:20696$
|
Basic table access class for the TablePlot (tableplot) tool. More...
#include <CrossPlot.h>
Public Member Functions | |
CrossPlot () | |
Constructor. | |
~CrossPlot () | |
Destructor. | |
Int | setPlotRange (Double &xmin, Double &xmax, Double &ymin, Double &ymax, Bool showflags, Bool columnsxaxis, String flagversion, Int averagenrows, String connectpoints=String("tablerow"), Bool doscalingcorrection=True, String multicolour=String("none"), Bool honourxflags=False) |
This function is called from TPPlotter::setPlotRange(). | |
Bool | selectedPoint (Int np, Int nr) |
Return True or False = if a point is selected. | |
Int | createXTENS (Vector< String > &datastr) |
Create TableExprNodes from input TAQL strings. | |
Double | getXVal (Int pnum, Int col) |
Query the internal structures for X,Y data and Flag values These functions are called by TPPlotter. | |
Double | getYVal (Int pnum, Int col) |
Query the internal structures for Y data values. | |
Bool | getYFlags (Int pnum, Int col) |
Query the internal structures for flags. | |
Int | getNumRows () |
Query for the number of points per plot. | |
Int | getNumPlots () |
Query for the number of plots. | |
Private Member Functions | |
Int | getXData (TPConvertBase *conv, Bool dummyread=False) |
Read X data from the table. | |
Int | computeXAverages (Int averagenrows, Int remrows) |
Average the channel numbers ! not really used..\. | |
void | CrossPlotError (String msg) |
Private Attributes | |
Vector< Vector< Double > > | xpdrow_p |
These hold indices for cell rows, and cell cols. | |
Vector< Vector< Double > > | xpdcol_p |
Vector< Int > | ncellrows_p |
Vector< Int > | ncellcols_p |
Bool | columnsxaxis_p |
Bool | plotperrow_p |
Bool | honourxflags_p |
Static Private Attributes | |
static String | clname |
Basic table access class for the TablePlot (tableplot) tool.
Public interface
CrossPlot is a class derived from BasePlot, and allows plots in a direction transposed to that allowed by BasePlot.
Class CrossPlot holds the same data structures as does BasePlot, but provides a transposed view of arraycolumn data to the TPPlotter class which queries it to accumulate data to plot.
// Instantiate BasePlot CrossPlot<T> CP(); CP.Init(Table&); CP.CreateTENS(Vector<String> &TaQL); CP.GetData(); ... followed by TPPlotter 'setPlotRange' and 'plotData' calls
This class was written to allow transposed plots for array-column data, where the 'x-axis' of the plot is by default the column index of the arraycolumn. For a measurement set type table, this corresponds to plotting data as a function of spectral channel. It is derived from BasePlot because the data read/write/storage mechanisms and data structures are identical to that in BasePlot. The only difference is the view presented to the TPPlotter class. The TPPlotter class does not distinguish between BasePlot and CrossPlot. In a future version, Histogram plots will also be implemented in this manner.
Definition at line 110 of file CrossPlot.h.
casa::CrossPlot::CrossPlot | ( | ) |
Constructor.
casa::CrossPlot::~CrossPlot | ( | ) |
Destructor.
Average the channel numbers ! not really used..\.
Reimplemented from casa::BasePlot.
Create TableExprNodes from input TAQL strings.
Reimplemented from casa::BasePlot.
void casa::CrossPlot::CrossPlotError | ( | String | msg | ) | [private] |
Int casa::CrossPlot::getNumPlots | ( | ) | [virtual] |
Query for the number of plots.
Reimplemented from casa::BasePlot.
Int casa::CrossPlot::getNumRows | ( | ) | [virtual] |
Query for the number of points per plot.
Reimplemented from casa::BasePlot.
Int casa::CrossPlot::getXData | ( | TPConvertBase * | conv, |
Bool | dummyread = False |
||
) | [private, virtual] |
Read X data from the table.
For CrossPlots this corresponds to filling the X data arrays with channel indices. For 'tid' set to row 0, the x storage arrays are created and filled. Subsequent calls to getXData are ineffectual, since the accessed channel indices can be filled in after reading only the first row of the table, but are required to preserve the format used in BasePlot which reads a value from each row in the table. Int getXData(TableExprId &tid);
Reimplemented from casa::BasePlot.
Query the internal structures for X,Y data and Flag values These functions are called by TPPlotter.
Reimplemented from casa::BasePlot.
Query the internal structures for flags.
Reimplemented from casa::BasePlot.
Query the internal structures for Y data values.
Reimplemented from casa::BasePlot.
Return True or False = if a point is selected.
Reimplemented from casa::BasePlot.
Int casa::CrossPlot::setPlotRange | ( | Double & | xmin, |
Double & | xmax, | ||
Double & | ymin, | ||
Double & | ymax, | ||
Bool | showflags, | ||
Bool | columnsxaxis, | ||
String | flagversion, | ||
Int | averagenrows, | ||
String | connectpoints = String("tablerow") , |
||
Bool | doscalingcorrection = True , |
||
String | multicolour = String("none") , |
||
Bool | honourxflags = False |
||
) | [virtual] |
This function is called from TPPlotter::setPlotRange().
Set plot range (all plots for this table). Scan the data storage arrays to compute data ranges. In the case of overlay plots (due to Array TpDouble TaQL results), combined data ranges for this tables data are computed. This function requires that all stored data arrays be traversed. This can get expensive for large number of data points. It is assumed that for such a large number of data points, plotting could broken down into chunks using an iteration axis.
Reimplemented from casa::BasePlot.
String casa::CrossPlot::clname [static, private] |
Reimplemented from casa::BasePlot.
Definition at line 221 of file CrossPlot.h.
Bool casa::CrossPlot::columnsxaxis_p [private] |
Definition at line 172 of file CrossPlot.h.
Bool casa::CrossPlot::honourxflags_p [private] |
Definition at line 174 of file CrossPlot.h.
Vector<Int> casa::CrossPlot::ncellcols_p [private] |
Definition at line 171 of file CrossPlot.h.
Vector<Int> casa::CrossPlot::ncellrows_p [private] |
Definition at line 171 of file CrossPlot.h.
Bool casa::CrossPlot::plotperrow_p [private] |
Definition at line 173 of file CrossPlot.h.
Vector<Vector<Double> > casa::CrossPlot::xpdcol_p [private] |
Definition at line 170 of file CrossPlot.h.
Vector<Vector<Double> > casa::CrossPlot::xpdrow_p [private] |
These hold indices for cell rows, and cell cols.
i.e. enumerated values from TaQL indices. i.e. for [1:2,4:8], xpdrow => [0,1] xpdcol => [3,4,5,6,7]
Definition at line 170 of file CrossPlot.h.