casacore::MSFitsInput Class Reference

UV FITS to MeasurementSet filler. More...

#include <MSFitsInput.h>

List of all members.

Public Member Functions

 MSFitsInput (const String &msFile, const String &fitsFile, const Bool NewNameStyle=False)
 This is an implementation helper class used to store 'local' data during the filling process.
 ~MSFitsInput ()
 The destructor is fairly trivial.
void readFitsFile (Int obsType=MSTileLayout::Standard)
 Read all the data from the FITS file and create the MeasurementSet.
void rotateAntennaPositions (Bool b)
 A simultaneous change to MSFitsOutput means that no longer are antenna positions being rotated when written to UVFITS.

Protected Member Functions

Bool checkInput (FitsInput &infile)
 Check that the input is a UV fits file with required contents.
void getPrimaryGroupAxisInfo ()
 Read the axis info of the primary group, throws an exception if required axes are missing.
void setupMeasurementSet (const String &MSFileName, Bool useTSM=True, Int obsType=MSTileLayout::Standard)
 Set up the MeasurementSet, including StorageManagers and fixed columns.
Read a binary table extension
of type AIPS AN and create an
antenna table *void 
fillAntennaTable (BinaryTable &bt)
void fillHistoryTable (ConstFitsKeywordList &kwl)
 Read a binary table extension and update history table.
void fillObservationTable (ConstFitsKeywordList &kwl)
 Read a binary table extension and update history table.
void getAxisInfo (ConstFitsKeywordList &)
 extract axis information
void sortPolarizations ()
 extract axis information
void fillPolarizationTable ()
void checkRequiredAxis ()
 verify that the fits contains visibility data
void fillSpectralWindowTable (BinaryTable &bt)
void fillFieldTable (BinaryTable &bt)
 fill Field table
void fillFieldTable (double, double, String)
void fillMSMainTable (BinaryTable &bt)
void fillPointingTable ()
void fillSourceTable ()
void fillFeedTable ()
 fill the Feed table with minimal info needed for synthesis processing
Fill the Observation and
ObsLog tables *void 
fillObsTables ()
void fillMSMainTableColWise (Int &nField, Int &nSpW)
 Fill the main table from the Primary group data if we have enough memory try to do it in mem.
void fillMSMainTable (Int &nField, Int &nSpW)
 else do it row by row
void fillSpectralWindowTable (BinaryTable &bt, Int nSpW)
 fill spectralwindow table from FITS FQ table + header info
void fillSpectralWindowTable ()
 fill spectralwindow table from header
void fillFieldTable (BinaryTable &bt, Int nField)
 fill Field table from FITS SU table
void fillFieldTable (Int nField)
 fill Field table from header (single source fits)
void fillExtraTables ()
 fill the Pointing table (from Field table, all antennas are assumed to point in the field direction) and possibly the Source table.
void fixEpochReferences ()
 fix up the EPOCH MEASURE_REFERENCE keywords using the value found in the (last) AN table
MDirection::Types getDirectionFrame (Double epoch)
 Returns the Direction Measure reference for UVW and other appropriate columns in msc_p (which must exist but have empty columns before you can set it!).
void setFreqFrameVar (BinaryTable &binTab)
 Check the frame if there is an SU table.
void updateSpectralWindowTable ()
 update a the Spectral window post filling if necessary
void readRandomGroupUVFits (Int obsType)
void readPrimaryTableUVFits (Int obsType)

Private Member Functions

 MSFitsInput ()
 MSFitsInput (const MSFitsInput &other)
MSFitsInputoperator= (const MSFitsInput &other)
std::pair< Int, Int_extractAntennas (Float baseline)

Private Attributes

FitsInput_infile
String _msFile
MSPrimaryGroupHolder _priGroup
MSPrimaryTableHolder _priTable
MeasurementSet _ms
MSColumns_msc
Int _nIF
Vector< Int_nPixel
Vector< Int_corrType
Block< Int_corrIndex
Matrix< Int_corrProduct
Vector< String_coordType
Vector< Double_refVal
Vector< Double_refPix
Vector< Double_delta
String _array
String _object
String _timsys
Double _epoch
MDirection::Types _epochRef
std::set< Int_uniqueAnts
 determined by epoch_p, hence the name and type.
Int _nAntRow
 number of rows in the created MS ANTENNA table
Int _nArray
Vector< Double_receptorAngle
MFrequency::Types _freqsys
Double _restfreq
Bool _addSourceTable
LogIO _log
Record _header
Double _refFreq
Bool _useAltrval
Vector< Double_chanFreq
Bool _newNameStyle
Vector< Double_obsTime
Matrix< Double_restFreq
Matrix< Double_sysVel
Bool _msCreated
Bool _rotateAnts

Detailed Description

UV FITS to MeasurementSet filler.

Intended use:

Public interface

Prerequisite

Etymology

MSFitsInput handles the conversion of FITS files to MeasurementSets

Synopsis

UV FITS to MeasurementSet filler. This can handle single source fits and multi source fits as written by classic AIPS. Also copes with multiple arrays (i.e. multiple AN tables) but doesn't correct for 5 day offsets introduced by DBCON.

Definition at line 267 of file MSFitsInput.h.


Constructor & Destructor Documentation

casacore::MSFitsInput::MSFitsInput ( const String msFile,
const String fitsFile,
const Bool  NewNameStyle = False 
)

This is an implementation helper class used to store 'local' data during the filling process.

Create from output and input file names. This function opens the input file, and checks the output file is writable.

casacore::MSFitsInput::~MSFitsInput (  ) 

The destructor is fairly trivial.

casacore::MSFitsInput::MSFitsInput (  )  [private]
casacore::MSFitsInput::MSFitsInput ( const MSFitsInput other  )  [private]

Member Function Documentation

std::pair<Int, Int> casacore::MSFitsInput::_extractAntennas ( Float  baseline  )  [private]
Bool casacore::MSFitsInput::checkInput ( FitsInput infile  )  [protected]

Check that the input is a UV fits file with required contents.

Returns False if not ok.

void casacore::MSFitsInput::checkRequiredAxis (  )  [protected]

verify that the fits contains visibility data

Read a binary table extension of type AIPS AN and create an antenna table* void casacore::MSFitsInput::fillAntennaTable ( BinaryTable bt  )  [protected]
void casacore::MSFitsInput::fillExtraTables (  )  [protected]

fill the Pointing table (from Field table, all antennas are assumed to point in the field direction) and possibly the Source table.

void casacore::MSFitsInput::fillFeedTable (  )  [protected]

fill the Feed table with minimal info needed for synthesis processing

void casacore::MSFitsInput::fillFieldTable ( Int  nField  )  [protected]

fill Field table from header (single source fits)

void casacore::MSFitsInput::fillFieldTable ( BinaryTable bt,
Int  nField 
) [protected]

fill Field table from FITS SU table

void casacore::MSFitsInput::fillFieldTable ( double  ,
double  ,
String   
) [protected]
void casacore::MSFitsInput::fillFieldTable ( BinaryTable bt  )  [protected]

fill Field table

void casacore::MSFitsInput::fillHistoryTable ( ConstFitsKeywordList kwl  )  [protected]

Read a binary table extension and update history table.

void casacore::MSFitsInput::fillMSMainTable ( Int nField,
Int nSpW 
) [protected]

else do it row by row

void casacore::MSFitsInput::fillMSMainTable ( BinaryTable bt  )  [protected]
void casacore::MSFitsInput::fillMSMainTableColWise ( Int nField,
Int nSpW 
) [protected]

Fill the main table from the Primary group data if we have enough memory try to do it in mem.

void casacore::MSFitsInput::fillObservationTable ( ConstFitsKeywordList kwl  )  [protected]

Read a binary table extension and update history table.

Fill the Observation and ObsLog tables* void casacore::MSFitsInput::fillObsTables (  )  [protected]
void casacore::MSFitsInput::fillPointingTable (  )  [protected]
void casacore::MSFitsInput::fillPolarizationTable (  )  [protected]
void casacore::MSFitsInput::fillSourceTable (  )  [protected]
void casacore::MSFitsInput::fillSpectralWindowTable (  )  [protected]

fill spectralwindow table from header

void casacore::MSFitsInput::fillSpectralWindowTable ( BinaryTable bt,
Int  nSpW 
) [protected]

fill spectralwindow table from FITS FQ table + header info

void casacore::MSFitsInput::fillSpectralWindowTable ( BinaryTable bt  )  [protected]
void casacore::MSFitsInput::fixEpochReferences (  )  [protected]

fix up the EPOCH MEASURE_REFERENCE keywords using the value found in the (last) AN table

void casacore::MSFitsInput::getAxisInfo ( ConstFitsKeywordList  )  [protected]

extract axis information

MDirection::Types casacore::MSFitsInput::getDirectionFrame ( Double  epoch  )  [protected]

Returns the Direction Measure reference for UVW and other appropriate columns in msc_p (which must exist but have empty columns before you can set it!).

void casacore::MSFitsInput::getPrimaryGroupAxisInfo (  )  [protected]

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

MSFitsInput& casacore::MSFitsInput::operator= ( const MSFitsInput other  )  [private]
void casacore::MSFitsInput::readFitsFile ( Int  obsType = MSTileLayout::Standard  ) 

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

Throws an exception when it has severe trouble interpreting the FITS file.

void casacore::MSFitsInput::readPrimaryTableUVFits ( Int  obsType  )  [protected]
void casacore::MSFitsInput::readRandomGroupUVFits ( Int  obsType  )  [protected]
void casacore::MSFitsInput::rotateAntennaPositions ( Bool  b  )  [inline]

A simultaneous change to MSFitsOutput means that no longer are antenna positions being rotated when written to UVFITS.

Calling this method with b=True will perform the reverse of a rotation when converting from uvfits to MS for relevant UVFITS files which were written prior to this change. Else no rotation of antenna positions is done.

Definition at line 290 of file MSFitsInput.h.

References _rotateAnts.

void casacore::MSFitsInput::setFreqFrameVar ( BinaryTable binTab  )  [protected]

Check the frame if there is an SU table.

void casacore::MSFitsInput::setupMeasurementSet ( const String MSFileName,
Bool  useTSM = True,
Int  obsType = MSTileLayout::Standard 
) [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. Use obsType to choose the tiling scheme.

void casacore::MSFitsInput::sortPolarizations (  )  [protected]

extract axis information

void casacore::MSFitsInput::updateSpectralWindowTable (  )  [protected]

update a the Spectral window post filling if necessary


Member Data Documentation

Definition at line 422 of file MSFitsInput.h.

Definition at line 409 of file MSFitsInput.h.

Definition at line 427 of file MSFitsInput.h.

Definition at line 407 of file MSFitsInput.h.

Definition at line 405 of file MSFitsInput.h.

Definition at line 406 of file MSFitsInput.h.

Definition at line 404 of file MSFitsInput.h.

Definition at line 408 of file MSFitsInput.h.

Definition at line 410 of file MSFitsInput.h.

Definition at line 411 of file MSFitsInput.h.

Definition at line 420 of file MSFitsInput.h.

Definition at line 424 of file MSFitsInput.h.

Definition at line 397 of file MSFitsInput.h.

Definition at line 423 of file MSFitsInput.h.

Definition at line 401 of file MSFitsInput.h.

Definition at line 402 of file MSFitsInput.h.

Definition at line 433 of file MSFitsInput.h.

Definition at line 398 of file MSFitsInput.h.

number of rows in the created MS ANTENNA table

Definition at line 417 of file MSFitsInput.h.

Definition at line 418 of file MSFitsInput.h.

Definition at line 428 of file MSFitsInput.h.

Definition at line 403 of file MSFitsInput.h.

Definition at line 404 of file MSFitsInput.h.

Definition at line 409 of file MSFitsInput.h.

Definition at line 429 of file MSFitsInput.h.

Definition at line 399 of file MSFitsInput.h.

Definition at line 400 of file MSFitsInput.h.

Definition at line 419 of file MSFitsInput.h.

Definition at line 425 of file MSFitsInput.h.

Definition at line 408 of file MSFitsInput.h.

Definition at line 408 of file MSFitsInput.h.

Definition at line 431 of file MSFitsInput.h.

Definition at line 421 of file MSFitsInput.h.

Definition at line 433 of file MSFitsInput.h.

Referenced by rotateAntennaPositions().

Definition at line 432 of file MSFitsInput.h.

Definition at line 409 of file MSFitsInput.h.

determined by epoch_p, hence the name and type.

unique antennas found in the visibility data NOTE These are 1-based

Definition at line 415 of file MSFitsInput.h.

Definition at line 426 of file MSFitsInput.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