#include <MSCache.h>
Public Member Functions | |
MSCache (PlotMSApp *parent) | |
Constructor which takes parent PlotMS. | |
virtual | ~MSCache () |
Destructor. | |
PlotMSCacheBase::Type | cacheType () const |
Identify myself. | |
void | setFilename (String filename) |
...not yet MS-specific. | |
virtual String | polname (Int ipol) |
Access to pol names. | |
Protected Member Functions | |
virtual void | loadIt (vector< PMS::Axis > &loadAxes, vector< PMS::DataColumn > &loadData, ThreadCommunication *thread=NULL) |
MS-specific loadIt method. | |
virtual bool | isEphemeris () |
Returns whether or not the ephemeris data has been attached to a field - radial velocity and rho. | |
Private Member Functions | |
MSCache (const MSCache &) | |
Forbid copy for now. | |
String | getDataColumn (vector< PMS::Axis > &loadAxes, vector< PMS::DataColumn > &loadData) |
Set up. | |
PMS::DataColumn | checkReqDataColumn (PMS::DataColumn reqDataCol) |
String | checkLoadedAxesDatacol () |
String | normalizeColumnName (String plotmscol) |
void | getNamesFromMS (MeasurementSet &ms) |
void | logChansForSpws (MeasurementSet &ms, Int chanVal) |
void | setUpVisIter (PlotMSSelection &selection, PlotMSCalibration &calibration, String dataColumn, Bool interactive=False, Bool estimateMemory=False, ThreadCommunication *thread=NULL) |
vi::VisibilityIterator2 * | setUpVisIter (MeasurementSet &selectedMS, Vector< Vector< Slice > > chansel, Vector< Vector< Slice > > corrsel) |
void | setUpFrequencySelectionChannels (vi::FrequencySelectionUsingChannels fs, Vector< Vector< Slice > > chansel) |
void | deleteVi () |
clean up | |
void | deleteVm () |
void | loadError (String mesg) |
bool | countChunks (vi::VisibilityIterator2 &vi, Vector< Int > &nIterPerAve, ThreadCommunication *thread) |
Estimate cache size for averaging. | |
void | updateEstimateProgress (ThreadCommunication *thread) |
void | trapExcessVolume (map< PMS::Axis, Bool > pendingLoadAxes) |
Trap attempt to use to much memory (too many points). | |
void | loadChunks (vi::VisibilityIterator2 &vi, const vector< PMS::Axis > loadAxes, const vector< PMS::DataColumn > loadData, ThreadCommunication *thread) |
Loop over VisIter, filling the cache. | |
void | loadChunks (vi::VisibilityIterator2 &vi, const PlotMSAveraging &averaging, const Vector< Int > &nIterPerAve, const vector< PMS::Axis > loadAxes, const vector< PMS::DataColumn > loadData, ThreadCommunication *thread) |
void | updateProgress (ThreadCommunication *thread, Int chunk) |
void | forceVBread (vi::VisBuffer2 *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 | loadAxis (vi::VisBuffer2 *vb, Int vbnum, PMS::Axis axis, PMS::DataColumn data=PMS::DEFAULT_DATACOLUMN) |
Loads the specific axis/metadata into the cache using the given VisBuffer. | |
virtual void | flagToDisk (const PlotMSFlagging &flagging, Vector< Int > &chunks, Vector< Int > &relids, Bool setFlag, PlotMSIndexer *indexer, int dataIndex) |
Set flags in the MS. | |
void | mapIntentNamesToIds () |
Vector< Int > | assignIntentIds (Vector< Int > &stateIds) |
Use map to assign intent ids. | |
Vector< Double > | calcVelocity (vi::VisBuffer2 *vb) |
bool | useAveragedVisBuffer (PMS::Axis axis) |
For averaging done by PlotMSVBAverager; Some axes need to come from VB2 attached to VI2. | |
Private Attributes | |
std::vector< IPosition > | visBufferShapes_ |
String | dataColumn_ |
Datacolumn to use (requested or "adjusted"). | |
map< String, Int > | intentIds_ |
Create map of intent names to "intent ids" since state ids can duplicate intents. | |
Vector< Int > | nVBPerAve_ |
Provisional flagging helpers. | |
vi::VisibilityIterator2 * | vi_p |
VisIterator pointer. | |
MSCacheVolMeter * | vm_ |
Volume meter for volume calculation. | |
bool | ephemerisAvailable |
Friends | |
class | PlotMSIndexer |
Friend class declarations. |
Definition at line 54 of file MSCache.h.
casa::MSCache::MSCache | ( | PlotMSApp * | parent | ) |
Constructor which takes parent PlotMS.
virtual casa::MSCache::~MSCache | ( | ) | [virtual] |
Destructor.
casa::MSCache::MSCache | ( | const MSCache & | ) | [private] |
Forbid copy for now.
Vector<Int> casa::MSCache::assignIntentIds | ( | Vector< Int > & | stateIds | ) | [private] |
Use map to assign intent ids.
PlotMSCacheBase::Type casa::MSCache::cacheType | ( | ) | const [inline, virtual] |
Identify myself.
Implements casa::PlotMSCacheBase.
Definition at line 68 of file MSCache.h.
References casa::PlotMSCacheBase::MS.
Vector<Double> casa::MSCache::calcVelocity | ( | vi::VisBuffer2 * | vb | ) | [private] |
String casa::MSCache::checkLoadedAxesDatacol | ( | ) | [private] |
PMS::DataColumn casa::MSCache::checkReqDataColumn | ( | PMS::DataColumn | reqDataCol | ) | [private] |
bool casa::MSCache::countChunks | ( | vi::VisibilityIterator2 & | vi, | |
Vector< Int > & | nIterPerAve, | |||
ThreadCommunication * | thread | |||
) | [private] |
Estimate cache size for averaging.
void casa::MSCache::deleteVi | ( | ) | [private] |
clean up
void casa::MSCache::deleteVm | ( | ) | [private] |
void casa::MSCache::discernData | ( | vector< PMS::Axis > | loadAxes, | |
vector< PMS::DataColumn > | loadData, | |||
PlotMSVBAverager & | vba | |||
) | [private] |
Tell time averager which data column to read.
virtual void casa::MSCache::flagToDisk | ( | const PlotMSFlagging & | flagging, | |
Vector< Int > & | chunks, | |||
Vector< Int > & | relids, | |||
Bool | setFlag, | |||
PlotMSIndexer * | indexer, | |||
int | dataIndex | |||
) | [private, virtual] |
Set flags in the MS.
Implements casa::PlotMSCacheBase.
void casa::MSCache::forceVBread | ( | vi::VisBuffer2 * | vb, | |
vector< PMS::Axis > | loadAxes, | |||
vector< PMS::DataColumn > | loadData | |||
) | [private] |
Force read on vb for requested axes (so pre-cache averaging treats all data it should).
String casa::MSCache::getDataColumn | ( | vector< PMS::Axis > & | loadAxes, | |
vector< PMS::DataColumn > & | loadData | |||
) | [private] |
Set up.
void casa::MSCache::getNamesFromMS | ( | MeasurementSet & | ms | ) | [private] |
virtual bool casa::MSCache::isEphemeris | ( | ) | [protected, virtual] |
Returns whether or not the ephemeris data has been attached to a field - radial velocity and rho.
Reimplemented from casa::PlotMSCacheBase.
void casa::MSCache::loadAxis | ( | vi::VisBuffer2 * | vb, | |
Int | vbnum, | |||
PMS::Axis | axis, | |||
PMS::DataColumn | data = PMS::DEFAULT_DATACOLUMN | |||
) | [private] |
Loads the specific axis/metadata into the cache using the given VisBuffer.
void casa::MSCache::loadChunks | ( | vi::VisibilityIterator2 & | vi, | |
const PlotMSAveraging & | averaging, | |||
const Vector< Int > & | nIterPerAve, | |||
const vector< PMS::Axis > | loadAxes, | |||
const vector< PMS::DataColumn > | loadData, | |||
ThreadCommunication * | thread | |||
) | [private] |
void casa::MSCache::loadChunks | ( | vi::VisibilityIterator2 & | vi, | |
const vector< PMS::Axis > | loadAxes, | |||
const vector< PMS::DataColumn > | loadData, | |||
ThreadCommunication * | thread | |||
) | [private] |
Loop over VisIter, filling the cache.
void casa::MSCache::loadError | ( | String | mesg | ) | [private] |
virtual void casa::MSCache::loadIt | ( | vector< PMS::Axis > & | loadAxes, | |
vector< PMS::DataColumn > & | loadData, | |||
ThreadCommunication * | thread = NULL | |||
) | [protected, virtual] |
MS-specific loadIt method.
void casa::MSCache::logChansForSpws | ( | MeasurementSet & | ms, | |
Int | chanVal | |||
) | [private] |
void casa::MSCache::mapIntentNamesToIds | ( | ) | [private] |
String casa::MSCache::normalizeColumnName | ( | String | plotmscol | ) | [private] |
virtual String casa::MSCache::polname | ( | Int | ipol | ) | [virtual] |
Access to pol names.
Implements casa::PlotMSCacheBase.
void casa::MSCache::setFilename | ( | String | filename | ) | [inline, virtual] |
...not yet MS-specific.
.. (or ever?) Set up indexing for the plot void setUpIndexer(PMS::Axis iteraxis=PMSSCAN, Bool globalXRange=False, Bool globalYRange=False);
Implements casa::PlotMSCacheBase.
Definition at line 75 of file MSCache.h.
References casa::PlotMSCacheBase::filename_.
void casa::MSCache::setUpFrequencySelectionChannels | ( | vi::FrequencySelectionUsingChannels | fs, | |
Vector< Vector< Slice > > | chansel | |||
) | [private] |
vi::VisibilityIterator2* casa::MSCache::setUpVisIter | ( | MeasurementSet & | selectedMS, | |
Vector< Vector< Slice > > | chansel, | |||
Vector< Vector< Slice > > | corrsel | |||
) | [private] |
void casa::MSCache::setUpVisIter | ( | PlotMSSelection & | selection, | |
PlotMSCalibration & | calibration, | |||
String | dataColumn, | |||
Bool | interactive = False , |
|||
Bool | estimateMemory = False , |
|||
ThreadCommunication * | thread = NULL | |||
) | [private] |
void casa::MSCache::trapExcessVolume | ( | map< PMS::Axis, Bool > | pendingLoadAxes | ) | [private] |
void casa::MSCache::updateEstimateProgress | ( | ThreadCommunication * | thread | ) | [private] |
void casa::MSCache::updateProgress | ( | ThreadCommunication * | thread, | |
Int | chunk | |||
) | [private] |
bool casa::MSCache::useAveragedVisBuffer | ( | PMS::Axis | axis | ) | [private] |
For averaging done by PlotMSVBAverager; Some axes need to come from VB2 attached to VI2.
friend class PlotMSIndexer [friend] |
Friend class declarations.
Reimplemented from casa::PlotMSCacheBase.
String casa::MSCache::dataColumn_ [private] |
bool casa::MSCache::ephemerisAvailable [private] |
map<String, Int> casa::MSCache::intentIds_ [private] |
Vector<Int> casa::MSCache::nVBPerAve_ [private] |
vi::VisibilityIterator2* casa::MSCache::vi_p [private] |
VisIterator pointer.
std::vector<IPosition> casa::MSCache::visBufferShapes_ [private] |
MSCacheVolMeter* casa::MSCache::vm_ [private] |