189 antennaids, antennaSel);
458 std::vector<casacore::Int>& oldFieldId,
459 std::vector<casacore::Int>& newDataDescId,
460 std::vector<casacore::Bool>& regrid,
462 std::vector<casacore::MDirection>& theFieldDirV,
463 std::vector<casacore::MPosition>& mObsPosV,
464 std::vector<casacore::MFrequency::Types>& fromFrameTypeV,
465 std::vector<casacore::MFrequency::Ref>& outFrameV,
466 std::vector<casacore::MRadialVelocity>& outRadVelV,
467 std::vector<casacore::Double>& weightScaleV,
471 vector< casacore::Int >& method,
504 return combineSpws(spwids,
false, temp1, temp2,
true);
606 std::map<casacore::Int, casacore::Int> >& vbmaps);
static casacore::lDouble freq_from_vopt(const casacore::lDouble vopt, const casacore::lDouble rest)
A Vector of integers, for indexing into Array<T> objects.
casacore::ROMSColumns * mscIn_p
A Measure: astronomical direction.
casacore::String combine_p
casacore::Vector< casacore::Int > fieldid_p
casacore::Vector< casacore::Int > widths_p
input channel will be used.
A 1-D Specialization of the Array class.
void fill_vbmaps(std::map< VisBufferComponents::EnumType, std::map< casacore::Int, casacore::Int > > &vbmaps)
A Measure: position on Earth.
void copySubtable(const casacore::String &tabName, const casacore::Table &inTab, const casacore::Bool noRows=false)
*** Private member functions ***
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 w...
casacore::Bool fillAllTables(const casacore::Vector< casacore::MS::PredefinedColumns > &colNames)
(Sub)table fillers.
casacore::Vector< casacore::Int > polID_p
casacore::Bool selectSource(const casacore::Vector< casacore::Int > &fieldid)
Select source or field.
casacore::Vector< casacore::Int > chanEnd_p
casacore::MSColumns * msc_p
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.
casacore::Bool areDataShapesConstant()
Returns whether or not the numbers of correlations and channels are independent of DATA_DESCRIPTION_I...
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.
casacore::Bool combineSpws(const casacore::Vector< casacore::Int > &spwids=casacore::Vector< casacore::Int >(1,-1))
std::complex< Float > Complex
Main interface class to a read/write table.
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)
casacore::Bool copyWeather()
VBRemappers remap VisBuffers.
casacore::Vector< casacore::Int > antennaId_p
double sigToWeight(casacore::Double sig)
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_DES...
static casacore::lDouble lambda(const casacore::lDouble freq)
casacore::String scanString_p
casacore::Bool copySyscal()
void selectArray(const casacore::String &subarray)
Select array IDs to use.
casacore::Vector< casacore::Int > spwRelabel_p
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.
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.
static casacore::lDouble freq_from_vrad(const casacore::lDouble vrad, const casacore::lDouble rest)
static casacore::Bool copyCols(casacore::Table &out, const casacore::Table &in, const casacore::Bool flush=true)
Like casacore::TableCopy::copyRows, but by column.
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...
casacore::Bool subtractContinuum(const casacore::Vector< casacore::MS::PredefinedColumns > &colNames, const VBRemapper &remapper)
Like doTimeAver(), but it subtracts the continuum instead of time averaging.
casacore::Vector< casacore::Vector< casacore::Int > > inPolOutCorrToInCorrMap_p
inCorrInd = outPolCorrToInCorrMap_p[polID_p[ddID]][outCorrInd]
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.
casacore::Bool doTimeAverVisIterator(const casacore::Vector< casacore::MS::PredefinedColumns > &dataColNames, const VBRemapper &remapper)
casacore::uInt remapped(const casacore::Int ov, const casacore::Vector< casacore::Int > &mapper, casacore::uInt i)
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.
ostream-like interface to creating log messages.
A Measure: radial velocity.
void setFitSpw(const casacore::String &fitspw)
Set the selection string for line-free channels.
casacore::Bool makeSelection()
method that returns the selected ms (?! - but it's Boolean - RR)
casacore::String taqlString_p
PredefinedColumns
The Main table colums with predefined meaning.
casacore::Bool keepShape_p
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.
A Measure: instant in time.
casacore::Vector< casacore::Int > selObsId_p
casacore::Bool getDataColumn(casacore::ArrayColumn< casacore::Complex > &data, const casacore::MS::PredefinedColumns colName)
casacore::Bool fillMainTable_p
continuum subtraction.
casacore::Bool copyAntenna()
Complex correlation function or lag spectrum for each correlation product Complex(Nc, Nl)
casacore::Vector< casacore::Slice > corrSlice_p
ABSTRACT CLASSES Deliberately vague to be general enough to allow for many different types of data
casacore::Bool copyPointing()
casacore::String timeRange_p
casacore::MeasurementSet ms_p
*** Member variables ***
casacore::Bool writeAllMainRows(const casacore::Vector< casacore::MS::PredefinedColumns > &colNames)
Used to be fillMainTable(colnames), but what distinguishes it from writeSomeMainRows(colnames) is tha...
double wtToSigma(casacore::Double wt)
Returns wt**-0.5 or -1, depending on whether wt is positive.
casacore::Bool copyGenericSubtables()
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
void selectTime(casacore::Double timeBin=-1.0, casacore::String timerng="")
select time parameters
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.
casacore::Bool fillFieldTable()
casacore::MeasurementSet msOut_p
Uninitialized by ctors.
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.
void setTVIDebug(bool debug)
casacore::Bool writeSomeMainRows(const casacore::Vector< casacore::MS::PredefinedColumns > &colNames)
Used to be fillAverMainTable(colnames), but what distinguishes it from writeAllMainRows(colnames) is ...
casacore::Vector< casacore::Int > chanStep_p
casacore::Bool copyProcessor()
Floating point data column.
casacore::String fitoutspw_p
A class to provide easy read-only access to MeasurementSet columns.
casacore::Vector< casacore::Int > nchan_p
casacore::String intentString_p
casacore::Vector< casacore::Int > inNumChan_p
casacore::String arrayExpr_p
casacore::Vector< casacore::Int > chanStart_p
void setWantCont(bool want_cont)
casacore::Vector< casacore::Int > fieldRelabel_p
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".
casacore::Vector< casacore::Int > spwind_to_min_spwind_p
casacore::Vector< casacore::uInt > spw2ddid_p
MSSelection: Class to represent a selection on an MS.
casacore::Bool putDataColumn(casacore::MSColumns &msc, casacore::ArrayColumn< casacore::Complex > &data, const casacore::MS::PredefinedColumns datacol, const casacore::Bool writeToDataCol=false)
bool Bool
Define the standard types used by Casacore.
static const casacore::Vector< casacore::MS::PredefinedColumns > & parseColumnNames(casacore::String colNameList)
Declared static because it's used in setupMS().
Read and write access to an array table column with arbitrary data type.
casacore::Vector< casacore::Int > oldDDSpwMatch_p
casacore::Bool copyDataFlagsWtSp(const casacore::Vector< casacore::MS::PredefinedColumns > &colNames, const casacore::Bool writeToDataCol)
This method uses VisIter for efficient copy mode data transfer.
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
static casacore::uInt dataColStrToEnums(const casacore::String &col, casacore::Vector< casacore::MS::PredefinedColumns > &colvec)
Helper function for parseColumnNames().
casacore::Bool fillDDTables()
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...
uInt nrow() const
Get the number of rows.
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. ...
casacore::Double n_bytes()
return the number of unique antennas selected casacore::Int numOfBaselines(casacore::Vector<casacore...
casacore::Matrix< casacore::Double > selTimeRanges_p
void verifyColumns(const casacore::MeasurementSet &ms, const casacore::Vector< casacore::MS::PredefinedColumns > &colNames)
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 parame...
void setFitOutSpw(const casacore::String &fitoutspw)
Selection string for output channels if doing continuum subtraction.
A hierarchical collection of named fields of various types.
casacore::Bool copyObservation()
std::map< casacore::Int, casacore::Int > stateRemapper_p
A Table intended to hold astronomical data (a set of Measurements).
casacore::Bool filterOptSubtable(const casacore::String &subtabname)
This falls between copyGenericSubtables() and the copiers for standard subtables like copyFeed()...
static casacore::lDouble freq_from_lambda(const casacore::lDouble lambda)
casacore::Bool antennaSel_p
same shape as the corresponding input one.
SubMS(casacore::String &theMS, casacore::Table::TableOption option=casacore::Table::Old)
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.
casacore::String uvrangeString_p
casacore::Vector< casacore::Int > totnchan_p
casacore::MeasurementSet mssel_p
casacore::Bool copyFlag_Cmd()
static casacore::lDouble vopt(const casacore::lDouble freq, const casacore::lDouble rest)
casacore::Bool isAllColumns(const casacore::Vector< casacore::MS::PredefinedColumns > &colNames)
// These typedefs are necessary because a<b::c> doesn't work.
casacore::Bool copyFeed()
void copyMainTableKeywords(casacore::TableRecord &outKeys, const casacore::TableRecord &inKeys)
casacore::Bool existsFlagCategory() const
Returns whether or not the input casacore::MS has a valid FLAG_CATEGORY, and its first row has the ri...
static void createSubtables(casacore::MeasurementSet &ms, casacore::Table::TableOption option)
A customized version of casacore::MS::createDefaultSubtables().
casacore::Int fitorder_p
scan #, observation, and/or state ID? Must be lowercase at all times.
const Double c
Fundamental physical constants (SI units):
casacore::Bool selectSpw(const casacore::String &spwstr, const casacore::Vector< casacore::Int > &steps)
Select spw and channels for each spw.
A class to provide easy read-write access to MeasurementSet columns.
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.
casacore::Bool fillAccessoryMainCols()
casacore::Bool writeDiffSpwShape(const casacore::Vector<casacore::MS::PredefinedColumns>& colNames); ...
String: the storage and methods of handling collections of characters.
casacore::Vector< casacore::Int > inNumCorr_p
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>& m...
casacore::Bool doChannelMods(const casacore::Vector< casacore::MS::PredefinedColumns > &colNames)
casacore::Vector< casacore::Vector< casacore::Slice > > corrSlices_p
void relabelSources()
Sets up sourceRelabel_p for mapping input SourceIDs (if any) to output ones.
casacore::Bool copyHistory()
casacore::String fitspw_p
If < 0 (default), continuum subtraction is not done.
Define the structure of a Casacore table.
casacore::Bool copySource()
casacore::Double timeBin_p
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 verifi...
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 r...
Types
Types of known MFrequencies Warning: The order defines the order in the translation matrix FromTo in...
casacore::Vector< casacore::Int > spw_uniq_p
casacore::Vector< casacore::Int > spw_p
casacore::Vector< casacore::Int > antNewIndex_p
casacore::Vector< casacore::String > antennaSelStr_p
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.
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();
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/avera...
void setMS(casacore::MeasurementSet &ms)
Change or Set the casacore::MS this casacore::MSSelector refers to.
casacore::String corrString_p
casacore::Bool copyState()
void setupNewPointing()
Sets up the stub of a POINTING, enough to create an MSColumns.
casacore::Vector< casacore::Int > sourceRelabel_p
void setFitOrder(casacore::Int fitorder, casacore::Bool advise=true)
void selectSource(casacore::Vector<casacore::String> sourceid);
void selectAntenna(const casacore::Vector< casacore::Int > &antennaids, const casacore::Vector< casacore::String > &antennaSel)
Select Antennas to split out.
casacore::Vector< casacore::Int > ncorr_p
TableOption
Define the possible options how a table can be opened.
casacore::String obsString_p
casacore::Bool selectCorrelations(const casacore::String &corrstr)
Setup polarization selection (for now, only from available correlations - no casacore::Stokes transfo...
void getDataColMap(casacore::ArrayColumn< casacore::Complex > *mapper, casacore::uInt ntok, const casacore::Vector< casacore::MS::PredefinedColumns > &colEnums)
transform(a.begin(), a.end(), std::ostream_iterator< int >(cout,"\n"), compose(unary(h), compose(unary(f), unary(f))))
Global Functions.
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.
static casacore::Bool sepFloat(const casacore::Vector< casacore::MS::PredefinedColumns > &anyDataCols, casacore::Vector< casacore::MS::PredefinedColumns > &complexDataCols)
casacore::Vector< casacore::Vector< casacore::Slice > > chanSlices_p
casacore::Vector< casacore::Int > antIndexer_p