casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Static Private Member Functions | List of all members
casa::MSUtil Class Reference

#include <MSUtil.h>

Public Member Functions

 MSUtil ()
 Empty Constructor if needed. More...
 

Static Public Member Functions

static void getSpwInFreqRange (casacore::Vector< casacore::Int > &spw, casacore::Vector< casacore::Int > &start, casacore::Vector< casacore::Int > &nchan, const casacore::MeasurementSet &ms, const casacore::Double freqStart, const casacore::Double freqEnd, const casacore::Double freqStep, const casacore::MFrequency::Types freqframe=casacore::MFrequency::LSRK, const casacore::Int fieldId=0)
 This method gives you the channels (and spws) that will cover the freq range provided in the frame the user stated. More...
 
static void getSpwInFreqRangeAllFields (casacore::Vector< casacore::Int > &spw, casacore::Vector< casacore::Int > &start, casacore::Vector< casacore::Int > &nchan, const casacore::MeasurementSet &ms, const casacore::Double freqStart, const casacore::Double freqEnd, const casacore::Double freqStep, const casacore::MFrequency::Types freqframe=casacore::MFrequency::LSRK)
 A version of the above for all the fields in the MS. More...
 
static void getChannelRangeFromFreqRange (casacore::Int &start, casacore::Int &nchan, const casacore::MeasurementSet &ms, const casacore::Int spw, const casacore::Double freqStart, const casacore::Double freqEnd, const casacore::Double freqStep, const casacore::MFrequency::Types freqframe=casacore::MFrequency::LSRK)
 Get the channel range in a spw and a given frequency range in given frame. More...
 
static casacore::Bool getFreqRangeInSpw (casacore::Double &freqStart, casacore::Double &freqEnd, const casacore::Vector< casacore::Int > &spw, const casacore::Vector< casacore::Int > &start, const casacore::Vector< casacore::Int > &nchan, const casacore::MeasurementSet &ms, const casacore::MFrequency::Types freqframe=casacore::MFrequency::LSRK, const casacore::Int fieldId=0, const casacore::Bool edge=true)
 The following wil provide the range of frequency convered in the frame requested by the spw, channel selection. More...
 
static casacore::Bool getFreqRangeInSpw (casacore::Double &freqStart, casacore::Double &freqEnd, const casacore::Vector< casacore::Int > &spw, const casacore::Vector< casacore::Int > &start, const casacore::Vector< casacore::Int > &nchan, const casacore::MeasurementSet &ms, const casacore::MFrequency::Types freqframe=casacore::MFrequency::LSRK, const casacore::Bool edge=true)
 This version does not use a fieldid but uses the ones in the ms. More...
 
static casacore::Bool getFreqRangeInSpw (casacore::Double &freqStart, casacore::Double &freqEnd, const casacore::Vector< casacore::Int > &spw, const casacore::Vector< casacore::Int > &start, const casacore::Vector< casacore::Int > &nchan, const casacore::MeasurementSet &ms, const casacore::MFrequency::Types freqframe, const casacore::Vector< casacore::Int > &fieldId, const casacore::Bool edge=true, const casacore::Bool useFieldsInMS=false)
 if useFieldInMS=True fieldids are ignored More...
 
static casacore::Bool getFreqRangeAndRefFreqShift (casacore::Double &freqStart, casacore::Double &freqEnd, casacore::Quantity &sysvel, const casacore::MEpoch &refEp, const casacore::Vector< casacore::Int > &spw, const casacore::Vector< casacore::Int > &start, const casacore::Vector< casacore::Int > &nchan, const casacore::MeasurementSet &ms, const casacore::String &ephemPath=casacore::String(""), const casacore::MDirection &trackDir=casacore::MDirection(casacore::MDirection::APP), const casacore::Bool fromEdge=true)
 This version gets the range of frequency in SOURCE frame for an ephem source either trackDIr should be a known planet or ephemPath should not be an empty string. More...
 
static casacore::Vector
< casacore::String
getSpectralFrames (casacore::Vector< casacore::MFrequency::Types > &types, const casacore::MeasurementSet &ms)
 Return all the selected SPW types selected in the selected casacore::MS if the input ms is a reference MS. More...
 
static void getIndexCombination (const casacore::ROMSColumns &mscol, casacore::Matrix< casacore::Int > &retval)
 

Static Private Member Functions

static void rejectConsecutive (const casacore::Vector< casacore::Double > &t, casacore::Vector< casacore::Double > &retval, casacore::Vector< casacore::Int > &indx)
 

Detailed Description

Definition at line 37 of file MSUtil.h.

Constructor & Destructor Documentation

casa::MSUtil::MSUtil ( )

Empty Constructor if needed.

Member Function Documentation

static void casa::MSUtil::getChannelRangeFromFreqRange ( casacore::Int start,
casacore::Int nchan,
const casacore::MeasurementSet ms,
const casacore::Int  spw,
const casacore::Double  freqStart,
const casacore::Double  freqEnd,
const casacore::Double  freqStep,
const casacore::MFrequency::Types  freqframe = casacore::MFrequency::LSRK 
)
static

Get the channel range in a spw and a given frequency range in given frame.

static casacore::Bool casa::MSUtil::getFreqRangeAndRefFreqShift ( casacore::Double freqStart,
casacore::Double freqEnd,
casacore::Quantity sysvel,
const casacore::MEpoch refEp,
const casacore::Vector< casacore::Int > &  spw,
const casacore::Vector< casacore::Int > &  start,
const casacore::Vector< casacore::Int > &  nchan,
const casacore::MeasurementSet ms,
const casacore::String ephemPath = casacore::String(""),
const casacore::MDirection trackDir = casacore::MDirection(casacore::MDirection::APP),
const casacore::Bool  fromEdge = true 
)
static

This version gets the range of frequency in SOURCE frame for an ephem source either trackDIr should be a known planet or ephemPath should not be an empty string.

Also return a systemic velocity w.r.t TOPO at the closest time in the ms of the reference epoch provided

static casacore::Bool casa::MSUtil::getFreqRangeInSpw ( casacore::Double freqStart,
casacore::Double freqEnd,
const casacore::Vector< casacore::Int > &  spw,
const casacore::Vector< casacore::Int > &  start,
const casacore::Vector< casacore::Int > &  nchan,
const casacore::MeasurementSet ms,
const casacore::MFrequency::Types  freqframe = casacore::MFrequency::LSRK,
const casacore::Int  fieldId = 0,
const casacore::Bool  edge = true 
)
static

The following wil provide the range of frequency convered in the frame requested by the spw, channel selection.

static casacore::Bool casa::MSUtil::getFreqRangeInSpw ( casacore::Double freqStart,
casacore::Double freqEnd,
const casacore::Vector< casacore::Int > &  spw,
const casacore::Vector< casacore::Int > &  start,
const casacore::Vector< casacore::Int > &  nchan,
const casacore::MeasurementSet ms,
const casacore::MFrequency::Types  freqframe = casacore::MFrequency::LSRK,
const casacore::Bool  edge = true 
)
static

This version does not use a fieldid but uses the ones in the ms.

static casacore::Bool casa::MSUtil::getFreqRangeInSpw ( casacore::Double freqStart,
casacore::Double freqEnd,
const casacore::Vector< casacore::Int > &  spw,
const casacore::Vector< casacore::Int > &  start,
const casacore::Vector< casacore::Int > &  nchan,
const casacore::MeasurementSet ms,
const casacore::MFrequency::Types  freqframe,
const casacore::Vector< casacore::Int > &  fieldId,
const casacore::Bool  edge = true,
const casacore::Bool  useFieldsInMS = false 
)
static

if useFieldInMS=True fieldids are ignored

static void casa::MSUtil::getIndexCombination ( const casacore::ROMSColumns mscol,
casacore::Matrix< casacore::Int > &  retval 
)
static
static casacore::Vector<casacore::String> casa::MSUtil::getSpectralFrames ( casacore::Vector< casacore::MFrequency::Types > &  types,
const casacore::MeasurementSet ms 
)
static

Return all the selected SPW types selected in the selected casacore::MS if the input ms is a reference MS.

Else it will return all the types in the SPW table

static void casa::MSUtil::getSpwInFreqRange ( casacore::Vector< casacore::Int > &  spw,
casacore::Vector< casacore::Int > &  start,
casacore::Vector< casacore::Int > &  nchan,
const casacore::MeasurementSet ms,
const casacore::Double  freqStart,
const casacore::Double  freqEnd,
const casacore::Double  freqStep,
const casacore::MFrequency::Types  freqframe = casacore::MFrequency::LSRK,
const casacore::Int  fieldId = 0 
)
static

This method gives you the channels (and spws) that will cover the freq range provided in the frame the user stated.

The conversion from the data frame will be done properly for finding this spw, start, nchan will be resized appropriately

static void casa::MSUtil::getSpwInFreqRangeAllFields ( casacore::Vector< casacore::Int > &  spw,
casacore::Vector< casacore::Int > &  start,
casacore::Vector< casacore::Int > &  nchan,
const casacore::MeasurementSet ms,
const casacore::Double  freqStart,
const casacore::Double  freqEnd,
const casacore::Double  freqStep,
const casacore::MFrequency::Types  freqframe = casacore::MFrequency::LSRK 
)
static

A version of the above for all the fields in the MS.

static void casa::MSUtil::rejectConsecutive ( const casacore::Vector< casacore::Double > &  t,
casacore::Vector< casacore::Double > &  retval,
casacore::Vector< casacore::Int > &  indx 
)
staticprivate

The documentation for this class was generated from the following file: