casa
$Rev:20696$
|
#include <PlotMSCacheIndexer.h>
Public Member Functions | |
PlotMSCacheIndexer (PlotMSCache *plotmscache) | |
Constructor which takes parent PlotMS. | |
~PlotMSCacheIndexer () | |
Destructor. | |
void | setUpPlot (PMS::Axis xAxis, PMS::Axis yAxis) |
Set up indexing for the plot. | |
Int | nPoints () const |
Report the total number of points currently arranged for plotting (TBD: this is incorrect unless ALL cache spaces are full!!) | |
Matrix< Int > & | chunkShapes () |
CAche shapes: | |
Bool | indexerReady () const |
Return if the indexer is ready (setUpPlot has been run) | |
void | getRanges (Double &minX, Double &maxX, Double &minY, Double &maxY) |
Get X and Y limits TBD: flagged/unflagged. | |
Double | getX (Int i) |
Get single values for x-y plotting by global index. | |
Double | getY (Int i) |
void | getXY (Int i, Double &x, Double &y) |
Bool | getFlagMask (Int i) |
Double | getX (Int ch, Int irel) |
Get single values by chunk and relative index (implicitly requires that get?FromCache_ method pointers are set) | |
Double | getY (Int ch, Int irel) |
PlotLogMessage * | locateRange (const Vector< PlotRegion > ®ions) |
Locate datum nearest to specified x,y (amp vs freq hardwired versions) | |
PlotLogMessage * | flagRange (const PlotMSFlagging &flagging, const Vector< PlotRegion > ®ions, Bool flag=True) |
void | reportMeta (Double x, Double y, stringstream &ss) |
Report meta info for current value of currChunk_/irel_. | |
void | flagInCache (const PlotMSFlagging &flagging, Bool flag) |
Set flags in the cache. | |
void | setPlotMask (Int chunk) |
Sets the plot mask for a single chunk. | |
void | deleteMask () |
Clean up the plot mask. | |
void | flagInVisSet (const PlotMSFlagging &flagging, Vector< Int > &chunks, Vector< Int > &relids, Bool flag) |
Set flags in the MS. | |
Static Public Attributes | |
static const String | CLASS_NAME |
Convenient access to class name. | |
Private Member Functions | |
PlotMSCacheIndexer (const PlotMSCacheIndexer &mc) | |
Forbid copy for now. | |
void | getAxesMask (PMS::Axis axis, Vector< Bool > &axismask) |
void | setMethod (PlotMSCacheMemPtr &getmethod, PMS::Axis axis) |
void | setIndexer (IndexerMethodPtr &indexmethod, PMS::Axis axis) |
void | setCollapser (CollapseMethodPtr &collmethod, PMS::Axis axis) |
Int | getIndex0000 (Int ch, Int irel) |
Directly implemented index calculators (generic index methods point to one of these depending upon axis choice) | |
Int | getIndex1000 (Int ch, Int irel) |
Int | getIndex0100 (Int ch, Int irel) |
Int | getIndex0010 (Int ch, Int irel) |
Int | getIndex0110 (Int ch, Int irel) |
Int | getIndex1110 (Int ch, Int irel) |
Int | getIndex0001 (Int ch, Int irel) |
void | collapseMask0000 (Int ch, Array< Bool > &collmask) |
TBD: corr/bsln-dep (e.g., WEIGHT) inline Int getIndex1010(Int ch,Int irel) { return. | |
void | collapseMask1000 (Int ch, Array< Bool > &collmask) |
void | collapseMask0100 (Int ch, Array< Bool > &collmask) |
void | collapseMask0010 (Int ch, Array< Bool > &collmask) |
void | collapseMask0110 (Int ch, Array< Bool > &collmask) |
void | collapseMask1110 (Int ch, Array< Bool > &collmask) |
void | collapseMask0001 (Int ch, Array< Bool > &collmask) |
Int | nChunk () const |
void collapseMask1010(Int ch,Array<Bool>& collmask); | |
Double | refTime () |
Report the reference time for this cache (in seconds) | |
void | setChunk (Int i) |
Set currChunk_ according to a supplied index. | |
void | computeRanges () |
Computes the X and Y limits for the currently set axes. | |
unsigned int | nPointsForAxis (PMS::Axis axis) const |
Returns the number of points loaded for the given axis or 0 if not loaded. | |
void | logInfo (const String &method, const String &message) |
Convenience methods that call log() with the given method name and the appropriate event type. | |
void | logDebug (const String &method, const String &message) |
void | logWarn (const String &method, const String &message) |
void | logError (const String &method, const String &message) |
void | log (const String &method, const String &message, int eventType) |
Logs the given message from the given method name as the given event type (see PlotLogger). | |
Private Attributes | |
PlotMSCache * | plotmscache_ |
Private data. | |
PlotMSCacheMemPtr | getXFromCache_ |
Pointers to methods for axis flexibility. | |
PlotMSCacheMemPtr | getYFromCache_ |
IndexerMethodPtr | XIndexer_ |
IndexerMethodPtr | YIndexer_ |
CollapseMethodPtr | collapseXMask_ |
CollapseMethodPtr | collapseYMask_ |
Int | currChunk_ |
The in-focus chunk and relative index offset. | |
Int | irel_ |
Int | lasti_ |
Vector< Int > | nPoints_ |
The cumulative running total of points. | |
PMS::Axis | currentX_ |
Current setup/state. | |
PMS::Axis | currentY_ |
bool | indexerReady_ |
Vector< Bool > | netAxesMask_ |
Axes mask. | |
Vector< Int > | icorrmax_ |
Indexing parameters. | |
Vector< Int > | ichanmax_ |
Vector< Int > | ibslnmax_ |
Vector< Int > | idatamax_ |
Vector< Int > | nperchan_ |
Vector< Int > | nperbsln_ |
Vector< Int > | nperant_ |
Vector< Int > | ichanbslnmax_ |
Vector< Int > | iantmax_ |
PtrBlock< Array< Bool > * > | plmask_ |
collapsed flag mask for plotting | |
Double | xmin_ |
Nominal axes limits. | |
Double | ymin_ |
Double | xflmin_ |
Double | yflmin_ |
Double | xmax_ |
Double | ymax_ |
Double | xflmax_ |
Double | yflmax_ |
Definition at line 47 of file PlotMSCacheIndexer.h.
casa::PlotMSCacheIndexer::PlotMSCacheIndexer | ( | PlotMSCache * | plotmscache | ) |
Constructor which takes parent PlotMS.
casa::PlotMSCacheIndexer::~PlotMSCacheIndexer | ( | ) |
Destructor.
casa::PlotMSCacheIndexer::PlotMSCacheIndexer | ( | const PlotMSCacheIndexer & | mc | ) | [private] |
Forbid copy for now.
CAche shapes:
Definition at line 67 of file PlotMSCacheIndexer.h.
References casa::PlotMSCache::chunkShapes(), and plotmscache_.
TBD: corr/bsln-dep (e.g., WEIGHT) inline Int getIndex1010(Int ch,Int irel) { return.
Generate collapsed versions of the plmask
void casa::PlotMSCacheIndexer::computeRanges | ( | ) | [private] |
Computes the X and Y limits for the currently set axes.
In the future we may want to cache ALL ranges for all loaded values to avoid recomputation.
void casa::PlotMSCacheIndexer::deleteMask | ( | ) |
Clean up the plot mask.
void casa::PlotMSCacheIndexer::flagInCache | ( | const PlotMSFlagging & | flagging, |
Bool | flag | ||
) |
Set flags in the cache.
void casa::PlotMSCacheIndexer::flagInVisSet | ( | const PlotMSFlagging & | flagging, |
Vector< Int > & | chunks, | ||
Vector< Int > & | relids, | ||
Bool | flag | ||
) |
Set flags in the MS.
PlotLogMessage* casa::PlotMSCacheIndexer::flagRange | ( | const PlotMSFlagging & | flagging, |
const Vector< PlotRegion > & | regions, | ||
Bool | flag = True |
||
) |
Directly implemented index calculators (generic index methods point to one of these depending upon axis choice)
Definition at line 122 of file PlotMSCacheIndexer.h.
Definition at line 128 of file PlotMSCacheIndexer.h.
Definition at line 125 of file PlotMSCacheIndexer.h.
Definition at line 124 of file PlotMSCacheIndexer.h.
Definition at line 126 of file PlotMSCacheIndexer.h.
References ichanbslnmax_, and nperchan_.
Definition at line 123 of file PlotMSCacheIndexer.h.
References icorrmax_.
Definition at line 127 of file PlotMSCacheIndexer.h.
References idatamax_.
void casa::PlotMSCacheIndexer::getRanges | ( | Double & | minX, |
Double & | maxX, | ||
Double & | minY, | ||
Double & | maxY | ||
) |
Get X and Y limits TBD: flagged/unflagged.
Get single values by chunk and relative index (implicitly requires that get?FromCache_ method pointers are set)
Definition at line 84 of file PlotMSCacheIndexer.h.
References getXFromCache_.
Definition at line 85 of file PlotMSCacheIndexer.h.
References getYFromCache_.
Bool casa::PlotMSCacheIndexer::indexerReady | ( | ) | const [inline] |
Return if the indexer is ready (setUpPlot has been run)
Definition at line 70 of file PlotMSCacheIndexer.h.
References indexerReady_.
PlotLogMessage* casa::PlotMSCacheIndexer::locateRange | ( | const Vector< PlotRegion > & | regions | ) |
Locate datum nearest to specified x,y (amp vs freq hardwired versions)
void casa::PlotMSCacheIndexer::log | ( | const String & | method, |
const String & | message, | ||
int | eventType | ||
) | [private] |
Logs the given message from the given method name as the given event type (see PlotLogger).
Referenced by logDebug(), logError(), logInfo(), and logWarn().
void casa::PlotMSCacheIndexer::logDebug | ( | const String & | method, |
const String & | message | ||
) | [inline, private] |
Definition at line 163 of file PlotMSCacheIndexer.h.
References log(), and casa::PlotLogger::MSG_DEBUG.
void casa::PlotMSCacheIndexer::logError | ( | const String & | method, |
const String & | message | ||
) | [inline, private] |
Definition at line 167 of file PlotMSCacheIndexer.h.
References log(), and casa::PlotLogger::MSG_ERROR.
void casa::PlotMSCacheIndexer::logInfo | ( | const String & | method, |
const String & | message | ||
) | [inline, private] |
Convenience methods that call log() with the given method name and the appropriate event type.
Definition at line 161 of file PlotMSCacheIndexer.h.
References log(), and casa::PlotLogger::MSG_INFO.
void casa::PlotMSCacheIndexer::logWarn | ( | const String & | method, |
const String & | message | ||
) | [inline, private] |
Definition at line 165 of file PlotMSCacheIndexer.h.
References log(), and casa::PlotLogger::MSG_WARN.
Int casa::PlotMSCacheIndexer::nChunk | ( | ) | const [inline, private] |
void collapseMask1010(Int ch,Array<Bool>& collmask);
Report the number of chunks
Definition at line 143 of file PlotMSCacheIndexer.h.
References casa::PlotMSCache::nChunk(), and plotmscache_.
Referenced by nPoints().
Int casa::PlotMSCacheIndexer::nPoints | ( | ) | const [inline] |
Report the total number of points currently arranged for plotting (TBD: this is incorrect unless ALL cache spaces are full!!)
Definition at line 64 of file PlotMSCacheIndexer.h.
References nChunk(), casa::ArrayBase::nelements(), and nPoints_.
unsigned int casa::PlotMSCacheIndexer::nPointsForAxis | ( | PMS::Axis | axis | ) | const [private] |
Returns the number of points loaded for the given axis or 0 if not loaded.
Double casa::PlotMSCacheIndexer::refTime | ( | ) | [inline, private] |
Report the reference time for this cache (in seconds)
Definition at line 146 of file PlotMSCacheIndexer.h.
References plotmscache_, and casa::PlotMSCache::refTime().
Report meta info for current value of currChunk_/irel_.
void casa::PlotMSCacheIndexer::setChunk | ( | Int | i | ) | [private] |
Set currChunk_ according to a supplied index.
void casa::PlotMSCacheIndexer::setCollapser | ( | CollapseMethodPtr & | collmethod, |
PMS::Axis | axis | ||
) | [private] |
void casa::PlotMSCacheIndexer::setIndexer | ( | IndexerMethodPtr & | indexmethod, |
PMS::Axis | axis | ||
) | [private] |
void casa::PlotMSCacheIndexer::setMethod | ( | PlotMSCacheMemPtr & | getmethod, |
PMS::Axis | axis | ||
) | [private] |
void casa::PlotMSCacheIndexer::setPlotMask | ( | Int | chunk | ) |
Sets the plot mask for a single chunk.
void casa::PlotMSCacheIndexer::setUpPlot | ( | PMS::Axis | xAxis, |
PMS::Axis | yAxis | ||
) |
Set up indexing for the plot.
const String casa::PlotMSCacheIndexer::CLASS_NAME [static] |
Convenient access to class name.
Definition at line 51 of file PlotMSCacheIndexer.h.
Definition at line 183 of file PlotMSCacheIndexer.h.
Definition at line 183 of file PlotMSCacheIndexer.h.
Int casa::PlotMSCacheIndexer::currChunk_ [private] |
The in-focus chunk and relative index offset.
Definition at line 186 of file PlotMSCacheIndexer.h.
PMS::Axis casa::PlotMSCacheIndexer::currentX_ [private] |
Current setup/state.
Definition at line 192 of file PlotMSCacheIndexer.h.
PMS::Axis casa::PlotMSCacheIndexer::currentY_ [private] |
Definition at line 192 of file PlotMSCacheIndexer.h.
Pointers to methods for axis flexibility.
Definition at line 181 of file PlotMSCacheIndexer.h.
Referenced by getX().
Definition at line 181 of file PlotMSCacheIndexer.h.
Referenced by getY().
Vector<Int> casa::PlotMSCacheIndexer::iantmax_ [private] |
Definition at line 202 of file PlotMSCacheIndexer.h.
Referenced by getIndex0001().
Vector<Int> casa::PlotMSCacheIndexer::ibslnmax_ [private] |
Definition at line 199 of file PlotMSCacheIndexer.h.
Referenced by getIndex0010().
Vector<Int> casa::PlotMSCacheIndexer::ichanbslnmax_ [private] |
Definition at line 201 of file PlotMSCacheIndexer.h.
Referenced by getIndex0110().
Vector<Int> casa::PlotMSCacheIndexer::ichanmax_ [private] |
Definition at line 199 of file PlotMSCacheIndexer.h.
Referenced by getIndex0100().
Vector<Int> casa::PlotMSCacheIndexer::icorrmax_ [private] |
Indexing parameters.
Definition at line 199 of file PlotMSCacheIndexer.h.
Referenced by getIndex1000().
Vector<Int> casa::PlotMSCacheIndexer::idatamax_ [private] |
Definition at line 199 of file PlotMSCacheIndexer.h.
Referenced by getIndex1110().
bool casa::PlotMSCacheIndexer::indexerReady_ [private] |
Definition at line 193 of file PlotMSCacheIndexer.h.
Referenced by indexerReady().
Int casa::PlotMSCacheIndexer::irel_ [private] |
Definition at line 186 of file PlotMSCacheIndexer.h.
Int casa::PlotMSCacheIndexer::lasti_ [private] |
Definition at line 186 of file PlotMSCacheIndexer.h.
Vector<Bool> casa::PlotMSCacheIndexer::netAxesMask_ [private] |
Axes mask.
Definition at line 196 of file PlotMSCacheIndexer.h.
Vector<Int> casa::PlotMSCacheIndexer::nperant_ [private] |
Definition at line 200 of file PlotMSCacheIndexer.h.
Referenced by getIndex0001().
Vector<Int> casa::PlotMSCacheIndexer::nperbsln_ [private] |
Definition at line 200 of file PlotMSCacheIndexer.h.
Referenced by getIndex0010().
Vector<Int> casa::PlotMSCacheIndexer::nperchan_ [private] |
Definition at line 200 of file PlotMSCacheIndexer.h.
Referenced by getIndex0100(), and getIndex0110().
Vector<Int> casa::PlotMSCacheIndexer::nPoints_ [private] |
The cumulative running total of points.
Definition at line 189 of file PlotMSCacheIndexer.h.
Referenced by nPoints().
PtrBlock<Array<Bool>*> casa::PlotMSCacheIndexer::plmask_ [private] |
collapsed flag mask for plotting
Definition at line 205 of file PlotMSCacheIndexer.h.
Private data.
Parent plotms.
Definition at line 178 of file PlotMSCacheIndexer.h.
Referenced by chunkShapes(), nChunk(), and refTime().
Double casa::PlotMSCacheIndexer::xflmax_ [private] |
Definition at line 208 of file PlotMSCacheIndexer.h.
Double casa::PlotMSCacheIndexer::xflmin_ [private] |
Definition at line 208 of file PlotMSCacheIndexer.h.
Definition at line 182 of file PlotMSCacheIndexer.h.
Double casa::PlotMSCacheIndexer::xmax_ [private] |
Definition at line 208 of file PlotMSCacheIndexer.h.
Double casa::PlotMSCacheIndexer::xmin_ [private] |
Nominal axes limits.
Definition at line 208 of file PlotMSCacheIndexer.h.
Double casa::PlotMSCacheIndexer::yflmax_ [private] |
Definition at line 208 of file PlotMSCacheIndexer.h.
Double casa::PlotMSCacheIndexer::yflmin_ [private] |
Definition at line 208 of file PlotMSCacheIndexer.h.
Definition at line 182 of file PlotMSCacheIndexer.h.
Double casa::PlotMSCacheIndexer::ymax_ [private] |
Definition at line 208 of file PlotMSCacheIndexer.h.
Double casa::PlotMSCacheIndexer::ymin_ [private] |
Definition at line 208 of file PlotMSCacheIndexer.h.