28 #ifndef TRANSFORM2_TRANSFORM2_VISMODELDATA_H
29 #define TRANSFORM2_TRANSFORM2_VISMODELDATA_H
41 template <
class T>
class Vector;
47 namespace vi{
class VisBuffer2;}
181 putModel (thems, rec, validfields, spws, starts, nchan, incr, iscomponentlist, incremental);
195 putModel(thems, rec, indexComb, chansel, iscomponentlist, incremental);
278 #endif // VISMODELDATA_H
static casacore::Bool removeSpw(casacore::TableRecord &therec, const casacore::Vector< casacore::Int > &spws, const casacore::Vector< casacore::Int > &fields=casacore::Vector< casacore::Int >(0))
std::vector< double > Vector
casacore::Vector< casacore::CountedPtr< ComponentList > > getCL(const casacore::Int msId, const casacore::Int fieldId, casacore::Int spw)
void putModelI(const casacore::MeasurementSet &thems, const casacore::RecordInterface &rec, const casacore::Matrix< casacore::Int > &indexComb, const casacore::Matrix< casacore::Int > &chansel, casacore::Bool iscomponentlist=true, casacore::Bool incremental=false)
Version 2 record to keep track of state and scan number.
static void listModel(const casacore::MeasurementSet &thems)
List the fields in the logger.
static casacore::Bool removeSpwFromMachineRec(casacore::RecordInterface &ftclrec, const casacore::Vector< casacore::Int > &spws)
defines interface for the Fourier Transform Machine
static casacore::Bool initialize
static void putModel(const casacore::MeasurementSet &thems, const casacore::RecordInterface &rec, const casacore::Vector< casacore::Int > &validfields, const casacore::Vector< casacore::Int > &spws, const casacore::Vector< casacore::Int > &starts, const casacore::Vector< casacore::Int > &nchan, const casacore::Vector< casacore::Int > &incr, casacore::Bool iscomponentlist=true, casacore::Bool incremental=false)
virtual ~VisModelData()
From a FTMachine Record VisModelData(const casacore::Record& ftmachinerec, const casacore::Vector<cas...
casacore::Int hasModel(casacore::Int msid, casacore::Int field, casacore::Int spw)
check if an addFT or addCompFT is necessary casacore::Bool hasFT(casacore::Int msid, casacore::Int fieldid); casacore::Bool hasCL(casacore::Int msid, casacore::Int fieldid); returns a -1 if there is no model for this combination of ms,field,spw...but has not been // checked yet if there is one returns a -2 if it has been tested before but does have it.
static casacore::Bool isModelDefined(const casacore::Int fieldId, const casacore::MeasurementSet &thems, casacore::String &key, casacore::Int &sourceRow)
void addModel(const casacore::RecordInterface &rec, const casacore::Vector< casacore::Int > &msids, const vi::VisBuffer2 &vb)
add componentlists or ftmachines
void updateHolders(const vi::VisBuffer2 &vb, const std::vector< casacore::Int > &index)
casacore::Vector< casacore::CountedPtr< FTMachine > > getFT(const casacore::Int msId, const casacore::Int fieldId, casacore::Int spw)
static void putRecordByKey(casacore::MeasurementSet &theMS, const casacore::String &theKey, const casacore::TableRecord &theRec, const casacore::Int sourceRowNum=-1)
put the casacore::Record by key if sourcerownum=-1 then it is saved in the main table this default sh...
void getUniqueIndicesComb(const vi::VisBuffer2 &vb, casacore::Vector< casacore::Vector< casacore::Int > > &retval)
get all the combinations of field, spw, scan, state in this visbuffer
casacore::Bool isModelDefinedI(const casacore::Int fieldId, const casacore::MeasurementSet &thems, casacore::String &key, casacore::Int &sourceRow)
Functions to see if model is defined in the casacore::MS either in the SOURCE table or else in the MA...
static casacore::Bool addToRec(casacore::TableRecord &therec, const casacore::Vector< casacore::Int > &spws)
casacore::Block< casacore::Vector< casacore::CountedPtr< ComponentList > > > clholder_p
static void clearModel(const casacore::MeasurementSet &thems)
casacore::Bool getModelRecordI(const casacore::String &theKey, casacore::TableRecord &theRec, const casacore::MeasurementSet &theMs)
Get a given model that is defined by key Forcing user to use a casacore::TableRecord rather than Gene...
static void removeRecordByKey(casacore::MeasurementSet &theMS, const casacore::String &theKey)
Remove the casacore::Record which has the given key...will exterminate it from both the Source table ...
Referenced counted pointer for constant data.
void clearModelI(const casacore::MeasurementSet &thems)
helper function to clear the keywordSet of the ms of the model for the fields in that ms ...
static casacore::Bool getModelRecord(const casacore::String &theKey, casacore::TableRecord &theRec, const casacore::MeasurementSet &theMs)
casacore::Cube< casacore::Int > ftindex_p
static casacore::Int firstSourceRowRecord(const casacore::Int field, const casacore::MeasurementSet &theMS, casacore::TableRecord &rec)
Object to provide MODEL_DATA visibilities on demand.
void addFlatModel(const casacore::Vector< casacore::Double > &value, const casacore::Vector< casacore::Int > &validfieldids, const casacore::Vector< casacore::Int > &msIds)
Add Image/FTMachine to generate visibilities for void addFTMachine(const casacore::Record& recordFTMa...
casacore::Block< casacore::Vector< casacore::CountedPtr< FTMachine > > > ftholder_p
void getMatchingMachines(casacore::Vector< casacore::CountedPtr< FTMachine > > &ft, casacore::Vector< casacore::CountedPtr< ComponentList > > &cl, const vi::VisBuffer2 &vb)
A hierarchical collection of named fields of various types.
bool Bool
Define the standard types used by Casacore.
VisModelData()
empty constructor
casacore::Block< casacore::Vector< casacore::Double > > flatholder_p
void init(const vi::VisBuffer2 &vb)
static void deleteDiskImage(casacore::MeasurementSet &theMS, const casacore::String &theKey)
A hierarchical collection of named fields of various types.
void addModel(const casacore::RecordInterface &, const casacore::Vector< casacore::Int > &, const VisBuffer &)
Add Image/FTMachine to generate visibilities for void addFTMachine(const casacore::Record& recordFTMa...
A Table intended to hold astronomical data (a set of Measurements).
static casacore::Bool hasAnyModel(const casacore::MeasurementSet &thems, casacore::Vector< casacore::Int > &fieldids)
Returns true if any valid virtual model is found, fieldids of which are also returned.
std::map< std::vector< casacore::Int >, casacore::Int > ftindex2_p
These 2 maps will hold the index of ftholder_p or clholder_p from key (field_id, spw_id, scan, state, msid)
std::map< std::vector< casacore::Int >, casacore::Int > clindex2_p
VisBuffer2s encapsulate one chunk of visibility data for processing.
void init(const VisBuffer &)
Make sure that VisModel has been called once loaded checks and detection of version 1 or 2 is valid...
static void modifyDiskImagePath(casacore::Record &rec, const vi::VisBuffer2 &vb)
Base class for all Casacore library errors.
casacore::Bool isVersion2()
static FTMachine * NEW_FT(const casacore::Record &ftrec)
casacore::Bool getModelVis(vi::VisBuffer2 &vb)
put the model data for this VisBuffer in the modelVisCube
String: the storage and methods of handling collections of characters.
casacore::CountedPtr< ComponentFTMachine > cft_p
static casacore::Bool removeFTFromRec(casacore::TableRecord &therec, const casacore::String &keyval, const casacore::Bool relabel=true)
VisBuffers encapsulate one chunk of visibility data for processing.
casacore::Bool getModelVis(VisBuffer &)
//put the model data for this VisBuffer in the modelVisCube
Abstract base class for Record classes.
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
casacore::Cube< casacore::Int > clindex_p
void putModelI(const casacore::MeasurementSet &thems, const casacore::RecordInterface &rec, const casacore::Vector< casacore::Int > &validfields, const casacore::Vector< casacore::Int > &spws, const casacore::Vector< casacore::Int > &starts, const casacore::Vector< casacore::Int > &nchan, const casacore::Vector< casacore::Int > &incr, casacore::Bool iscomponentlist=true, casacore::Bool incremental=false)
this is a helper function that writes the model record to the ms
static casacore::Bool putModelRecord(const casacore::Vector< casacore::Int > &fieldIds, casacore::TableRecord &theRec, casacore::MeasurementSet &theMS)
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.