AlmaTI2MS.h
Classes
- AlmaTI2MS -- AlmaTI2MS: Convert ALMA-TI data to MS format (full description)
Types
- NONE = 0
-
No channel-zero data
- TIME_SAMPLED = 1
-
Time-sampled (1s) channel-zero data
- TIME_AVG = 2
-
Time-averaged channel-zero data
Interface
- Public Members
- AlmaTI2MS(const Path& tapeDevice, const String& msOut, const Bool& overWrite)
- AlmaTI2MS(const String& inFile, const String& msOut, const Bool& overWrite)
- ~AlmaTI2MS()
- void setOptions(Bool compress=True, Bool combineBaseBand=True)
- void selectFiles(const Vector<Int>& files)
- void select(const Vector<String>& obsMode, const String& chanZero)
- Bool fill()
- static MeasurementSet emptyMS(const Path& tableName, const Bool compress=True, const Bool overwrite=False)
- static void fitsErrorHandler(const char*, FITSError::ErrorLevel)
- Protected Members
- void init(const String& dataSource, const FITS::FitsDevice& deviceType, const String& msOut, const Bool& overWrite)
- void readFITSFile(Bool& atEnd)
- void createOutputMS()
- Private Members
- void readPrimaryHeader(FitsInput& infits)
- void readDataParTable(BinaryTable& bintab)
- void readMonitorTable(BinaryTable& bintab)
- void readCalibrTable(BinaryTable& bintab)
- void readCorrDataTable(BinaryTable& bintab)
- void processCorrData()
- void readAutoDataTable(BinaryTable& bintab)
- void readHoloDataTable(BinaryTable& bintab)
- Int matchOrAddFieldId(const String& fieldName, const String& calCode, const MEpoch& date, const MDirection& fieldDirection, const Int& sourceId)
- Int matchOrAddSourceId(const String& sourceName, const String& calCode, const MEpoch& date, const MDirection& sourceDirection, Int& row)
- Int matchOrAddAntennaId(const Int& nameId, const Int& stationId, const Vector<Double>& position, const Float& offset)
- Int matchOrAddFeedId(const Int& antennaId, const Vector<String>& polznType, const Vector<Float>& receptorAngle, const MEpoch& date, Int& row)
- Int matchOrAddSpwId(const Vector<MFrequency>& chanFreq, const Vector<MVFrequency>& chanWidth, const Double& tol, const Int& sideBand, const String& freqGrpName)
- Int matchOrAddPolznId(const Vector<Int>& corrType, const Matrix<Int>& corrProduct)
- Int matchOrAddDataDescId(const Int& spwId, const Int& polznId)
- Int matchOrAddObsId(const String& projectCode)
Prerequisite
Etymology
From "ALMA", "test interferometer" and "Measurement Set"
Synopsis
The AlmaTI2MS class converts ALMA-TI data, on tape or disk,
to MeasurementSet (MS) format.
Example
Motivation
Encapsulate all ALMA-TI to MS conversion capabilities.
To Do
(i) General input filtering.
(ii) Convert all sub-tables
Member Description
AlmaTI2MS(const Path& tapeDevice, const String& msOut, const Bool& overWrite)
Construct from a tape device name and MS output file name
AlmaTI2MS(const String& inFile, const String& msOut, const Bool& overWrite)
Construct from an input file name and an MS output file name
Destructor
void setOptions(Bool compress=True, Bool combineBaseBand=True)
Set general options (MS compression and baseband concatenation)
Set which files are selected (1-rel; for tape-based data)
General data selection: observation mode and channel-zero selection
Convert the ALMA-TI data to MS format
static MeasurementSet emptyMS(const Path& tableName, const Bool compress=True, const Bool overwrite=False)
Construct an empty MeasurementSet with the supplied table name,
with or without compression enabled. Throw an exception (AipsError)
if the specified Table already exists unless the overwrite argument
is set to True.
A FITS error handler which will ignore those FITS compliance
issues in the ALMA-TI format which have no significant
impact in practice.
void init(const String& dataSource, const FITS::FitsDevice& deviceType, const String& msOut, const Bool& overWrite)
Initialization (called by all constructors)
Read and process a ALMA-TI file
Create a new, empty output MS
Channel-zero:
Read and process the primary header extension
Read and process a DATAPAR-ALMATI binary table extension
Read and process a MONITOR-ALMATI binary table extension
Read and process a CALIBR-ALMATI binary table extension
Read a CORRDATA-ALMATI binary table extension
Process pending CORRDATA-ALMATI data
Read and process an AUTODATA-ALMATI binary table extension
Read and process a HOLODATA-ALMATI binary table extension
Int matchOrAddFieldId(const String& fieldName, const String& calCode, const MEpoch& date, const MDirection& fieldDirection, const Int& sourceId)
Match an existing field id. or add a new field id.
Match an existing source id. or add a new source id.
Int matchOrAddAntennaId(const Int& nameId, const Int& stationId, const Vector<Double>& position, const Float& offset)
Match an existing antenna id. or add a new antenna id.
Int matchOrAddFeedId(const Int& antennaId, const Vector<String>& polznType, const Vector<Float>& receptorAngle, const MEpoch& date, Int& row)
Match an existing feed id. or add a new feed id.
Match an existing spectral window id. or add a new spectral window id.
Match an existing polarization id. or add a new polarization id.
Int matchOrAddDataDescId(const Int& spwId, const Int& polznId)
Match an existing data desc. id. or add a new data desc. id.
Match an existing observation id. or add a new observation id.