28 #ifndef VISMODELDATA_H
29 #define VISMODELDATA_H
40 template <
class T>
class Vector;
41 template <
class T>
class CountedPtr;
47 namespace vi{
class VisBuffer2;}
179 putModel (thems, rec, validfields, spws, starts, nchan, incr, iscomponentlist, incremental);
191 putModel(thems, rec, indexComb, chansel, iscomponentlist, incremental);
270 #endif // VISMODELDATA_H
static FTMachine * NEW_FT(const casacore::Record &ftrec)
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::Vector< casacore::CountedPtr< FTMachine > > getFT(const casacore::Int msId, const casacore::Int fieldId, casacore::Int spw)
static casacore::Bool isModelDefined(const casacore::Int fieldId, const casacore::MeasurementSet &thems, casacore::String &key, casacore::Int &sourceRow)
std::vector< double > Vector
static void clearModel(const casacore::MeasurementSet &thems)
std::map< std::vector< casacore::Int >, casacore::Int > clindex2_p
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 VisBuffer &vb, casacore::Vector< casacore::Vector< casacore::Int > > &retval)
get all the combinations of field, spw, scan, state in this visbuffer
Object to provide MODEL_DATA visibilities on demand.
static casacore::Bool initialize
casacore::Block< casacore::Vector< casacore::Double > > flatholder_p
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.
casacore::Bool isVersion2()
static casacore::Int firstSourceRowRecord(const casacore::Int field, const casacore::MeasurementSet &theMS, casacore::TableRecord &rec)
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
casacore::Cube< casacore::Int > ftindex_p
casacore::Block< casacore::Vector< casacore::CountedPtr< ComponentList > > > clholder_p
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 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)
casacore::Cube< casacore::Int > clindex_p
virtual ~VisModelData()
From a FTMachine Record VisModelData(const casacore::Record& ftmachinerec, const casacore::Vector<cas...
static casacore::Bool removeFTFromRec(casacore::TableRecord &therec, const casacore::String &keyval, const casacore::Bool relabel=true)
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)
casacore::CountedPtr< ComponentFTMachine > cft_p
casacore::Bool getModelVis(VisBuffer &vb)
put the model data for this VisBuffer in the modelVisCube
Referenced counted pointer for constant data.
static casacore::Bool putModelRecord(const casacore::Vector< casacore::Int > &fieldIds, casacore::TableRecord &theRec, casacore::MeasurementSet &theMS)
void init(const vi::VisBuffer2 &)
VisModelData()
empty constructor
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 ...
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...
A hierarchical collection of named fields of various types.
bool Bool
Define the standard types used by Casacore.
void addModel(const casacore::RecordInterface &rec, const casacore::Vector< casacore::Int > &msids, const VisBuffer &vb)
add componentlists or ftmachines
casacore::Vector< casacore::CountedPtr< ComponentList > > getCL(const casacore::Int msId, const casacore::Int fieldId, casacore::Int spw)
A hierarchical collection of named fields of various types.
A Table intended to hold astronomical data (a set of Measurements).
void getMatchingMachines(casacore::Vector< casacore::CountedPtr< FTMachine > > &ft, casacore::Vector< casacore::CountedPtr< ComponentList > > &cl, const VisBuffer &vb)
static void modifyDiskImagePath(casacore::Record &rec, const VisBuffer &vb)
void init(const VisBuffer &vb)
init has to be called once at least to make sure isVersion2 to be correct
VisBuffer2s encapsulate one chunk of visibility data for processing.
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...
Base class for all Casacore library errors.
static void deleteDiskImage(casacore::MeasurementSet &theMS, const casacore::String &theKey)
String: the storage and methods of handling collections of characters.
VisBuffers encapsulate one chunk of visibility data for processing.
Abstract base class for Record classes.
static casacore::Bool removeSpwFromMachineRec(casacore::RecordInterface &ftclrec, const casacore::Vector< casacore::Int > &spws)
static casacore::Bool removeSpw(casacore::TableRecord &therec, const casacore::Vector< casacore::Int > &spws, const casacore::Vector< casacore::Int > &fields=casacore::Vector< casacore::Int >(0))
static casacore::Bool addToRec(casacore::TableRecord &therec, const casacore::Vector< casacore::Int > &spws)
void clearModelI(const casacore::MeasurementSet &thems)
helper function to clear the keywordSet of the ms of the model for the fields in that ms ...
casacore::Block< casacore::Vector< casacore::CountedPtr< FTMachine > > > ftholder_p
void updateHolders(const VisBuffer &vb, const std::vector< casacore::Int > &index)
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
static void listModel(const casacore::MeasurementSet &thems)
casacore::List the fields
defines interface for the Fourier Transform Machine
static casacore::Bool getModelRecord(const casacore::String &theKey, casacore::TableRecord &theRec, const casacore::MeasurementSet &theMs)
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.