casa  $Rev:20696$
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
casa::CrossPlot Class Reference

Basic table access class for the TablePlot (tableplot) tool. More...

#include <CrossPlot.h>

Inheritance diagram for casa::CrossPlot:
casa::BasePlot

List of all members.

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< Intncellrows_p
Vector< Intncellcols_p
Bool columnsxaxis_p
Bool plotperrow_p
Bool honourxflags_p

Static Private Attributes

static String clname

Detailed Description

Basic table access class for the TablePlot (tableplot) tool.

Intended use:

Public interface

Prerequisite

Etymology

CrossPlot is a class derived from BasePlot, and allows plots in a direction transposed to that allowed by BasePlot.

Synopsis

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.

Example

    // Instantiate BasePlot 
    CrossPlot<T> CP();
    CP.Init(Table&);
    CP.CreateTENS(Vector<String> &TaQL);
    CP.GetData();
    ... followed by TPPlotter 'setPlotRange' and 'plotData' calls

Motivation

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.

Template Type Argument Requirements (T)

Thrown Exceptions

Definition at line 110 of file CrossPlot.h.


Constructor & Destructor Documentation

casa::CrossPlot::CrossPlot ( )

Constructor.

casa::CrossPlot::~CrossPlot ( )

Destructor.


Member Function Documentation

Int casa::CrossPlot::computeXAverages ( Int  averagenrows,
Int  remrows 
) [private, virtual]

Average the channel numbers ! not really used..\.

Reimplemented from casa::BasePlot.

Int casa::CrossPlot::createXTENS ( Vector< String > &  datastr) [virtual]

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.

Double casa::CrossPlot::getXVal ( Int  pnum,
Int  col 
) [virtual]

Query the internal structures for X,Y data and Flag values These functions are called by TPPlotter.

Reimplemented from casa::BasePlot.

Bool casa::CrossPlot::getYFlags ( Int  pnum,
Int  col 
) [virtual]

Query the internal structures for flags.

Reimplemented from casa::BasePlot.

Double casa::CrossPlot::getYVal ( Int  pnum,
Int  col 
) [virtual]

Query the internal structures for Y data values.

Reimplemented from casa::BasePlot.

Bool casa::CrossPlot::selectedPoint ( Int  np,
Int  nr 
) [virtual]

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.


Member Data Documentation

String casa::CrossPlot::clname [static, private]

Reimplemented from casa::BasePlot.

Definition at line 221 of file CrossPlot.h.

Definition at line 172 of file CrossPlot.h.

Definition at line 174 of file CrossPlot.h.

Definition at line 171 of file CrossPlot.h.

Definition at line 171 of file CrossPlot.h.

Definition at line 173 of file CrossPlot.h.

Definition at line 170 of file CrossPlot.h.

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.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines