casa
5.7.0-16
|
#include <SubMS.h>
Public Types | |
enum | RegriddingAlternatives { useFFTShift, useLinIntThenFFTShift } |
enum | asdmStManUseAlternatives { DONT, USE_FOR_DATA, USE_FOR_DATA_WEIGHT_SIGMA_FLAG } |
Public Member Functions | |
SubMS (casacore::String &theMS, casacore::Table::TableOption option=casacore::Table::Old) | |
SubMS (casacore::MeasurementSet &ms) | |
construct from an MS More... | |
virtual | ~SubMS () |
void | setMS (casacore::MeasurementSet &ms) |
Change or Set the casacore::MS this casacore::MSSelector refers to. More... | |
casacore::Bool | selectSpw (const casacore::String &spwstr, const casacore::Vector< casacore::Int > &steps) |
Select spw and channels for each spw. More... | |
void | selectSpw (casacore::Vector< casacore::Int > spw, casacore::Vector< casacore::Int > nchan, casacore::Vector< casacore::Int > start, casacore::Vector< casacore::Int > step) |
This older version is used by the older version of setmsselect(). More... | |
casacore::Bool | selectCorrelations (const casacore::String &corrstr) |
Setup polarization selection (for now, only from available correlations - no casacore::Stokes transformations.) More... | |
casacore::Bool | setmsselect (const casacore::String &spw="", const casacore::String &field="", const casacore::String &baseline="", const casacore::String &scan="", const casacore::String &uvrange="", const casacore::String &taql="", const casacore::Vector< casacore::Int > &step=casacore::Vector< casacore::Int >(1, 1), const casacore::String &subarray="", const casacore::String &correlation="", const casacore::String &intent="", const casacore::String &obs="") |
select casacore::Time and time averaging or regridding void selectTime(); More... | |
void | setmsselect (const casacore::String &spw, const casacore::String &field, const casacore::String &baseline, const casacore::String &scan, const casacore::String &obs, const casacore::String &uvrange, const casacore::String &taql, const casacore::Vector< casacore::Int > &nchan, const casacore::Vector< casacore::Int > &start, const casacore::Vector< casacore::Int > &step, const casacore::String &subarray, const casacore::String &intent="") |
This older version does not return a success value, and does need nchan, start, and step. More... | |
casacore::Bool | selectSource (const casacore::Vector< casacore::Int > &fieldid) |
Select source or field. More... | |
void | selectAntenna (const casacore::Vector< casacore::Int > &antennaids, const casacore::Vector< casacore::String > &antennaSel) |
Select Antennas to split out. More... | |
void | selectArray (const casacore::String &subarray) |
Select array IDs to use. More... | |
void | selectTime (casacore::Double timeBin=-1.0, casacore::String timerng="") |
select time parameters More... | |
void | setFitOrder (casacore::Int fitorder, casacore::Bool advise=true) |
void selectSource(casacore::Vector<casacore::String> sourceid); More... | |
void | setFitSpw (const casacore::String &fitspw) |
Set the selection string for line-free channels. More... | |
void | setFitOutSpw (const casacore::String &fitoutspw) |
Selection string for output channels if doing continuum subtraction. More... | |
casacore::Bool | makeSubMS (casacore::String &submsname, casacore::String &whichDataCol, const casacore::Vector< casacore::Int > &tileShape=casacore::Vector< casacore::Int >(1, 0), const casacore::String &combine="") |
Method to make the subMS. More... | |
virtual casacore::MeasurementSet * | makeScratchSubMS (const casacore::Vector< casacore::MS::PredefinedColumns > &whichDataCols, const casacore::Bool forceInMemory=false) |
Method to make a scratch subMS and even in memory if posssible Useful if temporary subselection/averaging is necessary It'll be in memory if the basic output ms is less than half of memory reported by casacore::HostInfo unless forced to by user... More... | |
virtual casacore::MeasurementSet * | makeScratchSubMS (const casacore::String &whichDataCol, const casacore::Bool forceInMemory=false) |
In this form whichDataCol gets passed to parseColumnNames(). More... | |
void | verifyColumns (const casacore::MeasurementSet &ms, const casacore::Vector< casacore::MS::PredefinedColumns > &colNames) |
casacore::Int | regridSpw (casacore::String &message, const casacore::String &outframe="", const casacore::String ®ridQuant="chan", const casacore::Double regridVeloRestfrq=-3E30, const casacore::String ®ridInterpMeth="LINEAR", const casacore::Double regridCenter=-3E30, const casacore::Double regridBandwidth=-1., const casacore::Double regridChanWidth=-1., const casacore::Bool doHanningSmooth=false, const casacore::Int phaseCenterFieldId=-2, casacore::MDirection phaseCenter=casacore::MDirection(), const casacore::Bool centerIsStart=false, const casacore::Bool startIsEnd=false, const casacore::Int nchan=0, const casacore::Int width=0, const casacore::Int start=-1) |
Transform spectral data to different reference frame, optionally regrid the frequency channels return values: -1 = casacore::MS not modified, 1 = casacore::MS modified and OK, 0 = casacore::MS modified but not OK (i.e. More... | |
casacore::Bool | createPartnerColumn (casacore::TableDesc &modMSTD, const casacore::String &oldName, const casacore::String &newName, const casacore::Int &hypercolumnDim, const casacore::IPosition &tileShape) |
Support method for regridSpw(): results in the column oldName being renamed to newName, and a new column which is an empty copy of oldName being created together with a TileShapeStMan data manager and hypercolumn (name copied from the old hypercolumn) with given dimension, the old hypercolumn of name hypercolumnName is renamed to name+"B". More... | |
casacore::Bool | setRegridParameters (std::vector< casacore::Int > &oldSpwId, std::vector< casacore::Int > &oldFieldId, std::vector< casacore::Int > &newDataDescId, std::vector< casacore::Bool > ®rid, std::vector< casacore::Bool > &transform, std::vector< casacore::MDirection > &theFieldDirV, std::vector< casacore::MPosition > &mObsPosV, std::vector< casacore::MFrequency::Types > &fromFrameTypeV, std::vector< casacore::MFrequency::Ref > &outFrameV, std::vector< casacore::MRadialVelocity > &outRadVelV, std::vector< casacore::Double > &weightScaleV, std::vector< casacore::Vector< casacore::Double > > &xold, std::vector< casacore::Vector< casacore::Double > > &xout, std::vector< casacore::Vector< casacore::Double > > &xin, vector< casacore::Int > &method, casacore::Bool &msMod, const casacore::String &outframe, const casacore::String ®ridQuant, const casacore::Double regridVeloRestfrq, const casacore::String ®ridInterpMeth, const casacore::Double regridCenter, const casacore::Double regridBandwidth, const casacore::Double regridChanWidth, const casacore::Int regridPhaseCenterFieldId, const casacore::MDirection regridPhaseCenter, const casacore::Bool writeTables, casacore::LogIO &os, casacore::String ®ridMessage, const casacore::Bool centerIsStart=false, const casacore::Bool startIsEnd=false, const casacore::Int nchan=0, const casacore::Int width=0, const casacore::Int start=-1) |
Support method for regridSpw(): if writeTables is false, the (const) input parameters are only verified, nothing is written; return value is true if the parameters are OK. More... | |
casacore::Bool | combineSpws (const casacore::Vector< casacore::Int > &spwids, const casacore::Bool noModify, casacore::Vector< casacore::Double > &newCHAN_FREQ, casacore::Vector< casacore::Double > &newCHAN_WIDTH, casacore::Bool verbose=false) |
combineSpws(): make one spectral window from all spws given by the spwids vector More... | |
casacore::Bool | combineSpws (const casacore::Vector< casacore::Int > &spwids=casacore::Vector< casacore::Int >(1,-1)) |
void | setTVIDebug (bool debug) |
void | setWantCont (bool want_cont) |
Static Public Member Functions | |
static std::set< casacore::Int > | findBadSpws (casacore::MeasurementSet &ms, casacore::Vector< casacore::Int > spwv) |
Returns the set (possibly empty) of spectral windows that are in spwv but not listed in ms's DATA_DESCRIPTION subtable. More... | |
static casacore::Bool | pickAntennas (casacore::Vector< casacore::Int > &selected_antennaids, casacore::Vector< casacore::String > &selected_antenna_strs, const casacore::Vector< casacore::Int > &antennaids, const casacore::Vector< casacore::String > &antennaSel) |
static casacore::MeasurementSet * | setupMS (const casacore::String &msname, const casacore::Int nchan, const casacore::Int npol, const casacore::String &telescop, const casacore::Vector< casacore::MS::PredefinedColumns > &colNamesTok, const casacore::Int obstype=0, const casacore::Bool compress=false, const asdmStManUseAlternatives asdmStManUse=DONT) |
This sets up a default new ms Declared static as it can be (and is) called directly outside of SubMS. More... | |
static casacore::MeasurementSet * | setupMS (const casacore::String &msname, const casacore::Int nchan, const casacore::Int npol, const casacore::Vector< casacore::MS::PredefinedColumns > &colNamesTok, const casacore::Vector< casacore::Int > &tileShape=casacore::Vector< casacore::Int >(1, 0), const casacore::Bool compress=false, const asdmStManUseAlternatives asdmStManUse=DONT) |
Same as above except allowing manual tileshapes. More... | |
static casacore::uInt | addOptionalColumns (const casacore::Table &inTab, casacore::Table &outTab, const casacore::Bool beLazy=false) |
Add optional columns to outTab if present in inTab and possColNames. More... | |
static casacore::Bool | copyCols (casacore::Table &out, const casacore::Table &in, const casacore::Bool flush=true) |
Like casacore::TableCopy::copyRows, but by column. More... | |
static void | createSubtables (casacore::MeasurementSet &ms, casacore::Table::TableOption option) |
A customized version of casacore::MS::createDefaultSubtables(). More... | |
static const casacore::Vector < casacore::MS::PredefinedColumns > & | parseColumnNames (casacore::String colNameList) |
Declared static because it's used in setupMS(). More... | |
static const casacore::Vector < casacore::MS::PredefinedColumns > & | parseColumnNames (casacore::String colNameList, const casacore::MeasurementSet &ms) |
This version uses the casacore::MeasurementSet to check what columns are present, i.e. More... | |
static casacore::Bool | mustConvertToData (const casacore::uInt nTok, const casacore::Vector< casacore::MS::PredefinedColumns > &datacols) |
The output casacore::MS must have (at least?) 1 of DATA, FLOAT_DATA, or LAG_DATA. More... | |
static casacore::Bool | sepFloat (const casacore::Vector< casacore::MS::PredefinedColumns > &anyDataCols, casacore::Vector< casacore::MS::PredefinedColumns > &complexDataCols) |
static casacore::Bool | getCorrMaps (casacore::MSSelection &mssel, const casacore::MeasurementSet &ms, casacore::Vector< casacore::Vector< casacore::Int > > &outToIn, const casacore::Bool areSelecting=false) |
Fills outToIn[pol] with a map from output correlation index to input correlation index, for each input polID pol. More... | |
static void | remap (casacore::Vector< casacore::Int > &col, const casacore::Vector< casacore::Int > &mapper) |
Replaces col[i] with mapper[col[i]] for each element of col. More... | |
static void | remap (casacore::Vector< casacore::Int > &col, const std::map< casacore::Int, casacore::Int > &mapper) |
static casacore::lDouble | vrad (const casacore::lDouble freq, const casacore::lDouble rest) |
the following inline convenience methods for regridSpw bypass the whole CASA measure system because when they are used, they can assume that the frame stays the same and the units are OK More... | |
static casacore::lDouble | vopt (const casacore::lDouble freq, const casacore::lDouble rest) |
static casacore::lDouble | lambda (const casacore::lDouble freq) |
static casacore::lDouble | freq_from_vrad (const casacore::lDouble vrad, const casacore::lDouble rest) |
static casacore::lDouble | freq_from_vopt (const casacore::lDouble vopt, const casacore::lDouble rest) |
static casacore::lDouble | freq_from_lambda (const casacore::lDouble lambda) |
static casacore::Bool | regridChanBounds (casacore::Vector< casacore::Double > &newChanLoBound, casacore::Vector< casacore::Double > &newChanHiBound, const casacore::Double regridCenter, const casacore::Double regridBandwidth, const casacore::Double regridChanWidth, const casacore::Double regridVeloRestfrq, const casacore::String regridQuant, const casacore::Vector< casacore::Double > &transNewXin, const casacore::Vector< casacore::Double > &transCHAN_WIDTH, casacore::String &message, const casacore::Bool centerIsStart=false, const casacore::Bool startIsEnd=false, const casacore::Int nchan=0, const casacore::Int width=0, const casacore::Int start=-1) |
Support method for regridSpw(): calculate the final new channel boundaries from the regridding parameters and the old channel boundaries (already transformed to the desired reference frame); returns false if input paramters were invalid and no useful boundaries could be created. More... | |
static casacore::Bool | convertGridPars (casacore::LogIO &os, const casacore::String &mode, const int nchan, const casacore::String &start, const casacore::String &width, const casacore::String &interp, const casacore::String &restfreq, const casacore::String &outframe, const casacore::String &veltype, casacore::String &t_mode, casacore::String &t_outframe, casacore::String &t_regridQuantity, casacore::Double &t_restfreq, casacore::String &t_regridInterpMeth, casacore::Double &t_cstart, casacore::Double &t_bandwidth, casacore::Double &t_cwidth, casacore::Bool &t_centerIsStart, casacore::Bool &t_startIsEnd, casacore::Int &t_nchan, casacore::Int &t_width, casacore::Int &t_start) |
a helper function for handling the gridding parameter user input More... | |
static casacore::Bool | calcChanFreqs (casacore::LogIO &os, casacore::Vector< casacore::Double > &newCHAN_FREQ, casacore::Vector< casacore::Double > &newCHAN_WIDTH, const casacore::Vector< casacore::Double > &oldCHAN_FREQ, const casacore::Vector< casacore::Double > &oldCHAN_WIDTH, const casacore::MDirection phaseCenter, const casacore::MFrequency::Types theOldRefFrame, const casacore::MEpoch theObsTime, const casacore::MPosition mObsPos, const casacore::String &mode, const int nchan, const casacore::String &start, const casacore::String &width, const casacore::String &restfreq, const casacore::String &outframe, const casacore::String &veltype, const casacore::Bool verbose=false, const casacore::MRadialVelocity mRV=casacore::MRadialVelocity()) |
A wrapper for SubMS::regridChanBounds() which takes the user interface type gridding parameters The ready-made grid is returned in newCHAN_FREQ and newCHAN_WIDTH. More... | |
static casacore::Bool | calcChanFreqs (casacore::LogIO &os, casacore::Vector< casacore::Double > &newCHAN_FREQ, casacore::Vector< casacore::Double > &newCHAN_WIDTH, casacore::Double &weightScale, const casacore::Vector< casacore::Double > &oldCHAN_FREQ, const casacore::Vector< casacore::Double > &oldCHAN_WIDTH, const casacore::MDirection phaseCenter, const casacore::MFrequency::Types theOldRefFrame, const casacore::MEpoch theObsTime, const casacore::MPosition mObsPos, const casacore::String &mode, const int nchan, const casacore::String &start, const casacore::String &width, const casacore::String &restfreq, const casacore::String &outframe, const casacore::String &veltype, const casacore::Bool verbose=false, const casacore::MRadialVelocity mRV=casacore::MRadialVelocity()) |
Overloaded version of the above method returning the additional value weightScale which is the factor by which WEIGHT needs to be scaled when transforming from the old grid to the new grid. More... | |
static void | getDataColMap (casacore::MSColumns *msc, casacore::ArrayColumn< casacore::Complex > *mapper, casacore::uInt ntok, const casacore::Vector< casacore::MS::PredefinedColumns > &colEnums) |
Fills mapper[ntok] with a map from dataColumn indices to ArrayColumns in the output. More... | |
Protected Member Functions | |
casacore::Bool | makeSelection () |
method that returns the selected ms (?! - but it's Boolean - RR) More... | |
casacore::Bool | fillAllTables (const casacore::Vector< casacore::MS::PredefinedColumns > &colNames) |
(Sub)table fillers. More... | |
casacore::Bool | fillDDTables () |
casacore::Bool | fillFieldTable () |
casacore::Bool | writeAllMainRows (const casacore::Vector< casacore::MS::PredefinedColumns > &colNames) |
Used to be fillMainTable(colnames), but what distinguishes it from writeSomeMainRows(colnames) is that it is for cases where there is a 1-1 match between rows in mssel_p and msOut_p (including order). More... | |
casacore::Bool | writeSomeMainRows (const casacore::Vector< casacore::MS::PredefinedColumns > &colNames) |
Used to be fillAverMainTable(colnames), but what distinguishes it from writeAllMainRows(colnames) is that it is for cases where there is not necessarily a 1-1 match between rows in mssel_p and msOut_p. More... | |
casacore::Bool | copyAntenna () |
casacore::Bool | copyFeed () |
casacore::Bool | copyFlag_Cmd () |
casacore::Bool | copyHistory () |
casacore::Bool | copyObservation () |
casacore::Bool | copyPointing () |
casacore::Bool | copyProcessor () |
casacore::Bool | copySource () |
casacore::Bool | copyState () |
casacore::Bool | copySyscal () |
casacore::Bool | copyWeather () |
casacore::Bool | copyGenericSubtables () |
void | copyMainTableKeywords (casacore::TableRecord &outKeys, const casacore::TableRecord &inKeys) |
casacore::Bool | filterOptSubtable (const casacore::String &subtabname) |
This falls between copyGenericSubtables() and the copiers for standard subtables like copyFeed(). More... | |
casacore::Bool | fillAccessoryMainCols () |
casacore::Bool writeDiffSpwShape(const casacore::Vector<casacore::MS::PredefinedColumns>& colNames); More... | |
void | copySubtable (const casacore::String &tabName, const casacore::Table &inTab, const casacore::Bool noRows=false) |
*** Private member functions *** More... | |
casacore::Bool | getDataColumn (casacore::ArrayColumn< casacore::Complex > &data, const casacore::MS::PredefinedColumns colName) |
casacore::Bool | getDataColumn (casacore::ArrayColumn< casacore::Float > &data, const casacore::MS::PredefinedColumns colName) |
casacore::Bool | putDataColumn (casacore::MSColumns &msc, casacore::ArrayColumn< casacore::Complex > &data, const casacore::MS::PredefinedColumns datacol, const casacore::Bool writeToDataCol=false) |
casacore::Bool | putDataColumn (casacore::MSColumns &msc, casacore::ArrayColumn< casacore::Float > &data, const casacore::MS::PredefinedColumns datacol, const casacore::Bool writeToDataCol=false) |
casacore::Bool | copyDataFlagsWtSp (const casacore::Vector< casacore::MS::PredefinedColumns > &colNames, const casacore::Bool writeToDataCol) |
This method uses VisIter for efficient copy mode data transfer. More... | |
casacore::Bool | subtractContinuum (const casacore::Vector< casacore::MS::PredefinedColumns > &colNames, const VBRemapper &remapper) |
Like doTimeAver(), but it subtracts the continuum instead of time averaging. More... | |
casacore::Bool | doChannelMods (const casacore::Vector< casacore::MS::PredefinedColumns > &colNames) |
void | fill_vbmaps (std::map< VisBufferComponents::EnumType, std::map< casacore::Int, casacore::Int > > &vbmaps) |
casacore::Double | n_bytes () |
return the number of unique antennas selected casacore::Int numOfBaselines(casacore::Vector<casacore::Int>& ant1, casacore::Vector<casacore::Int>& ant2, casacore::Bool includeAutoCorr=false); More... | |
const casacore::ArrayColumn < casacore::Complex > & | right_column (const casacore::ROMSColumns *ms_p, const casacore::MS::PredefinedColumns datacol) |
Picks a reference to DATA, MODEL_DATA, CORRECTED_DATA, or LAG_DATA out of ms_p. More... | |
casacore::ArrayColumn < casacore::Complex > & | right_column (casacore::MSColumns *msclala, const casacore::MS::PredefinedColumns col, const casacore::Bool writeToDataCol) |
The writable version of the above. More... | |
casacore::uInt | fillAntIndexer (std::map< casacore::Int, casacore::Int > &antIndexer, const casacore::ROMSColumns *msc) |
Figures out the number, maximum, and index of the selected antennas. More... | |
casacore::Bool | doTimeAver (const casacore::Vector< casacore::MS::PredefinedColumns > &dataColNames, const VBRemapper &remapper) |
Read the input, time average it to timeBin_p, and write the output. More... | |
casacore::Bool | doTimeAverVisIterator (const casacore::Vector< casacore::MS::PredefinedColumns > &dataColNames, const VBRemapper &remapper) |
void | getDataColMap (casacore::ArrayColumn< casacore::Complex > *mapper, casacore::uInt ntok, const casacore::Vector< casacore::MS::PredefinedColumns > &colEnums) |
casacore::Bool | areDataShapesConstant () |
Returns whether or not the numbers of correlations and channels are independent of DATA_DESCRIPTION_ID, for both the input and output MSes. More... | |
casacore::Bool | existsFlagCategory () const |
Returns whether or not the input casacore::MS has a valid FLAG_CATEGORY, and its first row has the right number of correlations and channels. More... | |
void | relabelSources () |
Sets up sourceRelabel_p for mapping input SourceIDs (if any) to output ones. More... | |
void | relabelIDs () |
void | remapColumn (casacore::ScalarColumn< casacore::Int > &outcol, const casacore::ScalarColumn< casacore::Int > &incol, const casacore::Vector< casacore::Int > &selvals) |
Sets outcol to the indices of selvals that correspond to incol, i.e. More... | |
void | remapColumn (casacore::ScalarColumn< casacore::Int > &outcol, const casacore::ScalarColumn< casacore::Int > &incol) |
Equivalent to but slightly more efficient than remapColumn(outcol, incol, incol.getColumn()). More... | |
casacore::uInt | remapped (const casacore::Int ov, const casacore::Vector< casacore::Int > &mapper, casacore::uInt i) |
void | setupNewPointing () |
Sets up the stub of a POINTING, enough to create an MSColumns. More... | |
casacore::Bool | setSortOrder (casacore::Block< casacore::Int > &sort, const casacore::String &uncombinable="", const casacore::Bool verbose=true) const |
Sets sort to a casacore::Block of columns that a VisibilityIterator should sort by, according to combine_p. More... | |
casacore::Bool | shouldWatch (casacore::Bool &conflict, const casacore::String &col, const casacore::String &uncombinable="", const casacore::Bool verbose=true) const |
Returns whether col is (not in combine_p) || in uncombinable. More... | |
Static Protected Member Functions | |
static casacore::uInt | dataColStrToEnums (const casacore::String &col, casacore::Vector< casacore::MS::PredefinedColumns > &colvec) |
Helper function for parseColumnNames(). More... | |
static void | make_map (std::map< casacore::Int, casacore::Int > &mapper, const casacore::Vector< casacore::Int > &inv) |
static void make_map(const casacore::Vector<casacore::Int>& mscol, casacore::Vector<casacore::Int>& mapper); More... | |
static void | make_map2 (std::map< casacore::Int, casacore::Int > &mapper, const casacore::Vector< casacore::Int > &inv) |
Sets mapper to form a map from inv whose elements are mapped values. More... | |
Friends | |
class | MSTransformManager |
jagonzal: Allow TransformVisDataHandler to access protected methods and members of this class More... | |
casa::SubMS::SubMS | ( | casacore::String & | theMS, |
casacore::Table::TableOption | option = casacore::Table::Old |
||
) |
casa::SubMS::SubMS | ( | casacore::MeasurementSet & | ms | ) |
construct from an MS
|
virtual |
|
static |
Add optional columns to outTab if present in inTab and possColNames.
beLazy should only be true if outTab is in its default state. Returns the number of added columns.
|
protected |
Returns whether or not the numbers of correlations and channels are independent of DATA_DESCRIPTION_ID, for both the input and output MSes.
|
static |
A wrapper for SubMS::regridChanBounds() which takes the user interface type gridding parameters The ready-made grid is returned in newCHAN_FREQ and newCHAN_WIDTH.
newCHAN_FREQ | output |
oldCHAN_FREQ | input |
phaseCenter | the gridding parameters |
mRV | used e.g. when outframe=="SOURCE" |
|
static |
Overloaded version of the above method returning the additional value weightScale which is the factor by which WEIGHT needs to be scaled when transforming from the old grid to the new grid.
newCHAN_FREQ | output |
oldCHAN_FREQ | input |
phaseCenter | the gridding parameters |
mRV | used e.g. when outframe=="SOURCE" |
casacore::Bool casa::SubMS::combineSpws | ( | const casacore::Vector< casacore::Int > & | spwids, |
const casacore::Bool | noModify, | ||
casacore::Vector< casacore::Double > & | newCHAN_FREQ, | ||
casacore::Vector< casacore::Double > & | newCHAN_WIDTH, | ||
casacore::Bool | verbose = false |
||
) |
combineSpws(): make one spectral window from all spws given by the spwids vector
Referenced by combineSpws().
|
inline |
Definition at line 501 of file SubMS.h.
References combineSpws().
|
static |
a helper function for handling the gridding parameter user input
|
protected |
|
static |
Like casacore::TableCopy::copyRows, but by column.
|
protected |
This method uses VisIter for efficient copy mode data transfer.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
*** Private member functions ***
Adds and copies inTab to msOut_p without any filtering. tabName is the table "type", i.e. POINTING or SYSPOWER without the preceding path.
If noRows is true, the structure will be setup but no rows will be copied. (Useful for filtering)
|
protected |
|
protected |
casacore::Bool casa::SubMS::createPartnerColumn | ( | casacore::TableDesc & | modMSTD, |
const casacore::String & | oldName, | ||
const casacore::String & | newName, | ||
const casacore::Int & | hypercolumnDim, | ||
const casacore::IPosition & | tileShape | ||
) |
Support method for regridSpw(): results in the column oldName being renamed to newName, and a new column which is an empty copy of oldName being created together with a TileShapeStMan data manager and hypercolumn (name copied from the old hypercolumn) with given dimension, the old hypercolumn of name hypercolumnName is renamed to name+"B".
|
static |
A customized version of casacore::MS::createDefaultSubtables().
|
staticprotected |
Helper function for parseColumnNames().
Converts col to a list of casacore::MS::PredefinedColumnss, and returns the # of recognized data columns. static because parseColumnNames() is static.
|
protected |
|
protected |
Read the input, time average it to timeBin_p, and write the output.
The first version uses VisibilityIterator (much faster), but the second supports correlation selection using VisIterator. VisIterator should be sped up soon!
|
protected |
|
protected |
Returns whether or not the input casacore::MS has a valid FLAG_CATEGORY, and its first row has the right number of correlations and channels.
|
protected |
|
protected |
casacore::Bool writeDiffSpwShape(const casacore::Vector<casacore::MS::PredefinedColumns>& colNames);
|
protected |
(Sub)table fillers.
|
protected |
Figures out the number, maximum, and index of the selected antennas.
|
protected |
|
protected |
|
protected |
This falls between copyGenericSubtables() and the copiers for standard subtables like copyFeed().
It is for optional subtables like CALDEVICE and SYSPOWER which can be watched for by name and may need their ANTENNA_ID and SPECTRAL_WINDOW_ID columns remapped. (Technically FEED_ID, too, if split ever starts remapping feeds.)
It must be called BEFORE copyGenericSubtables()!
|
static |
Returns the set (possibly empty) of spectral windows that are in spwv but not listed in ms's DATA_DESCRIPTION subtable.
(This happens with certain calibration/hardware setups.)
|
inlinestatic |
Definition at line 340 of file SubMS.h.
References casacore::C::c.
|
inlinestatic |
Definition at line 339 of file SubMS.h.
References casacore::C::c.
|
inlinestatic |
Definition at line 338 of file SubMS.h.
References casacore::C::c.
|
static |
Fills outToIn[pol] with a map from output correlation index to input correlation index, for each input polID pol.
It does not yet check the appropriateness of the correlation selection string, so ignore the return value for now. outToIn[pol] defaults to an empty casacore::Vector if no correlations are selected for pol. That is not the same as the default "select everything in ms".
|
static |
Fills mapper[ntok] with a map from dataColumn indices to ArrayColumns in the output.
mapper must have ntok slots!
Referenced by getDataColMap().
|
inlineprotected |
Definition at line 638 of file SubMS.h.
References getDataColMap(), and msc_p.
|
protected |
|
protected |
|
inlinestatic |
Definition at line 337 of file SubMS.h.
References casacore::C::c.
|
staticprotected |
static void make_map(const casacore::Vector<casacore::Int>& mscol, casacore::Vector<casacore::Int>& mapper);
Sets mapper to to a map from the distinct values of inv, in increasing order, to 0, 1, 2,..., mapper.size() - 1.
|
staticprotected |
Sets mapper to form a map from inv whose elements are mapped values.
It skips to store in mapper if the value is -1
|
virtual |
Method to make a scratch subMS and even in memory if posssible Useful if temporary subselection/averaging is necessary It'll be in memory if the basic output ms is less than half of memory reported by casacore::HostInfo unless forced to by user...
|
virtual |
In this form whichDataCol gets passed to parseColumnNames().
|
protected |
method that returns the selected ms (?! - but it's Boolean - RR)
casacore::Bool casa::SubMS::makeSubMS | ( | casacore::String & | submsname, |
casacore::String & | whichDataCol, | ||
const casacore::Vector< casacore::Int > & | tileShape = casacore::Vector< casacore::Int >(1, 0) , |
||
const casacore::String & | combine = "" |
||
) |
Method to make the subMS.
TileShape of size 1 can have 2 values [0], and [1]...these are used in to determine the tileshape by using MSTileLayout. Otherwise it has to be a vector size 3 e.g [4, 15, 351] => a tile shape of 4 stokes, 15 channels 351 rows.
combine sets combine_p. (Columns to ignore while time averaging.)
|
inlinestatic |
The output casacore::MS must have (at least?) 1 of DATA, FLOAT_DATA, or LAG_DATA.
MODEL_DATA or CORRECTED_DATA will be converted to DATA if necessary.
Definition at line 285 of file SubMS.h.
References casacore::MSMainEnums::FLOAT_DATA, and casacore::MSMainEnums::LAG_DATA.
|
inlineprotected |
return the number of unique antennas selected
casacore::Int numOfBaselines(casacore::Vector<casacore::Int>& ant1, casacore::Vector<casacore::Int>& ant2, casacore::Bool includeAutoCorr=false);
Used in a couple of places to estimate how much memory to grab.
Definition at line 613 of file SubMS.h.
References mssel_p, nchan_p, ncorr_p, and casacore::Table::nrow().
|
static |
Declared static because it's used in setupMS().
Therefore it can't use any member variables. It is also used in MSFixvis.cc. colNameList is internally upcased, so it is not const or passed by reference.
|
static |
This version uses the casacore::MeasurementSet to check what columns are present, i.e.
it makes col=="all" smarter, and it is not necessary to call verifyColumns() after calling this. Unlike the other version, it knows about FLOAT_DATA and LAG_DATA. It throws an exception if a specifically requested column is absent.
|
static |
Referenced by casa::Partition::selectAntenna(), casa::Reweighter::selectAntenna(), and selectAntenna().
|
protected |
|
protected |
|
static |
Support method for regridSpw(): calculate the final new channel boundaries from the regridding parameters and the old channel boundaries (already transformed to the desired reference frame); returns false if input paramters were invalid and no useful boundaries could be created.
casacore::Int casa::SubMS::regridSpw | ( | casacore::String & | message, |
const casacore::String & | outframe = "" , |
||
const casacore::String & | regridQuant = "chan" , |
||
const casacore::Double | regridVeloRestfrq = -3E30 , |
||
const casacore::String & | regridInterpMeth = "LINEAR" , |
||
const casacore::Double | regridCenter = -3E30 , |
||
const casacore::Double | regridBandwidth = -1. , |
||
const casacore::Double | regridChanWidth = -1. , |
||
const casacore::Bool | doHanningSmooth = false , |
||
const casacore::Int | phaseCenterFieldId = -2 , |
||
casacore::MDirection | phaseCenter = casacore::MDirection() , |
||
const casacore::Bool | centerIsStart = false , |
||
const casacore::Bool | startIsEnd = false , |
||
const casacore::Int | nchan = 0 , |
||
const casacore::Int | width = 0 , |
||
const casacore::Int | start = -1 |
||
) |
Transform spectral data to different reference frame, optionally regrid the frequency channels return values: -1 = casacore::MS not modified, 1 = casacore::MS modified and OK, 0 = casacore::MS modified but not OK (i.e.
casacore::MS is probably damaged)
|
protected |
|
protected |
Sets up sourceRelabel_p for mapping input SourceIDs (if any) to output ones.
Must be called after fieldid_p is set and before calling fillFieldTable() or copySource().
|
static |
Replaces col[i] with mapper[col[i]] for each element of col.
Does NOT check whether mapper[col[i]] is defined, but it does return right away (i.e. a no-op) if mapper is empty.
|
static |
|
protected |
Sets outcol to the indices of selvals that correspond to incol, i.e.
outcol(i) = j s.t. selvals[j] == incol(i).
Ideally selvals is set up so that outcol's values will be row numbers in the corresponding subtable of its ms.
Throws an exception if incol and outcol do not have the same # of rows, or incol has a value that is not in selvals.
|
protected |
Equivalent to but slightly more efficient than remapColumn(outcol, incol, incol.getColumn()).
|
protected |
|
protected |
Picks a reference to DATA, MODEL_DATA, CORRECTED_DATA, or LAG_DATA out of ms_p.
FLOAT_DATA is not included because it is not natively complex.
|
protected |
The writable version of the above.
|
inline |
Select Antennas to split out.
Definition at line 185 of file SubMS.h.
References antennaId_p, antennaSel_p, antennaSelStr_p, and pickAntennas().
|
inline |
casacore::Bool casa::SubMS::selectCorrelations | ( | const casacore::String & | corrstr | ) |
Setup polarization selection (for now, only from available correlations - no casacore::Stokes transformations.)
casacore::Bool casa::SubMS::selectSource | ( | const casacore::Vector< casacore::Int > & | fieldid | ) |
Select source or field.
casacore::Bool casa::SubMS::selectSpw | ( | const casacore::String & | spwstr, |
const casacore::Vector< casacore::Int > & | steps | ||
) |
Select spw and channels for each spw.
This is the version used by split. It returns true on success and false on failure.
void casa::SubMS::selectSpw | ( | casacore::Vector< casacore::Int > | spw, |
casacore::Vector< casacore::Int > | nchan, | ||
casacore::Vector< casacore::Int > | start, | ||
casacore::Vector< casacore::Int > | step | ||
) |
This older version is used by the older version of setmsselect().
void casa::SubMS::selectTime | ( | casacore::Double | timeBin = -1.0 , |
casacore::String | timerng = "" |
||
) |
select time parameters
|
static |
void casa::SubMS::setFitOrder | ( | casacore::Int | fitorder, |
casacore::Bool | advise = true |
||
) |
void selectSource(casacore::Vector<casacore::String> sourceid);
Method to set if a phase Center rotation is needed void setPhaseCenter(casacore::Int fieldid, casacore::MDirection& newPhaseCenter);
Sets the polynomial order for continuum fitting to fitorder. If < 0, continuum subtraction is not done.
|
inline |
Selection string for output channels if doing continuum subtraction.
Definition at line 213 of file SubMS.h.
References fitoutspw_p.
|
inline |
void casa::SubMS::setMS | ( | casacore::MeasurementSet & | ms | ) |
Change or Set the casacore::MS this casacore::MSSelector refers to.
casacore::Bool casa::SubMS::setmsselect | ( | const casacore::String & | spw = "" , |
const casacore::String & | field = "" , |
||
const casacore::String & | baseline = "" , |
||
const casacore::String & | scan = "" , |
||
const casacore::String & | uvrange = "" , |
||
const casacore::String & | taql = "" , |
||
const casacore::Vector< casacore::Int > & | step = casacore::Vector< casacore::Int >(1, 1) , |
||
const casacore::String & | subarray = "" , |
||
const casacore::String & | correlation = "" , |
||
const casacore::String & | intent = "" , |
||
const casacore::String & | obs = "" |
||
) |
select casacore::Time and time averaging or regridding void selectTime();
select stuff using msselection syntax...time is left out call it separately with timebin This version returns a success value, and does not need nchan, start, and step. It is used by split.
void casa::SubMS::setmsselect | ( | const casacore::String & | spw, |
const casacore::String & | field, | ||
const casacore::String & | baseline, | ||
const casacore::String & | scan, | ||
const casacore::String & | obs, | ||
const casacore::String & | uvrange, | ||
const casacore::String & | taql, | ||
const casacore::Vector< casacore::Int > & | nchan, | ||
const casacore::Vector< casacore::Int > & | start, | ||
const casacore::Vector< casacore::Int > & | step, | ||
const casacore::String & | subarray, | ||
const casacore::String & | intent = "" |
||
) |
This older version does not return a success value, and does need nchan, start, and step.
It is used elsewhere (i.e. ImagerMultiMS).
casacore::Bool casa::SubMS::setRegridParameters | ( | std::vector< casacore::Int > & | oldSpwId, |
std::vector< casacore::Int > & | oldFieldId, | ||
std::vector< casacore::Int > & | newDataDescId, | ||
std::vector< casacore::Bool > & | regrid, | ||
std::vector< casacore::Bool > & | transform, | ||
std::vector< casacore::MDirection > & | theFieldDirV, | ||
std::vector< casacore::MPosition > & | mObsPosV, | ||
std::vector< casacore::MFrequency::Types > & | fromFrameTypeV, | ||
std::vector< casacore::MFrequency::Ref > & | outFrameV, | ||
std::vector< casacore::MRadialVelocity > & | outRadVelV, | ||
std::vector< casacore::Double > & | weightScaleV, | ||
std::vector< casacore::Vector< casacore::Double > > & | xold, | ||
std::vector< casacore::Vector< casacore::Double > > & | xout, | ||
std::vector< casacore::Vector< casacore::Double > > & | xin, | ||
vector< casacore::Int > & | method, | ||
casacore::Bool & | msMod, | ||
const casacore::String & | outframe, | ||
const casacore::String & | regridQuant, | ||
const casacore::Double | regridVeloRestfrq, | ||
const casacore::String & | regridInterpMeth, | ||
const casacore::Double | regridCenter, | ||
const casacore::Double | regridBandwidth, | ||
const casacore::Double | regridChanWidth, | ||
const casacore::Int | regridPhaseCenterFieldId, | ||
const casacore::MDirection | regridPhaseCenter, | ||
const casacore::Bool | writeTables, | ||
casacore::LogIO & | os, | ||
casacore::String & | regridMessage, | ||
const casacore::Bool | centerIsStart = false , |
||
const casacore::Bool | startIsEnd = false , |
||
const casacore::Int | nchan = 0 , |
||
const casacore::Int | width = 0 , |
||
const casacore::Int | start = -1 |
||
) |
Support method for regridSpw(): if writeTables is false, the (const) input parameters are only verified, nothing is written; return value is true if the parameters are OK.
if writeTables is true, the vectors are filled and the SPW, DD, and SOURCE tables are modified; the return value in this case is true only if a successful modification (or none) took place
|
protected |
Sets sort to a casacore::Block of columns that a VisibilityIterator should sort by, according to combine_p.
Columns that should never be combined in the calling function, i.e. spw for time averaging, should be listed in uncombinable.
verbose: log a message on error.
Returns whether or not there were any conflicts between combine_p and uncombinable.
|
inline |
|
static |
This sets up a default new ms Declared static as it can be (and is) called directly outside of SubMS.
Therefore it is not dependent on any member variable.
|
static |
Same as above except allowing manual tileshapes.
|
protected |
Sets up the stub of a POINTING, enough to create an MSColumns.
|
inline |
Definition at line 514 of file SubMS.h.
References want_cont_p.
|
protected |
Returns whether col is (not in combine_p) || in uncombinable.
Columns that should never be combined in the calling function, i.e. spw for time averaging, should be listed in uncombinable.
verbose: log a message on error.
conflict is set to true if there is a conflict between combine_p and uncombinable.
|
protected |
Like doTimeAver(), but it subtracts the continuum instead of time averaging.
Unlike doTimeAver(), it infers writeToDataCol from colNames.nelements() (subtractContinuum is intentionally not as general as copyDataFlagsWtSp), and writes according to fitoutspw_p instead of spw_p.
void casa::SubMS::verifyColumns | ( | const casacore::MeasurementSet & | ms, |
const casacore::Vector< casacore::MS::PredefinedColumns > & | colNames | ||
) |
|
inlinestatic |
Definition at line 336 of file SubMS.h.
References casacore::C::c.
|
inlinestatic |
the following inline convenience methods for regridSpw bypass the whole CASA measure system because when they are used, they can assume that the frame stays the same and the units are OK
Definition at line 335 of file SubMS.h.
References casacore::C::c.
|
protected |
Used to be fillMainTable(colnames), but what distinguishes it from writeSomeMainRows(colnames) is that it is for cases where there is a 1-1 match between rows in mssel_p and msOut_p (including order).
|
protected |
Used to be fillAverMainTable(colnames), but what distinguishes it from writeAllMainRows(colnames) is that it is for cases where there is not necessarily a 1-1 match between rows in mssel_p and msOut_p.
|
friend |
|
protected |
Definition at line 765 of file SubMS.h.
Referenced by selectAntenna().
|
protected |
same shape as the corresponding input one.
sameShape_p, // Iff true, the shapes of the arrays do not vary with row number.
Definition at line 721 of file SubMS.h.
Referenced by selectAntenna().
|
protected |
Definition at line 764 of file SubMS.h.
Referenced by selectAntenna().
|
protected |
|
protected |
|
protected |
Definition at line 732 of file SubMS.h.
Referenced by selectArray().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Definition at line 740 of file SubMS.h.
Referenced by setFitOutSpw().
|
protected |
If < 0 (default), continuum subtraction is not done.
Definition at line 739 of file SubMS.h.
Referenced by setFitSpw().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Definition at line 719 of file SubMS.h.
Referenced by getDataColMap().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Definition at line 783 of file SubMS.h.
Referenced by setTVIDebug().
|
protected |
|
protected |
Definition at line 784 of file SubMS.h.
Referenced by setWantCont().
|
protected |