casa  $Rev:20696$
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Friends
casa::PlotMSCache Class Reference

#include <PlotMSCache.h>

Inheritance diagram for casa::PlotMSCache:
casa::PlotCalCache

List of all members.

Public Types

enum  Type {
  MS,
  CAL
}
 Varieties of cache. More...

Public Member Functions

 PlotMSCache (PlotMSApp *parent)
 Constructor which takes parent PlotMS.
virtual ~PlotMSCache ()
 Destructor.
PlotMSCache::Type cacheType ()
 Identify myself.
Int nChunk () const
 Report the number of chunks.
Matrix< Int > & chunkShapes ()
 Report the data shapes.
Int nPoints () const
 Report the total number of points currently arranged for plotting (TBD: this is incorrect unless ALL cache spaces are full!!)
Double refTime ()
 Report the reference time for this cache (in seconds)
void clear ()
 Clears the cache of all stored values.
virtual void load (const vector< PMS::Axis > &axes, const vector< PMS::DataColumn > &data, const String &msname, const PlotMSSelection &selection, const PlotMSAveraging &averaging, const PlotMSTransformations &transformations, PlotMSCacheThread *thread=NULL)
 Loads the cache for the given axes and data columns.
void load (PMS::Axis xAxis, PMS::Axis yAxis, PMS::DataColumn xData, PMS::DataColumn yData, const String &msname, const PlotMSSelection &selection, const PlotMSAveraging &averaging, const PlotMSTransformations &transformations, PlotMSCacheThread *thread=NULL)
 Convenience method for loading x and y axes.
void release (const vector< PMS::Axis > &axes)
 Releases the given axes from the cache.
void setUpCacheForPlot (PMS::Axis xAxis, PMS::Axis yAxis)
 Set up indexing for the plot (amp vs freq hardwired version)
void getAxesMask (PMS::Axis axis, Vector< Bool > &axismask)
bool cacheReady () const
 Returns whether cache is filled.
bool readyForPlotting () const
 Returns whether the cache is filled AND ready to return plotting data via the get methods or not.
void getRanges (Double &minX, Double &maxX, Double &minY, Double &maxY)
 Get X and Y limits (amp vs freq hardwired version)
Double getX (Int i)
 Get single values for x-y plotting.
Double getY (Int i)
void getXY (Int i, Double &x, Double &y)
Double get (PMS::Axis axis)
Bool getFlagMask (Int i)
Array< Bool > & flag (Int chunk)
 Access to flags per chunk.
Double getScan (Int chnk, Int irel)
 Axis-specific generic gets.
Double getField (Int chnk, Int irel)
Double getTime (Int chnk, Int irel)
Double getTimeIntr (Int chnk, Int irel)
Double getSpw (Int chnk, Int irel)
Double getFreq (Int chnk, Int irel)
Double getVel (Int chnk, Int irel)
Double getChan (Int chnk, Int irel)
Double getCorr (Int chnk, Int irel)
Double getAnt1 (Int chnk, Int irel)
Double getAnt2 (Int chnk, Int irel)
Double getBsln (Int chnk, Int irel)
Double getUVDist (Int chnk, Int irel)
Double getUVDistL (Int chnk, Int irel)
Double getU (Int chnk, Int irel)
Double getV (Int chnk, Int irel)
Double getW (Int chnk, Int irel)
Double getAmp (Int chnk, Int irel)
Double getPha (Int chnk, Int irel)
Double getReal (Int chnk, Int irel)
Double getImag (Int chnk, Int irel)
Double getFlag (Int chnk, Int irel)
Double getFlagRow (Int chnk, Int irel)
Double getRow (Int chnk, Int irel)
Double getAz0 (Int chnk, Int irel)
 These are array-global (one value per chunk)
Double getEl0 (Int chnk, Int irel)
Double getHA0 (Int chnk, Int irel)
Double getPA0 (Int chnk, Int irel)
Double getAntenna (Int chnk, Int irel)
 These are antenna-based.
Double getAz (Int chnk, Int irel)
Double getEl (Int chnk, Int irel)
Double getParAng (Int chnk, Int irel)
Double getScan ()
 Axis-specific gets.
Double getField ()
Double getTime ()
Double getTimeIntr ()
Double getSpw ()
Double getFreq ()
Double getVel ()
Double getChan ()
Double getCorr ()
Double getAnt1 ()
Double getAnt2 ()
Double getBsln ()
Double getUVDist ()
Double getUVDistL ()
Double getU ()
Double getV ()
Double getW ()
Double getAmp ()
Double getPha ()
Double getReal ()
Double getImag ()
 inline Double getImag() { return *(imag_[currChunk_]->data()+(irel_idatamax_(currChunk_))); };
Double getImag2 (Int ch, Int i)
Double getFlag ()
Double getFlagRow ()
Double getRow ()
Double getWt ()
Double getAz0 ()
 These are array-global (one value per chunk):
Double getEl0 ()
Double getHA0 ()
Double getPA0 ()
Double getAntenna ()
 These are antenna-based.
Double getAz ()
Double getEl ()
Double getParAng ()
PlotLogMessagelocateNearest (Double x, Double y)
 Locate datum nearest to specified x,y (amp vs freq hardwired versions)
PlotLogMessagelocateRange (const Vector< PlotRegion > &regions)
PlotLogMessageflagRange (const PlotMSFlagging &flagging, const Vector< PlotRegion > &regions, Bool flag=True)
PlotMSAveragingaveraging ()
 Access to averaging state in the cache:
PlotMSTransformationstransformations ()
 Access to transformations state in the cache.
Matrix< Int > & chanAveBounds (Int spw)
 Access to channel averaging bounds.
void flagInCache (const PlotMSFlagging &flagging, Bool flag)
 Set flags in the cache.
void setPlotMask (Int chunk)
 Sets the plot mask for a single chunk.
virtual void flagToDisk (const PlotMSFlagging &flagging, Vector< Int > &chunks, Vector< Int > &relids, Bool flag)
 Set flags in the MS.
vector< pair< PMS::Axis,
unsigned int > > 
loadedAxes () const
 Returns which axes have been loaded into the cache, including metadata.

Static Public Member Functions

static bool axisIsMetaData (PMS::Axis axis)

Static Public Attributes

static const PMS::Axis METADATA []
static const unsigned int N_METADATA
static const unsigned int THREAD_SEGMENT

Protected Member Functions

 PlotMSCache (const PlotMSCache &mc)
 Forbid copy for now.
void increaseChunks (Int nc=0)
 Increase the number of chunks.
void setUpVisIter (const String &msname, const PlotMSSelection &selection, Bool readonly=True, Bool chanselect=True, Bool corrselect=True)
 Setup the VisIter.
void loadChunks (ROVisibilityIterator &vi, const vector< PMS::Axis > loadAxes, const vector< PMS::DataColumn > loadData, const PlotMSAveraging &averaging, PlotMSCacheThread *thread)
 Loop over VisIter, filling the cache.
void loadChunks (ROVisibilityIterator &vi, const PlotMSAveraging &averaging, const Vector< Int > &nIterPerAve, const vector< PMS::Axis > loadAxes, const vector< PMS::DataColumn > loadData, PlotMSCacheThread *thread)
void forceVBread (VisBuffer &vb, vector< PMS::Axis > loadAxes, vector< PMS::DataColumn > loadData)
 Force read on vb for requested axes (so pre-cache averaging treats all data it should)
void discernData (vector< PMS::Axis > loadAxes, vector< PMS::DataColumn > loadData, PlotMSVBAverager &vba)
 Tell time averager which data column to read.
void countChunks (ROVisibilityIterator &vi, PlotMSCacheThread *thread)
 Count the chunks required in the cache.
void countChunks (ROVisibilityIterator &vi, Vector< Int > &nIterPerAve, const PlotMSAveraging &averaging, PlotMSCacheThread *thread)
void append (const VisBuffer &vb, Int vbnum, PMS::Axis xAxis, PMS::Axis yAxis, PMS::DataColumn xData, PMS::DataColumn yData)
 Fill a chunk with a VisBuffer.
void reportMeta (Double x, Double y, stringstream &ss)
 Issue meta info report to the given stringstream.
void setChunk (Int i)
 Set currChunk_ according to a supplied index.
void deleteCache ()
 Clean up the PtrBlocks.
void loadAxis (VisBuffer &vb, Int vbnum, PMS::Axis axis, PMS::DataColumn data=PMS::DEFAULT_DATACOLUMN)
 Loads the specific axis/metadata into the cache using the given VisBuffer.
unsigned int nPointsForAxis (PMS::Axis axis) const
 Returns the number of points loaded for the given axis or 0 if not loaded.
void computeRanges ()
 Computes the X and Y limits for the currently set axes.
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 logLoad (const String &message)
void logFlag (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).

Protected Attributes

PlotMSAppplotms_
 Private data.
Int nAnt_
 The number of antennas.
Int nChunk_
 The number of chunks.
Int currChunk_
 The in-focus chunk and relative index offset.
Int irel_
Vector< IntnPoints_
 The cumulative running total of points.
Int nTotalPoints_
 the net number of flagged, unflagged, total points
Int nUnFlagPoints_
Int nFlagPoints_
Double refTime_p
 The reference time for this cache, in seconds.
Vector< BoolnetAxesMask_
 Axes mask.
Double minX_
Double maxX_
Double minY_
Double maxY_
Matrix< Intchshapes_
 The fundamental meta-data cache.
Vector< BoolgoodChunk_
Vector< Doubletime_
Vector< DoubletimeIntr_
Vector< Intfield_
Vector< Intspw_
Vector< Intscan_
PtrBlock< Vector< uInt > * > row_
PtrBlock< Vector< Int > * > antenna1_
PtrBlock< Vector< Int > * > antenna2_
PtrBlock< Vector< Int > * > baseline_
PtrBlock< Vector< Double > * > uvdist_
PtrBlock< Vector< Double > * > u_
PtrBlock< Vector< Double > * > v_
PtrBlock< Vector< Double > * > w_
PtrBlock< Matrix< Double > * > uvdistL_
PtrBlock< Vector< Double > * > freq_
PtrBlock< Vector< Double > * > vel_
PtrBlock< Vector< Int > * > chan_
PtrBlock< Vector< Int > * > corr_
PtrBlock< Vector< Float > * > pa_
 Optional parts of the cache.
PtrBlock< Array< Float > * > amp_
 Data (the heavy part)
PtrBlock< Array< Float > * > pha_
PtrBlock< Array< Float > * > real_
PtrBlock< Array< Float > * > imag_
PtrBlock< Array< Bool > * > flag_
PtrBlock< Vector< Bool > * > flagrow_
PtrBlock< Array< Float > * > wt_
PtrBlock< Array< Bool > * > plmask_
PtrBlock< Vector< Float > * > parang_
PtrBlock< Vector< Int > * > antenna_
PtrBlock< Vector< Double > * > az_
PtrBlock< Vector< Double > * > el_
Vector< Doubleaz0_
Vector< Doubleel0_
Vector< Doubleha0_
Vector< Doublepa0_
Vector< Inticorrmax_
 Indexing help.
Vector< Intichanmax_
Vector< Intibslnmax_
Vector< Intidatamax_
Vector< Intnperchan_
Vector< Intnperbsln_
Vector< Intnperant_
Vector< Intichanbslnmax_
Vector< Intiantmax_
bool dataLoaded_
 Current setup/state.
bool axesSet_
PMS::Axis currentX_
PMS::Axis currentY_
map< PMS::Axis, bool > loadedAxes_
map< PMS::Axis, PMS::DataColumn > loadedAxesData_
String msname_
 A copy of the Data parameters.
PlotMSSelection selection_
PlotMSAveraging averaging_
PlotMSTransformations transformations_
Vector< Stringantnames_
 meta info for locate output
Vector< Stringfldnames_
Vector< Matrix< Int > > chanAveBounds_p
 A container for channel averaging bounds.
Vector< IntnVBPerAve_
 Provisional flagging helpers.
ROVisIteratorrvi_p
 VisIterator pointer.
VisIteratorwvi_p
VisBufferUtil vbu_
 VisBufferUtil for freq/vel calculations.

Friends

class PlotMSData
 Friend class declarations.

Detailed Description

Definition at line 49 of file PlotMSCache.h.


Member Enumeration Documentation

Varieties of cache.

Enumerator:
MS 
CAL 

Definition at line 57 of file PlotMSCache.h.


Constructor & Destructor Documentation

casa::PlotMSCache::PlotMSCache ( PlotMSApp parent)

Constructor which takes parent PlotMS.

virtual casa::PlotMSCache::~PlotMSCache ( ) [virtual]

Destructor.

casa::PlotMSCache::PlotMSCache ( const PlotMSCache mc) [protected]

Forbid copy for now.


Member Function Documentation

void casa::PlotMSCache::append ( const VisBuffer vb,
Int  vbnum,
PMS::Axis  xAxis,
PMS::Axis  yAxis,
PMS::DataColumn  xData,
PMS::DataColumn  yData 
) [protected]

Fill a chunk with a VisBuffer.

PlotMSAveraging& casa::PlotMSCache::averaging ( ) [inline]

Access to averaging state in the cache:

Definition at line 247 of file PlotMSCache.h.

References averaging_.

static bool casa::PlotMSCache::axisIsMetaData ( PMS::Axis  axis) [static]
bool casa::PlotMSCache::cacheReady ( ) const [inline]

Returns whether cache is filled.

Definition at line 134 of file PlotMSCache.h.

References dataLoaded_.

Referenced by readyForPlotting().

PlotMSCache::Type casa::PlotMSCache::cacheType ( ) [inline]

Identify myself.

Reimplemented in casa::PlotCalCache.

Definition at line 73 of file PlotMSCache.h.

References MS.

Matrix<Int>& casa::PlotMSCache::chanAveBounds ( Int  spw) [inline]

Access to channel averaging bounds.

Definition at line 253 of file PlotMSCache.h.

References chanAveBounds_p.

Matrix<Int>& casa::PlotMSCache::chunkShapes ( ) [inline]

Report the data shapes.

Definition at line 79 of file PlotMSCache.h.

References chshapes_.

Referenced by casa::PlotMSCacheIndexer::chunkShapes().

void casa::PlotMSCache::clear ( )

Clears the cache of all stored values.

This should be called when the underlying MS or MS selection is changed, thus invalidating stored data.

void casa::PlotMSCache::computeRanges ( ) [protected]

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::PlotMSCache::countChunks ( ROVisibilityIterator vi,
PlotMSCacheThread thread 
) [protected]

Count the chunks required in the cache.

void casa::PlotMSCache::countChunks ( ROVisibilityIterator vi,
Vector< Int > &  nIterPerAve,
const PlotMSAveraging averaging,
PlotMSCacheThread thread 
) [protected]
void casa::PlotMSCache::deleteCache ( ) [protected]

Clean up the PtrBlocks.

void casa::PlotMSCache::discernData ( vector< PMS::Axis >  loadAxes,
vector< PMS::DataColumn >  loadData,
PlotMSVBAverager vba 
) [protected]

Tell time averager which data column to read.

Array<Bool>& casa::PlotMSCache::flag ( Int  chunk) [inline]

Access to flags per chunk.

Definition at line 152 of file PlotMSCache.h.

References flag_.

void casa::PlotMSCache::flagInCache ( const PlotMSFlagging flagging,
Bool  flag 
)

Set flags in the cache.

PlotLogMessage* casa::PlotMSCache::flagRange ( const PlotMSFlagging flagging,
const Vector< PlotRegion > &  regions,
Bool  flag = True 
)
virtual void casa::PlotMSCache::flagToDisk ( const PlotMSFlagging flagging,
Vector< Int > &  chunks,
Vector< Int > &  relids,
Bool  flag 
) [virtual]

Set flags in the MS.

Reimplemented in casa::PlotCalCache.

void casa::PlotMSCache::forceVBread ( VisBuffer vb,
vector< PMS::Axis >  loadAxes,
vector< PMS::DataColumn >  loadData 
) [protected]

Force read on vb for requested axes (so pre-cache averaging treats all data it should)

Double casa::PlotMSCache::get ( PMS::Axis  axis)
Double casa::PlotMSCache::getAmp ( Int  chnk,
Int  irel 
) [inline]

Definition at line 175 of file PlotMSCache.h.

References amp_.

Double casa::PlotMSCache::getAmp ( ) [inline]

Definition at line 215 of file PlotMSCache.h.

References amp_, currChunk_, idatamax_, and irel_.

Double casa::PlotMSCache::getAnt1 ( Int  chnk,
Int  irel 
) [inline]

Definition at line 166 of file PlotMSCache.h.

References antenna1_.

Double casa::PlotMSCache::getAnt1 ( ) [inline]

Definition at line 206 of file PlotMSCache.h.

References antenna1_, currChunk_, ibslnmax_, irel_, and nperbsln_.

Double casa::PlotMSCache::getAnt2 ( Int  chnk,
Int  irel 
) [inline]

Definition at line 167 of file PlotMSCache.h.

References antenna2_.

Double casa::PlotMSCache::getAnt2 ( ) [inline]

Definition at line 207 of file PlotMSCache.h.

References antenna2_, currChunk_, ibslnmax_, irel_, and nperbsln_.

Double casa::PlotMSCache::getAntenna ( Int  chnk,
Int  irel 
) [inline]

These are antenna-based.

Definition at line 191 of file PlotMSCache.h.

References antenna_.

Double casa::PlotMSCache::getAntenna ( ) [inline]

These are antenna-based.

Definition at line 235 of file PlotMSCache.h.

References antenna_, currChunk_, iantmax_, irel_, and nperant_.

void casa::PlotMSCache::getAxesMask ( PMS::Axis  axis,
Vector< Bool > &  axismask 
)
Double casa::PlotMSCache::getAz ( Int  chnk,
Int  irel 
) [inline]

Definition at line 192 of file PlotMSCache.h.

References az_.

Double casa::PlotMSCache::getAz ( ) [inline]

Definition at line 236 of file PlotMSCache.h.

References az_, currChunk_, iantmax_, irel_, and nperant_.

Double casa::PlotMSCache::getAz0 ( Int  chnk,
Int  irel 
) [inline]

These are array-global (one value per chunk)

Definition at line 185 of file PlotMSCache.h.

References az0_.

Double casa::PlotMSCache::getAz0 ( ) [inline]

These are array-global (one value per chunk):

Definition at line 229 of file PlotMSCache.h.

References az0_, and currChunk_.

Double casa::PlotMSCache::getBsln ( Int  chnk,
Int  irel 
) [inline]

Definition at line 168 of file PlotMSCache.h.

References baseline_.

Double casa::PlotMSCache::getBsln ( ) [inline]

Definition at line 208 of file PlotMSCache.h.

References baseline_, currChunk_, ibslnmax_, irel_, and nperbsln_.

Double casa::PlotMSCache::getChan ( Int  chnk,
Int  irel 
) [inline]

Definition at line 164 of file PlotMSCache.h.

References chan_.

Double casa::PlotMSCache::getChan ( ) [inline]

Definition at line 204 of file PlotMSCache.h.

References chan_, currChunk_, ichanmax_, irel_, and nperchan_.

Double casa::PlotMSCache::getCorr ( Int  chnk,
Int  irel 
) [inline]

Definition at line 165 of file PlotMSCache.h.

References corr_.

Double casa::PlotMSCache::getCorr ( ) [inline]

Definition at line 205 of file PlotMSCache.h.

References corr_, currChunk_, icorrmax_, and irel_.

Double casa::PlotMSCache::getEl ( Int  chnk,
Int  irel 
) [inline]

Definition at line 193 of file PlotMSCache.h.

References el_.

Double casa::PlotMSCache::getEl ( ) [inline]

Definition at line 237 of file PlotMSCache.h.

References currChunk_, el_, iantmax_, irel_, and nperant_.

Double casa::PlotMSCache::getEl0 ( Int  chnk,
Int  irel 
) [inline]

Definition at line 186 of file PlotMSCache.h.

References el0_.

Double casa::PlotMSCache::getEl0 ( ) [inline]

Definition at line 230 of file PlotMSCache.h.

References currChunk_, and el0_.

Double casa::PlotMSCache::getField ( Int  chnk,
Int  irel 
) [inline]

Definition at line 157 of file PlotMSCache.h.

References field_.

Double casa::PlotMSCache::getField ( ) [inline]

Definition at line 198 of file PlotMSCache.h.

References currChunk_, and field_.

Double casa::PlotMSCache::getFlag ( Int  chnk,
Int  irel 
) [inline]

Definition at line 180 of file PlotMSCache.h.

References flag_.

Double casa::PlotMSCache::getFlag ( ) [inline]

Definition at line 222 of file PlotMSCache.h.

References currChunk_, flag_, idatamax_, and irel_.

Bool casa::PlotMSCache::getFlagMask ( Int  i)
Double casa::PlotMSCache::getFlagRow ( Int  chnk,
Int  irel 
) [inline]

Definition at line 181 of file PlotMSCache.h.

References flagrow_.

Double casa::PlotMSCache::getFlagRow ( ) [inline]

Definition at line 223 of file PlotMSCache.h.

References currChunk_, flagrow_, ibslnmax_, irel_, and nperbsln_.

Double casa::PlotMSCache::getFreq ( Int  chnk,
Int  irel 
) [inline]

Definition at line 162 of file PlotMSCache.h.

References freq_.

Double casa::PlotMSCache::getFreq ( ) [inline]

Definition at line 202 of file PlotMSCache.h.

References currChunk_, freq_, ichanmax_, irel_, and nperchan_.

Double casa::PlotMSCache::getHA0 ( Int  chnk,
Int  irel 
) [inline]

Definition at line 187 of file PlotMSCache.h.

References ha0_.

Double casa::PlotMSCache::getHA0 ( ) [inline]

Definition at line 231 of file PlotMSCache.h.

References currChunk_, and ha0_.

Double casa::PlotMSCache::getImag ( Int  chnk,
Int  irel 
) [inline]

Definition at line 178 of file PlotMSCache.h.

References imag_.

Double casa::PlotMSCache::getImag ( ) [inline]

inline Double getImag() { return *(imag_[currChunk_]->data()+(irel_idatamax_(currChunk_))); };

Definition at line 219 of file PlotMSCache.h.

References currChunk_, getImag2(), idatamax_, and irel_.

Double casa::PlotMSCache::getImag2 ( Int  ch,
Int  i 
) [inline]

Definition at line 220 of file PlotMSCache.h.

References imag_.

Referenced by getImag().

Double casa::PlotMSCache::getPA0 ( Int  chnk,
Int  irel 
) [inline]

Definition at line 188 of file PlotMSCache.h.

References pa0_.

Double casa::PlotMSCache::getPA0 ( ) [inline]

Definition at line 232 of file PlotMSCache.h.

References currChunk_, and pa0_.

Double casa::PlotMSCache::getParAng ( Int  chnk,
Int  irel 
) [inline]

Definition at line 194 of file PlotMSCache.h.

References parang_.

Double casa::PlotMSCache::getParAng ( ) [inline]

Definition at line 238 of file PlotMSCache.h.

References currChunk_, iantmax_, irel_, nperant_, and parang_.

Double casa::PlotMSCache::getPha ( Int  chnk,
Int  irel 
) [inline]

Definition at line 176 of file PlotMSCache.h.

References pha_.

Double casa::PlotMSCache::getPha ( ) [inline]

Definition at line 216 of file PlotMSCache.h.

References currChunk_, idatamax_, irel_, and pha_.

void casa::PlotMSCache::getRanges ( Double minX,
Double maxX,
Double minY,
Double maxY 
)

Get X and Y limits (amp vs freq hardwired version)

Double casa::PlotMSCache::getReal ( Int  chnk,
Int  irel 
) [inline]

Definition at line 177 of file PlotMSCache.h.

References real_.

Double casa::PlotMSCache::getReal ( ) [inline]

Definition at line 217 of file PlotMSCache.h.

References currChunk_, idatamax_, irel_, and real_.

Double casa::PlotMSCache::getRow ( Int  chnk,
Int  irel 
) [inline]

Definition at line 182 of file PlotMSCache.h.

References row_.

Double casa::PlotMSCache::getRow ( ) [inline]

Definition at line 224 of file PlotMSCache.h.

References currChunk_, ibslnmax_, irel_, nperbsln_, and row_.

Double casa::PlotMSCache::getScan ( Int  chnk,
Int  irel 
) [inline]

Axis-specific generic gets.

Definition at line 156 of file PlotMSCache.h.

References scan_.

Double casa::PlotMSCache::getScan ( ) [inline]

Axis-specific gets.

Definition at line 197 of file PlotMSCache.h.

References currChunk_, and scan_.

Double casa::PlotMSCache::getSpw ( Int  chnk,
Int  irel 
) [inline]

Definition at line 160 of file PlotMSCache.h.

References spw_.

Double casa::PlotMSCache::getSpw ( ) [inline]

Definition at line 201 of file PlotMSCache.h.

References currChunk_, and spw_.

Double casa::PlotMSCache::getTime ( Int  chnk,
Int  irel 
) [inline]

Definition at line 158 of file PlotMSCache.h.

References time_.

Double casa::PlotMSCache::getTime ( ) [inline]

Definition at line 199 of file PlotMSCache.h.

References currChunk_, and time_.

Double casa::PlotMSCache::getTimeIntr ( Int  chnk,
Int  irel 
) [inline]

Definition at line 159 of file PlotMSCache.h.

References timeIntr_.

Double casa::PlotMSCache::getTimeIntr ( ) [inline]

Definition at line 200 of file PlotMSCache.h.

References currChunk_, and timeIntr_.

Double casa::PlotMSCache::getU ( Int  chnk,
Int  irel 
) [inline]

Definition at line 171 of file PlotMSCache.h.

References u_.

Double casa::PlotMSCache::getU ( ) [inline]

Definition at line 211 of file PlotMSCache.h.

References currChunk_, ibslnmax_, irel_, nperbsln_, and u_.

Double casa::PlotMSCache::getUVDist ( Int  chnk,
Int  irel 
) [inline]

Definition at line 169 of file PlotMSCache.h.

References uvdist_.

Double casa::PlotMSCache::getUVDist ( ) [inline]

Definition at line 209 of file PlotMSCache.h.

References currChunk_, ibslnmax_, irel_, nperbsln_, and uvdist_.

Double casa::PlotMSCache::getUVDistL ( Int  chnk,
Int  irel 
) [inline]

Definition at line 170 of file PlotMSCache.h.

References uvdistL_.

Double casa::PlotMSCache::getUVDistL ( ) [inline]

Definition at line 210 of file PlotMSCache.h.

References currChunk_, ichanbslnmax_, irel_, nperchan_, and uvdistL_.

Double casa::PlotMSCache::getV ( Int  chnk,
Int  irel 
) [inline]

Definition at line 172 of file PlotMSCache.h.

References v_.

Double casa::PlotMSCache::getV ( ) [inline]

Definition at line 212 of file PlotMSCache.h.

References currChunk_, ibslnmax_, irel_, nperbsln_, and v_.

Double casa::PlotMSCache::getVel ( Int  chnk,
Int  irel 
) [inline]

Definition at line 163 of file PlotMSCache.h.

References vel_.

Double casa::PlotMSCache::getVel ( ) [inline]

Definition at line 203 of file PlotMSCache.h.

References currChunk_, ichanmax_, irel_, nperchan_, and vel_.

Double casa::PlotMSCache::getW ( Int  chnk,
Int  irel 
) [inline]

Definition at line 173 of file PlotMSCache.h.

References w_.

Double casa::PlotMSCache::getW ( ) [inline]

Definition at line 213 of file PlotMSCache.h.

References currChunk_, ibslnmax_, irel_, nperbsln_, and w_.

Double casa::PlotMSCache::getWt ( ) [inline]

Definition at line 226 of file PlotMSCache.h.

References currChunk_, irel_, nperbsln_, nperchan_, and wt_.

Double casa::PlotMSCache::getX ( Int  i)

Get single values for x-y plotting.

void casa::PlotMSCache::getXY ( Int  i,
Double x,
Double y 
)
Double casa::PlotMSCache::getY ( Int  i)
void casa::PlotMSCache::increaseChunks ( Int  nc = 0) [protected]

Increase the number of chunks.

virtual void casa::PlotMSCache::load ( const vector< PMS::Axis > &  axes,
const vector< PMS::DataColumn > &  data,
const String msname,
const PlotMSSelection selection,
const PlotMSAveraging averaging,
const PlotMSTransformations transformations,
PlotMSCacheThread thread = NULL 
) [virtual]

Loads the cache for the given axes and data columns.

IMPORTANT: this method assumes that any currently loaded data is valid for the given VisIter; i.e., if the meta-information or either of the axes are already loaded, then they don't need to be reloaded. If this is not the case, then clear() should be called BEFORE append(). If a PlotMSCacheThreadHelper object is given, it will be used to report progress information.

Reimplemented in casa::PlotCalCache.

Referenced by load().

void casa::PlotMSCache::load ( PMS::Axis  xAxis,
PMS::Axis  yAxis,
PMS::DataColumn  xData,
PMS::DataColumn  yData,
const String msname,
const PlotMSSelection selection,
const PlotMSAveraging averaging,
const PlotMSTransformations transformations,
PlotMSCacheThread thread = NULL 
) [inline]

Convenience method for loading x and y axes.

Definition at line 109 of file PlotMSCache.h.

References casa::data, and load().

void casa::PlotMSCache::loadAxis ( VisBuffer vb,
Int  vbnum,
PMS::Axis  axis,
PMS::DataColumn  data = PMS::DEFAULT_DATACOLUMN 
) [protected]

Loads the specific axis/metadata into the cache using the given VisBuffer.

void casa::PlotMSCache::loadChunks ( ROVisibilityIterator vi,
const vector< PMS::Axis >  loadAxes,
const vector< PMS::DataColumn >  loadData,
const PlotMSAveraging averaging,
PlotMSCacheThread thread 
) [protected]

Loop over VisIter, filling the cache.

void casa::PlotMSCache::loadChunks ( ROVisibilityIterator vi,
const PlotMSAveraging averaging,
const Vector< Int > &  nIterPerAve,
const vector< PMS::Axis >  loadAxes,
const vector< PMS::DataColumn >  loadData,
PlotMSCacheThread thread 
) [protected]
vector<pair<PMS::Axis, unsigned int> > casa::PlotMSCache::loadedAxes ( ) const

Returns which axes have been loaded into the cache, including metadata.

Also includes the size (number of points) for each axis (which will eventually be used for a cache manager to let the user know the relative memory use of each axis).

PlotLogMessage* casa::PlotMSCache::locateNearest ( Double  x,
Double  y 
)

Locate datum nearest to specified x,y (amp vs freq hardwired versions)

PlotLogMessage* casa::PlotMSCache::locateRange ( const Vector< PlotRegion > &  regions)
void casa::PlotMSCache::log ( const String method,
const String message,
int  eventType 
) [protected]

Logs the given message from the given method name as the given event type (see PlotLogger).

Referenced by logDebug(), logError(), logFlag(), logInfo(), logLoad(), and logWarn().

void casa::PlotMSCache::logDebug ( const String method,
const String message 
) [inline, protected]

Definition at line 345 of file PlotMSCache.h.

References log(), and casa::PlotLogger::MSG_DEBUG.

void casa::PlotMSCache::logError ( const String method,
const String message 
) [inline, protected]

Definition at line 349 of file PlotMSCache.h.

References log(), and casa::PlotLogger::MSG_ERROR.

void casa::PlotMSCache::logFlag ( const String message) [inline, protected]

Definition at line 354 of file PlotMSCache.h.

References log(), casa::PMS::LOG_EVENT_FLAG, and casa::PMS::LOG_ORIGIN_FLAG.

void casa::PlotMSCache::logInfo ( const String method,
const String message 
) [inline, protected]

Convenience methods that call log() with the given method name and the appropriate event type.

Definition at line 343 of file PlotMSCache.h.

References log(), and casa::PlotLogger::MSG_INFO.

void casa::PlotMSCache::logLoad ( const String message) [inline, protected]
void casa::PlotMSCache::logWarn ( const String method,
const String message 
) [inline, protected]

Definition at line 347 of file PlotMSCache.h.

References log(), and casa::PlotLogger::MSG_WARN.

Int casa::PlotMSCache::nChunk ( ) const [inline]

Report the number of chunks.

Definition at line 76 of file PlotMSCache.h.

References nChunk_.

Referenced by casa::PlotMSCacheIndexer::nChunk().

Int casa::PlotMSCache::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 84 of file PlotMSCache.h.

References nChunk_, and nPoints_.

unsigned int casa::PlotMSCache::nPointsForAxis ( PMS::Axis  axis) const [protected]

Returns the number of points loaded for the given axis or 0 if not loaded.

bool casa::PlotMSCache::readyForPlotting ( ) const [inline]

Returns whether the cache is filled AND ready to return plotting data via the get methods or not.

Definition at line 138 of file PlotMSCache.h.

References axesSet_, and cacheReady().

Double casa::PlotMSCache::refTime ( ) [inline]

Report the reference time for this cache (in seconds)

Definition at line 87 of file PlotMSCache.h.

References refTime_p.

Referenced by casa::PlotMSCacheIndexer::refTime().

void casa::PlotMSCache::release ( const vector< PMS::Axis > &  axes)

Releases the given axes from the cache.

void casa::PlotMSCache::reportMeta ( Double  x,
Double  y,
stringstream &  ss 
) [protected]

Issue meta info report to the given stringstream.

Reimplemented in casa::PlotCalCache.

void casa::PlotMSCache::setChunk ( Int  i) [protected]

Set currChunk_ according to a supplied index.

void casa::PlotMSCache::setPlotMask ( Int  chunk)

Sets the plot mask for a single chunk.

void casa::PlotMSCache::setUpCacheForPlot ( PMS::Axis  xAxis,
PMS::Axis  yAxis 
)

Set up indexing for the plot (amp vs freq hardwired version)

void casa::PlotMSCache::setUpVisIter ( const String msname,
const PlotMSSelection selection,
Bool  readonly = True,
Bool  chanselect = True,
Bool  corrselect = True 
) [protected]

Setup the VisIter.

PlotMSTransformations& casa::PlotMSCache::transformations ( ) [inline]

Access to transformations state in the cache.

Definition at line 250 of file PlotMSCache.h.

References transformations_.


Friends And Related Function Documentation

friend class PlotMSData [friend]

Friend class declarations.

Reimplemented in casa::PlotCalCache.

Definition at line 52 of file PlotMSCache.h.


Member Data Documentation

Data (the heavy part)

Definition at line 407 of file PlotMSCache.h.

Referenced by getAmp().

Definition at line 396 of file PlotMSCache.h.

Referenced by getAnt1().

Definition at line 396 of file PlotMSCache.h.

Referenced by getAnt2().

Definition at line 416 of file PlotMSCache.h.

Referenced by getAntenna().

meta info for locate output

Definition at line 441 of file PlotMSCache.h.

Definition at line 437 of file PlotMSCache.h.

Referenced by averaging().

bool casa::PlotMSCache::axesSet_ [protected]

Definition at line 429 of file PlotMSCache.h.

Referenced by readyForPlotting().

Definition at line 419 of file PlotMSCache.h.

Referenced by getAz0().

Definition at line 417 of file PlotMSCache.h.

Referenced by getAz().

Definition at line 396 of file PlotMSCache.h.

Referenced by getBsln().

Definition at line 400 of file PlotMSCache.h.

Referenced by getChan().

A container for channel averaging bounds.

Definition at line 445 of file PlotMSCache.h.

Referenced by chanAveBounds().

The fundamental meta-data cache.

Definition at line 391 of file PlotMSCache.h.

Referenced by chunkShapes().

Definition at line 401 of file PlotMSCache.h.

Referenced by getCorr().

PMS::Axis casa::PlotMSCache::currentX_ [protected]

Definition at line 430 of file PlotMSCache.h.

PMS::Axis casa::PlotMSCache::currentY_ [protected]

Definition at line 430 of file PlotMSCache.h.

Current setup/state.

Definition at line 428 of file PlotMSCache.h.

Referenced by cacheReady().

Definition at line 419 of file PlotMSCache.h.

Referenced by getEl0().

Definition at line 417 of file PlotMSCache.h.

Referenced by getEl().

Definition at line 394 of file PlotMSCache.h.

Referenced by getField().

Definition at line 408 of file PlotMSCache.h.

Referenced by flag(), and getFlag().

Definition at line 409 of file PlotMSCache.h.

Referenced by getFlagRow().

Definition at line 442 of file PlotMSCache.h.

Definition at line 399 of file PlotMSCache.h.

Referenced by getFreq().

Definition at line 392 of file PlotMSCache.h.

Definition at line 419 of file PlotMSCache.h.

Referenced by getHA0().

Definition at line 425 of file PlotMSCache.h.

Referenced by getAntenna(), getAz(), getEl(), and getParAng().

Definition at line 422 of file PlotMSCache.h.

Referenced by getAnt1(), getAnt2(), getBsln(), getFlagRow(), getRow(), getU(), getUVDist(), getV(), and getW().

Definition at line 424 of file PlotMSCache.h.

Referenced by getUVDistL().

Definition at line 422 of file PlotMSCache.h.

Referenced by getChan(), getFreq(), and getVel().

Indexing help.

Definition at line 422 of file PlotMSCache.h.

Referenced by getCorr().

Definition at line 422 of file PlotMSCache.h.

Referenced by getAmp(), getFlag(), getImag(), getPha(), and getReal().

Definition at line 407 of file PlotMSCache.h.

Referenced by getImag(), and getImag2().

map<PMS::Axis, bool> casa::PlotMSCache::loadedAxes_ [protected]

Definition at line 431 of file PlotMSCache.h.

map<PMS::Axis, PMS::DataColumn> casa::PlotMSCache::loadedAxesData_ [protected]

Definition at line 432 of file PlotMSCache.h.

Definition at line 388 of file PlotMSCache.h.

Definition at line 388 of file PlotMSCache.h.

const PMS::Axis casa::PlotMSCache::METADATA[] [static]

Definition at line 59 of file PlotMSCache.h.

Definition at line 388 of file PlotMSCache.h.

Definition at line 388 of file PlotMSCache.h.

A copy of the Data parameters.

Reimplemented in casa::PlotCalCache.

Definition at line 435 of file PlotMSCache.h.

const unsigned int casa::PlotMSCache::N_METADATA [static]

Definition at line 60 of file PlotMSCache.h.

The number of antennas.

Definition at line 368 of file PlotMSCache.h.

The number of chunks.

Definition at line 371 of file PlotMSCache.h.

Referenced by nChunk(), and nPoints().

Axes mask.

Definition at line 386 of file PlotMSCache.h.

Definition at line 380 of file PlotMSCache.h.

Definition at line 423 of file PlotMSCache.h.

Referenced by getAntenna(), getAz(), getEl(), and getParAng().

Definition at line 423 of file PlotMSCache.h.

Referenced by getAnt1(), getAnt2(), getBsln(), getFlagRow(), getRow(), getU(), getUVDist(), getV(), getW(), and getWt().

Definition at line 423 of file PlotMSCache.h.

Referenced by getChan(), getFreq(), getUVDistL(), getVel(), and getWt().

The cumulative running total of points.

Definition at line 377 of file PlotMSCache.h.

Referenced by nPoints().

the net number of flagged, unflagged, total points

Definition at line 380 of file PlotMSCache.h.

Definition at line 380 of file PlotMSCache.h.

Provisional flagging helpers.

Definition at line 448 of file PlotMSCache.h.

Definition at line 419 of file PlotMSCache.h.

Referenced by getPA0().

Optional parts of the cache.

Definition at line 404 of file PlotMSCache.h.

Definition at line 415 of file PlotMSCache.h.

Referenced by getParAng().

Definition at line 407 of file PlotMSCache.h.

Referenced by getPha().

Definition at line 413 of file PlotMSCache.h.

Private data.

Parent plotms.

Definition at line 365 of file PlotMSCache.h.

Definition at line 407 of file PlotMSCache.h.

Referenced by getReal().

The reference time for this cache, in seconds.

Definition at line 383 of file PlotMSCache.h.

Referenced by refTime().

Definition at line 395 of file PlotMSCache.h.

Referenced by getRow().

VisIterator pointer.

Definition at line 451 of file PlotMSCache.h.

Definition at line 394 of file PlotMSCache.h.

Referenced by getScan().

Definition at line 436 of file PlotMSCache.h.

Definition at line 394 of file PlotMSCache.h.

Referenced by getSpw().

const unsigned int casa::PlotMSCache::THREAD_SEGMENT [static]

Definition at line 64 of file PlotMSCache.h.

Definition at line 393 of file PlotMSCache.h.

Referenced by getTime().

Definition at line 393 of file PlotMSCache.h.

Referenced by getTimeIntr().

Definition at line 438 of file PlotMSCache.h.

Referenced by transformations().

Definition at line 397 of file PlotMSCache.h.

Referenced by getU().

Definition at line 397 of file PlotMSCache.h.

Referenced by getUVDist().

Definition at line 398 of file PlotMSCache.h.

Referenced by getUVDistL().

Definition at line 397 of file PlotMSCache.h.

Referenced by getV().

VisBufferUtil for freq/vel calculations.

Definition at line 455 of file PlotMSCache.h.

Definition at line 399 of file PlotMSCache.h.

Referenced by getVel().

Definition at line 397 of file PlotMSCache.h.

Referenced by getW().

Definition at line 411 of file PlotMSCache.h.

Referenced by getWt().

Definition at line 452 of file PlotMSCache.h.


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