AlmaTI2MS.h

Classes

AlmaTI2MS -- AlmaTI2MS: Convert ALMA-TI data to MS format (full description)

class AlmaTI2MS

Types

enum chanZeroSelection

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)

Description

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

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

~AlmaTI2MS()

Destructor

void setOptions(Bool compress=True, Bool combineBaseBand=True)

Set general options (MS compression and baseband concatenation)

void selectFiles(const Vector<Int>& files)

Set which files are selected (1-rel; for tape-based data)

void select(const Vector<String>& obsMode, const String& chanZero)

General data selection: observation mode and channel-zero selection

Bool fill()

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.

static void fitsErrorHandler(const char*, FITSError::ErrorLevel)

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)

void readFITSFile(Bool& atEnd)

Read and process a ALMA-TI file

void createOutputMS()

Create a new, empty output MS

enum chanZeroSelection

Channel-zero:

void readPrimaryHeader(FitsInput& infits)

Read and process the primary header extension

void readDataParTable(BinaryTable& bintab)

Read and process a DATAPAR-ALMATI binary table extension

void readMonitorTable(BinaryTable& bintab)

Read and process a MONITOR-ALMATI binary table extension

void readCalibrTable(BinaryTable& bintab)

Read and process a CALIBR-ALMATI binary table extension

void readCorrDataTable(BinaryTable& bintab)

Read a CORRDATA-ALMATI binary table extension

void processCorrData()

Process pending CORRDATA-ALMATI data

void readAutoDataTable(BinaryTable& bintab)

Read and process an AUTODATA-ALMATI binary table extension

void readHoloDataTable(BinaryTable& bintab)

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.

Int matchOrAddSourceId(const String& sourceName, const String& calCode, const MEpoch& date, const MDirection& sourceDirection, Int& row)

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.

Int matchOrAddSpwId(const Vector<MFrequency>& chanFreq, const Vector<MVFrequency>& chanWidth, const Double& tol, const Int& sideBand, const String& freqGrpName)

Match an existing spectral window id. or add a new spectral window id.

Int matchOrAddPolznId(const Vector<Int>& corrType, const Matrix<Int>& corrProduct)

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.

Int matchOrAddObsId(const String& projectCode)

Match an existing observation id. or add a new observation id.