casa
$Rev:20696$
|
FITSIDItoMS converts a FITS-IDI file to a CASA Measurement Set. More...
#include <FitsIDItoMS.h>
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 | |
void | fixEpochReferences () |
fix up the EPOCH MEASURE_REFERENCE keywords | |
void | updateTables (const String &tabName) |
update the Polarization table | |
const TableDesc & | getDescriptor () |
Get an appropriate TableDesc (this is the same TableDesc used to construct any Table objects returned by this class. | |
TableRecord & | getKeywords () |
Return the Table keywords (this is the same TableRecord used in any Table objects returned by this class. | |
const Table & | thisRow () |
Get a Table with a single row, the current row of the FITS table. | |
const Table & | nextRow () |
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) |
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< Int > | itsNelem |
The number of elements for each column of the BinaryTableExtension. | |
Vector< Bool > | itsIsArray |
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< String > | itsMSKC |
Vector< String > | itsMSKN |
Vector< String > | itsMSKV |
Vector< Bool > | itsgotMSK |
FitsInput & | infile_p |
String | msFile_p |
Vector< Int > | nPixel_p |
Vector< Int > | corrType_p |
Block< Int > | corrIndex_p |
Matrix< Int > | corrProduct_p |
Vector< String > | coordType_p |
Vector< Double > | refVal_p |
Vector< Double > | refPix_p |
Vector< Double > | delta_p |
String | object_p |
String | timsys_p |
Double | epoch_p |
Int | nAnt_p |
Vector< Double > | receptorAngle_p |
MFrequency::Types | freqsys_p |
Double | restfreq_p |
LogIO * | itsLog |
Int | nIF_p |
Double | startTime_p |
Double | lastTime_p |
Int | itsObsType |
MeasurementSet | ms_p |
MSColumns * | msc_p |
Bool | uv_data_hasWeights_p |
Bool | weightKwPresent_p |
Bool | weightypKwPresent_p |
String | weightyp_p |
Matrix< Float > | weightsFromKW_p |
Static Private Attributes | |
static String | array_p |
static Double | rdate |
static Bool | firstMain |
static SimpleOrderedMap< Int, Int > | antIdFromNo |
FITSIDItoMS converts a FITS-IDI file to a CASA Measurement Set.
Public interface
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.
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.
We need a way to get FITS-IDI data (typically from VLBI observations) into CASA.
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.
casa::FITSIDItoMS1::FITSIDItoMS1 | ( | FitsInput & | in, |
const Int & | obsType = 0 , |
||
const Bool & | initFirstMain = True |
||
) |
The only constructor is from a FitsInput.
void casa::FITSIDItoMS1::convertKeywords | ( | ) | [private] |
Build part of the keywords of the itsCurRowTab.
void casa::FITSIDItoMS1::convertMSKeywords | ( | ) | [private] |
Convert the MS-specific keywords in the FITS binary table.
void casa::FITSIDItoMS1::describeColumns | ( | ) | [private] |
Convert FITS field descriptions to TableColumn descriptions.
void casa::FITSIDItoMS1::fillAntennaTable | ( | ) |
Read a binary table extension of type ANTENNA and create an antenna table void fillAntennaTable(BinaryTable& bt);.
void casa::FITSIDItoMS1::fillFeedTable | ( | ) |
fill the Feed table with minimal info needed for synthesis processing
void casa::FITSIDItoMS1::fillFieldTable | ( | ) |
fill the Field table void fillFieldTable(Int nField);
void casa::FITSIDItoMS1::fillMSMainTable | ( | const String & | MSFileName, |
Int & | nField, | ||
Int & | nSpW | ||
) | [protected] |
Fill the main table from the Primary group data.
void casa::FITSIDItoMS1::fillObsTables | ( | ) |
Fill the Observation and ObsLog tables.
void casa::FITSIDItoMS1::fillRow | ( | ) | [private] |
Fill in each row as needed.
fill the Spectral Window table
fix up the EPOCH MEASURE_REFERENCE keywords
void casa::FITSIDItoMS1::getAxisInfo | ( | ) | [protected] |
Read the axis info, throws an exception if required axes are missing.
const TableDesc& casa::FITSIDItoMS1::getDescriptor | ( | ) |
Return the Table keywords (this is the same TableRecord used in any Table objects returned by this class.
Bool casa::FITSIDItoMS1::isfirstMain | ( | ) | [inline] |
is this the first UV_DATA extension
Definition at line 199 of file FitsIDItoMS.h.
References firstMain.
Float casa::FITSIDItoMS1::msVersion | ( | ) | const [inline] |
Get the version of the archived MS.
Definition at line 190 of file FitsIDItoMS.h.
References itsVersion.
const Table& casa::FITSIDItoMS1::nextRow | ( | ) |
Table casa::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 casa::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 casa::FITSIDItoMS1::setupMeasurementSet | ( | const String & | MSFileName, |
Bool | useTSM = True , |
||
Bool | mainTbl = 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& casa::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 casa::FITSIDItoMS1::updateTables | ( | const String & | tabName | ) |
update the Polarization table
SimpleOrderedMap<Int,Int> casa::FITSIDItoMS1::antIdFromNo [static, private] |
Definition at line 279 of file FitsIDItoMS.h.
String casa::FITSIDItoMS1::array_p [static, private] |
Definition at line 258 of file FitsIDItoMS.h.
Vector<String> casa::FITSIDItoMS1::coordType_p [private] |
Definition at line 256 of file FitsIDItoMS.h.
Block<Int> casa::FITSIDItoMS1::corrIndex_p [private] |
Definition at line 254 of file FitsIDItoMS.h.
Matrix<Int> casa::FITSIDItoMS1::corrProduct_p [private] |
Definition at line 255 of file FitsIDItoMS.h.
Vector<Int> casa::FITSIDItoMS1::corrType_p [private] |
Definition at line 253 of file FitsIDItoMS.h.
Vector<Double> casa::FITSIDItoMS1::delta_p [private] |
Definition at line 257 of file FitsIDItoMS.h.
Double casa::FITSIDItoMS1::epoch_p [private] |
Definition at line 260 of file FitsIDItoMS.h.
Bool casa::FITSIDItoMS1::firstMain [static, private] |
Definition at line 273 of file FitsIDItoMS.h.
Referenced by isfirstMain().
Definition at line 264 of file FitsIDItoMS.h.
FitsInput& casa::FITSIDItoMS1::infile_p [private] |
Definition at line 251 of file FitsIDItoMS.h.
Table casa::FITSIDItoMS1::itsCurRowTab [private] |
The scratch table containing the current row.
Definition at line 220 of file FitsIDItoMS.h.
Vector<Bool> casa::FITSIDItoMS1::itsgotMSK [private] |
Definition at line 248 of file FitsIDItoMS.h.
Vector<Bool> casa::FITSIDItoMS1::itsIsArray [private] |
For each column: is it an array?
Definition at line 227 of file FitsIDItoMS.h.
TableRecord casa::FITSIDItoMS1::itsKwSet [private] |
Table keyword set.
Definition at line 230 of file FitsIDItoMS.h.
LogIO* casa::FITSIDItoMS1::itsLog [private] |
Definition at line 266 of file FitsIDItoMS.h.
Vector<String> casa::FITSIDItoMS1::itsMSKC [private] |
Definition at line 245 of file FitsIDItoMS.h.
Vector<String> casa::FITSIDItoMS1::itsMSKN [private] |
Definition at line 246 of file FitsIDItoMS.h.
Vector<String> casa::FITSIDItoMS1::itsMSKV [private] |
Definition at line 247 of file FitsIDItoMS.h.
Vector<Int> casa::FITSIDItoMS1::itsNelem [private] |
The number of elements for each column of the BinaryTableExtension.
Definition at line 224 of file FitsIDItoMS.h.
uInt casa::FITSIDItoMS1::itsNrMSKs [private] |
Buffer for storing the MSK's, MS-specific FITS keywords.
Definition at line 244 of file FitsIDItoMS.h.
Int casa::FITSIDItoMS1::itsObsType [private] |
Definition at line 270 of file FitsIDItoMS.h.
TableDesc casa::FITSIDItoMS1::itsTableDesc [private] |
Table descriptor for construction.
Definition at line 233 of file FitsIDItoMS.h.
TableInfo casa::FITSIDItoMS1::itsTableInfo [private] |
Table info.
Definition at line 236 of file FitsIDItoMS.h.
Float casa::FITSIDItoMS1::itsVersion [private] |
Double casa::FITSIDItoMS1::lastTime_p [private] |
Definition at line 269 of file FitsIDItoMS.h.
MeasurementSet casa::FITSIDItoMS1::ms_p [private] |
Definition at line 271 of file FitsIDItoMS.h.
MSColumns* casa::FITSIDItoMS1::msc_p [private] |
Definition at line 272 of file FitsIDItoMS.h.
String casa::FITSIDItoMS1::msFile_p [private] |
Definition at line 252 of file FitsIDItoMS.h.
Int casa::FITSIDItoMS1::nAnt_p [private] |
Definition at line 262 of file FitsIDItoMS.h.
Int casa::FITSIDItoMS1::nIF_p [private] |
Definition at line 267 of file FitsIDItoMS.h.
Vector<Int> casa::FITSIDItoMS1::nPixel_p [private] |
Definition at line 253 of file FitsIDItoMS.h.
String casa::FITSIDItoMS1::object_p [private] |
Definition at line 259 of file FitsIDItoMS.h.
Double casa::FITSIDItoMS1::rdate [static, private] |
Definition at line 261 of file FitsIDItoMS.h.
Vector<Double> casa::FITSIDItoMS1::receptorAngle_p [private] |
Definition at line 263 of file FitsIDItoMS.h.
Vector<Double> casa::FITSIDItoMS1::refPix_p [private] |
Definition at line 257 of file FitsIDItoMS.h.
Vector<Double> casa::FITSIDItoMS1::refVal_p [private] |
Definition at line 257 of file FitsIDItoMS.h.
Double casa::FITSIDItoMS1::restfreq_p [private] |
Definition at line 265 of file FitsIDItoMS.h.
Double casa::FITSIDItoMS1::startTime_p [private] |
Definition at line 268 of file FitsIDItoMS.h.
String casa::FITSIDItoMS1::timsys_p [private] |
Definition at line 259 of file FitsIDItoMS.h.
Bool casa::FITSIDItoMS1::uv_data_hasWeights_p [private] |
Definition at line 274 of file FitsIDItoMS.h.
Bool casa::FITSIDItoMS1::weightKwPresent_p [private] |
Definition at line 275 of file FitsIDItoMS.h.
Matrix<Float> casa::FITSIDItoMS1::weightsFromKW_p [private] |
Definition at line 278 of file FitsIDItoMS.h.
String casa::FITSIDItoMS1::weightyp_p [private] |
Definition at line 277 of file FitsIDItoMS.h.
Bool casa::FITSIDItoMS1::weightypKwPresent_p [private] |
Definition at line 276 of file FitsIDItoMS.h.