casacore::FITSIDItoMS1 Class Reference

FITSIDItoMS converts a FITS-IDI file to a CASA Measurement Set. More...

#include <FitsIDItoMS.h>

Inheritance diagram for casacore::FITSIDItoMS1:
casacore::BinaryTableExtension casacore::ExtensionHeaderDataUnit casacore::HeaderDataUnit

List of all members.

Public Member Functions

 FITSIDItoMS1 (FitsInput &in, const Int &obsType=0, const Bool &initFirstMain=True)
 The only constructor is from a FitsInput.
 ~FITSIDItoMS1 ()
Table oldfullTable (const String &tabName)
 Get the full table, using the supplied arguments to construct the table.
void fillObsTables ()
 Fill the Observation and ObsLog tables.
void fillAntennaTable ()
 Read a binary table extension of type ANTENNA and create an antenna table void fillAntennaTable(BinaryTable& bt);.
void fillFeedTable ()
 fill the Feed table with minimal info needed for synthesis processing
void fillFieldTable ()
 fill the Field table void fillFieldTable(Int nField);
void fillSpectralWindowTable ()
 fill the Spectral Window table with the content of FREQUENCY
Bool fillCorrelatorModelTable ()
 fill the optional Correlator Model table with the content of INTERFEROMETER_MODEL
Bool fillSysCalTable ()
 fill the optional SysCal table with the content of SYSTEM_TEMPERATURE
Bool fillFlagCmdTable ()
 fill the optional FlagCmd table with the content of FLAG
Bool fillWeatherTable ()
 fill the optional Weather table with the content of WEATHER
Bool handleGainCurve ()
 store the information from the GAIN_CURVE table in a calibration table
Bool handlePhaseCal ()
 store the information from the PHASE-CAL table in a calibration table
Bool handleModelComps ()
 store the information from the MODEL_COMPS table
void fixEpochReferences ()
 fix up the EPOCH MEASURE_REFERENCE keywords
void updateTables (const String &tabName)
 update the Polarization table
const TableDescgetDescriptor ()
 Get an appropriate TableDesc (this is the same TableDesc used to construct any Table objects returned by this class.
TableRecordgetKeywords ()
 Return the Table keywords (this is the same TableRecord used in any Table objects returned by this class.
const TablethisRow ()
 Get a Table with a single row, the current row of the FITS table.
const TablenextRow ()
 Get a Table with a single row, the next row of the FITS table.
Float msVersion () const
 Get the version of the archived MS.
Bool readFitsFile (const String &msFile)
 Read all the data from the FITS file and create the MeasurementSet.
Bool isfirstMain ()
 is this the first UV_DATA extension

Protected Member Functions

void getAxisInfo ()
 Read the axis info, throws an exception if required axes are missing.
void setupMeasurementSet (const String &MSFileName, Bool useTSM=True, Bool mainTbl=False, Bool addCorrMod=False, Bool addSyscal=False, Bool addWeather=False)
 Set up the MeasurementSet, including StorageManagers and fixed columns.
void fillMSMainTable (const String &MSFileName, Int &nField, Int &nSpW)
 Fill the main table from the Primary group data.

Private Member Functions

void fillRow ()
 Fill in each row as needed.
void convertKeywords ()
 Build part of the keywords of the itsCurRowTab.
void describeColumns ()
 Convert FITS field descriptions to TableColumn descriptions.
void convertMSKeywords ()
 Convert the MS-specific keywords in the FITS binary table.

Private Attributes

Table itsCurRowTab
 The scratch table containing the current row.
Vector< IntitsNelem
 The number of elements for each column of the BinaryTableExtension.
Vector< BoolitsIsArray
 For each column: is it an array?
TableRecord itsKwSet
 Table keyword set.
TableDesc itsTableDesc
 Table descriptor for construction.
TableInfo itsTableInfo
 Table info.
Float itsVersion
 The MS version.
uInt itsNrMSKs
 Buffer for storing the MSK's, MS-specific FITS keywords.
Vector< StringitsMSKC
Vector< StringitsMSKN
Vector< StringitsMSKV
Vector< BoolitsgotMSK
String msFile_p
 FitsInput .
Vector< IntnPixel_p
Vector< IntcorrType_p
Block< IntcorrIndex_p
Matrix< IntcorrProduct_p
Vector< StringcoordType_p
Vector< DoublerefVal_p
Vector< DoublerefPix_p
Vector< Doubledelta_p
String object_p
String timsys_p
Double epoch_p
Int nAnt_p
Vector< DoublereceptorAngle_p
MFrequency::Types freqsys_p
Double restfreq_p
LogIOitsLog
Double startTime_p
 Int nIF_p;.
Double lastTime_p
Int itsObsType
MeasurementSet ms_p
MSColumnsmsc_p
Bool weather_hasWater_p
Bool weather_hasElectron_p
Bool uv_data_hasWeights_p
Bool weightKwPresent_p
Bool weightypKwPresent_p
String weightyp_p
Matrix< FloatweightsFromKW_p

Static Private Attributes

static String array_p
static Double rdate
static Bool firstMain
static Bool firstSyscal
static Bool firstWeather
static SimpleOrderedMap< Int, IntantIdFromNo

Detailed Description

FITSIDItoMS converts a FITS-IDI file to a CASA Measurement Set.

Intended use:

Public interface

Prerequisite

Etymology

FITSIDItoMS inherits from the FITS BinaryTableExtension class and its primary use is to convert such an object to a CASA Table. This explains it's use but not its name. A better name should be found.

Synopsis

The class starts with an already existing FitsInput object, which should be set at a BinaryTableExtension HDU. Member functions provide a TableDesc appropriate for the FITS data (to help in constructing a CASA Table compatible with the BinaryTableExtension), a Table containing the current row of FITS data and a Table containing the next row of FITS data (which can be used to step through the FitsInput, copying each row using the RowCopier class), and a Table containin the entire FITS binary table from the current row to the end of the table.

Motivation

We need a way to get FITS-IDI data (typically from VLBI observations) into CASA.

Example

Open a FitsInput from a disk file, if the HDU is a BinaryTableExtension, then instantiate a MSBinaryTable object and get the entire table. A fair amount of error checking has been eliminated from this example.

 FitsInput infits("myFITSFile", FITS::Disk);
 switch (infits.hdutype()) {
 case FITS::BinaryTableHDU:
 MSBinaryTable bintab(infits);
 Table tab = bintab.fullTable("myTable");
 break;
 }

There would obviously be other cases to the switch to deal with any other HDUs (e.g. skip them via infits.skip_hdu()). The Table destructor would write "myTable" to disk.

Definition at line 116 of file FitsIDItoMS.h.


Constructor & Destructor Documentation

casacore::FITSIDItoMS1::FITSIDItoMS1 ( FitsInput in,
const Int obsType = 0,
const Bool initFirstMain = True 
)

The only constructor is from a FitsInput.

casacore::FITSIDItoMS1::~FITSIDItoMS1 (  ) 

Member Function Documentation

void casacore::FITSIDItoMS1::convertKeywords (  )  [private]

Build part of the keywords of the itsCurRowTab.

void casacore::FITSIDItoMS1::convertMSKeywords (  )  [private]

Convert the MS-specific keywords in the FITS binary table.

void casacore::FITSIDItoMS1::describeColumns (  )  [private]

Convert FITS field descriptions to TableColumn descriptions.

void casacore::FITSIDItoMS1::fillAntennaTable (  ) 

Read a binary table extension of type ANTENNA and create an antenna table void fillAntennaTable(BinaryTable& bt);.

Bool casacore::FITSIDItoMS1::fillCorrelatorModelTable (  ) 

fill the optional Correlator Model table with the content of INTERFEROMETER_MODEL

void casacore::FITSIDItoMS1::fillFeedTable (  ) 

fill the Feed table with minimal info needed for synthesis processing

void casacore::FITSIDItoMS1::fillFieldTable (  ) 

fill the Field table void fillFieldTable(Int nField);

Bool casacore::FITSIDItoMS1::fillFlagCmdTable (  ) 

fill the optional FlagCmd table with the content of FLAG

void casacore::FITSIDItoMS1::fillMSMainTable ( const String MSFileName,
Int nField,
Int nSpW 
) [protected]

Fill the main table from the Primary group data.

void casacore::FITSIDItoMS1::fillObsTables (  ) 

Fill the Observation and ObsLog tables.

void casacore::FITSIDItoMS1::fillRow (  )  [private]

Fill in each row as needed.

void casacore::FITSIDItoMS1::fillSpectralWindowTable (  ) 

fill the Spectral Window table with the content of FREQUENCY

Bool casacore::FITSIDItoMS1::fillSysCalTable (  ) 

fill the optional SysCal table with the content of SYSTEM_TEMPERATURE

Bool casacore::FITSIDItoMS1::fillWeatherTable (  ) 

fill the optional Weather table with the content of WEATHER

void casacore::FITSIDItoMS1::fixEpochReferences (  ) 

fix up the EPOCH MEASURE_REFERENCE keywords

void casacore::FITSIDItoMS1::getAxisInfo (  )  [protected]

Read the axis info, throws an exception if required axes are missing.

const TableDesc& casacore::FITSIDItoMS1::getDescriptor (  ) 

Get an appropriate TableDesc (this is the same TableDesc used to construct any Table objects returned by this class.

TableRecord& casacore::FITSIDItoMS1::getKeywords (  ) 

Return the Table keywords (this is the same TableRecord used in any Table objects returned by this class.

Bool casacore::FITSIDItoMS1::handleGainCurve (  ) 

store the information from the GAIN_CURVE table in a calibration table

Bool casacore::FITSIDItoMS1::handleModelComps (  ) 

store the information from the MODEL_COMPS table

Bool casacore::FITSIDItoMS1::handlePhaseCal (  ) 

store the information from the PHASE-CAL table in a calibration table

Bool casacore::FITSIDItoMS1::isfirstMain (  )  [inline]

is this the first UV_DATA extension

Definition at line 220 of file FitsIDItoMS.h.

References firstMain.

Float casacore::FITSIDItoMS1::msVersion (  )  const [inline]

Get the version of the archived MS.

Definition at line 211 of file FitsIDItoMS.h.

References itsVersion.

const Table& casacore::FITSIDItoMS1::nextRow (  ) 

Get a Table with a single row, the next row of the FITS table.

The returned Table is a Scratch table. The FITS input is positioned to the next row and the values translated and returned in a Table object.

Table casacore::FITSIDItoMS1::oldfullTable ( const String tabName  ) 

Get the full table, using the supplied arguments to construct the table.

The table will contain all data from the current row to the end of the BinarTableExtension.

Bool casacore::FITSIDItoMS1::readFitsFile ( const String msFile  ) 

Read all the data from the FITS file and create the MeasurementSet.

Throws an exception when it has severe trouble interpreting the FITS file. Returns False if it encounters an unsupported extension.

void casacore::FITSIDItoMS1::setupMeasurementSet ( const String MSFileName,
Bool  useTSM = True,
Bool  mainTbl = False,
Bool  addCorrMod = False,
Bool  addSyscal = False,
Bool  addWeather = False 
) [protected]

Set up the MeasurementSet, including StorageManagers and fixed columns.

If useTSM is True, the Tiled Storage Manager will be used to store DATA, FLAG and WEIGHT_SPECTRUM

const Table& casacore::FITSIDItoMS1::thisRow (  ) 

Get a Table with a single row, the current row of the FITS table.

The returned Table is a Scratch table. The standard BinaryTableExtension manipulation functions are available to position the FITS input at the desired location.

void casacore::FITSIDItoMS1::updateTables ( const String tabName  ) 

update the Polarization table


Member Data Documentation

Definition at line 305 of file FitsIDItoMS.h.

Definition at line 280 of file FitsIDItoMS.h.

Definition at line 278 of file FitsIDItoMS.h.

Definition at line 276 of file FitsIDItoMS.h.

Definition at line 277 of file FitsIDItoMS.h.

Definition at line 275 of file FitsIDItoMS.h.

Definition at line 279 of file FitsIDItoMS.h.

Definition at line 282 of file FitsIDItoMS.h.

Definition at line 295 of file FitsIDItoMS.h.

Referenced by isfirstMain().

Definition at line 296 of file FitsIDItoMS.h.

Definition at line 297 of file FitsIDItoMS.h.

Definition at line 286 of file FitsIDItoMS.h.

The scratch table containing the current row.

Definition at line 242 of file FitsIDItoMS.h.

Definition at line 270 of file FitsIDItoMS.h.

For each column: is it an array?

Definition at line 249 of file FitsIDItoMS.h.

Table keyword set.

Definition at line 252 of file FitsIDItoMS.h.

Definition at line 288 of file FitsIDItoMS.h.

Definition at line 267 of file FitsIDItoMS.h.

Definition at line 268 of file FitsIDItoMS.h.

Definition at line 269 of file FitsIDItoMS.h.

The number of elements for each column of the BinaryTableExtension.

Definition at line 246 of file FitsIDItoMS.h.

Buffer for storing the MSK's, MS-specific FITS keywords.

Definition at line 266 of file FitsIDItoMS.h.

Definition at line 292 of file FitsIDItoMS.h.

Table descriptor for construction.

Definition at line 255 of file FitsIDItoMS.h.

Table info.

Definition at line 258 of file FitsIDItoMS.h.

The MS version.

Definition at line 261 of file FitsIDItoMS.h.

Referenced by msVersion().

Definition at line 291 of file FitsIDItoMS.h.

Definition at line 293 of file FitsIDItoMS.h.

Definition at line 294 of file FitsIDItoMS.h.

FitsInput .

Definition at line 274 of file FitsIDItoMS.h.

Definition at line 284 of file FitsIDItoMS.h.

Definition at line 275 of file FitsIDItoMS.h.

Definition at line 281 of file FitsIDItoMS.h.

Definition at line 283 of file FitsIDItoMS.h.

Definition at line 285 of file FitsIDItoMS.h.

Definition at line 279 of file FitsIDItoMS.h.

Definition at line 279 of file FitsIDItoMS.h.

Definition at line 287 of file FitsIDItoMS.h.

Int nIF_p;.

Definition at line 290 of file FitsIDItoMS.h.

Definition at line 281 of file FitsIDItoMS.h.

Definition at line 300 of file FitsIDItoMS.h.

Definition at line 299 of file FitsIDItoMS.h.

Definition at line 298 of file FitsIDItoMS.h.

Definition at line 301 of file FitsIDItoMS.h.

Definition at line 304 of file FitsIDItoMS.h.

Definition at line 303 of file FitsIDItoMS.h.

Definition at line 302 of file FitsIDItoMS.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1