Loading...
Searching...
No Matches
casacore::MSFitsInput Class Reference
msfits package (libcasa_msfits) » MSFits_module

UV FITS to MeasurementSet filler. More...

`#include <MSFitsInput.h>`

## Public Member Functions

| MSFitsInput ()=delete
| This is an implementation helper class used to store 'local' data during the filling process.
| MSFitsInput (const String &msFile, const String &fitsFile, const Bool NewNameStyle=False)
| Create from output and input file names.
| MSFitsInput (const MSFitsInput &other)=delete
| ~MSFitsInput ()
| The destructor is fairly trivial.
MSFitsInput & | operator= (const MSFitsInput &other)=delete
void | readFitsFile (Int obsType=MSTileLayout::Standard)
| Read all the data from the FITS file and create the MeasurementSet.

## Private 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)
std::pair< Int, Int > | _extractAntennas (Int antenna1, Int antenna2)
std::pair< Int, Int > | _extractAntennas (Float baseline)
void | _fillSysPowerTable (BinaryTable &bt)

void

_doFillSysPowerSingleIF (const String &casaTableName, const ScalarColumn< Double > &timeCol, const ScalarColumn< Float > &intervalCol, const ScalarColumn< Int > &antNoCol, const ScalarColumn< Int > &freqIDCol, const ScalarColumn< Float > &powerDif1Col, const ScalarColumn< Float > &powerSum1Col, const ScalarColumn< Float > &postGain1Col, const ScalarColumn< Float > &powerDif2Col, const ScalarColumn< Float > &powerSum2Col, const ScalarColumn< Float > &postGain2Col)

## 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

## Detailed Description

UV FITS to MeasurementSet filler.

### Intended use:

Public interface

### Prerequisite

- MeasurementSet
- FITS classes

### 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 266 of file MSFitsInput.h.

## Constructor & Destructor Documentation

## MSFitsInput() [1/3]

casacore::MSFitsInput::MSFitsInput | ( |  | ) |

delete

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

Referenced by MSFitsInput(), and operator=().

## MSFitsInput() [2/3]

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

Create from output and input file names.

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

References casacore::False.

## MSFitsInput() [3/3]

casacore::MSFitsInput::MSFitsInput | ( | const MSFitsInput & | other | ) |

delete

References MSFitsInput().

## ~MSFitsInput()

casacore::MSFitsInput::~MSFitsInput | ( |  | ) |

The destructor is fairly trivial.

## Member Function Documentation

## _checkInput()

Bool casacore::MSFitsInput::_checkInput | ( | FitsInput & | infile | ) |

private

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

Returns False if not ok.

## _doFillSysPowerSingleIF()

void casacore::MSFitsInput::_doFillSysPowerSingleIF | ( | const String & | casaTableName,
|  | const ScalarColumn< Double > & | timeCol,
|  | const ScalarColumn< Float > & | intervalCol,
|  | const ScalarColumn< Int > & | antNoCol,
|  | const ScalarColumn< Int > & | freqIDCol,
|  | const ScalarColumn< Float > & | powerDif1Col,
|  | const ScalarColumn< Float > & | powerSum1Col,
|  | const ScalarColumn< Float > & | postGain1Col,
|  | const ScalarColumn< Float > & | powerDif2Col,
|  | const ScalarColumn< Float > & | powerSum2Col,
|  | const ScalarColumn< Float > & | postGain2Col )

private

## _extractAntennas() [1/2]

std::pair< Int, Int > casacore::MSFitsInput::_extractAntennas | ( | Float | baseline | ) |

private

## _extractAntennas() [2/2]

std::pair< Int, Int > casacore::MSFitsInput::_extractAntennas | ( | Int | antenna1,
|  | Int | antenna2 )

private

## _fillSysPowerTable()

void casacore::MSFitsInput::_fillSysPowerTable | ( | BinaryTable & | bt | ) |

private

## checkRequiredAxis()

void casacore::MSFitsInput::checkRequiredAxis | ( |  | ) |

private

verify that the fits contains visibility data

## fillAntennaTable()

Read a binary table extension of type AIPS AN and create an antenna table *void casacore::MSFitsInput::fillAntennaTable | ( | BinaryTable & | bt | ) |

private

## fillExtraTables()

void casacore::MSFitsInput::fillExtraTables | ( |  | ) |

private

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

## fillFeedTable()

void casacore::MSFitsInput::fillFeedTable | ( |  | ) |

private

fill the Feed table with minimal info needed for synthesis processing

## fillFieldTable() [1/4]

void casacore::MSFitsInput::fillFieldTable | ( | BinaryTable & | bt | ) |

private

fill Field table

## fillFieldTable() [2/4]

void casacore::MSFitsInput::fillFieldTable | ( | BinaryTable & | bt,
|  | Int | nField )

private

fill Field table from FITS SU table

## fillFieldTable() [3/4]

void casacore::MSFitsInput::fillFieldTable | ( | double | ,
|  | double | ,
|  | String | )

private

## fillFieldTable() [4/4]

void casacore::MSFitsInput::fillFieldTable | ( | Int | nField | ) |

private

fill Field table from header (single source fits)

## fillHistoryTable()

void casacore::MSFitsInput::fillHistoryTable | ( | ConstFitsKeywordList & | kwl | ) |

private

Read a binary table extension and update history table.

## fillMSMainTable() [1/2]

void casacore::MSFitsInput::fillMSMainTable | ( | BinaryTable & | bt | ) |

private

## fillMSMainTable() [2/2]

void casacore::MSFitsInput::fillMSMainTable | ( | Int & | nField,
|  | Int & | nSpW )

private

else do it row by row

## fillMSMainTableColWise()

void casacore::MSFitsInput::fillMSMainTableColWise | ( | Int & | nField,
|  | Int & | nSpW )

private

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

## fillObservationTable()

void casacore::MSFitsInput::fillObservationTable | ( | ConstFitsKeywordList & | kwl | ) |

private

Read a binary table extension and update history table.

## fillObsTables()

Fill the Observation and ObsLog tables *void casacore::MSFitsInput::fillObsTables | ( |  | ) |

private

## fillPointingTable()

void casacore::MSFitsInput::fillPointingTable | ( |  | ) |

private

## fillPolarizationTable()

void casacore::MSFitsInput::fillPolarizationTable | ( |  | ) |

private

## fillSourceTable()

void casacore::MSFitsInput::fillSourceTable | ( |  | ) |

private

## fillSpectralWindowTable() [1/3]

void casacore::MSFitsInput::fillSpectralWindowTable | ( |  | ) |

private

fill spectralwindow table from header

## fillSpectralWindowTable() [2/3]

void casacore::MSFitsInput::fillSpectralWindowTable | ( | BinaryTable & | bt | ) |

private

## fillSpectralWindowTable() [3/3]

void casacore::MSFitsInput::fillSpectralWindowTable | ( | BinaryTable & | bt,
|  | Int | nSpW )

private

fill spectralwindow table from FITS FQ table + header info

## fixEpochReferences()

void casacore::MSFitsInput::fixEpochReferences | ( |  | ) |

private

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

## getAxisInfo()

void casacore::MSFitsInput::getAxisInfo | ( | ConstFitsKeywordList & |  | ) |

private

extract axis information

## getDirectionFrame()

MDirection::Types casacore::MSFitsInput::getDirectionFrame | ( | Double | epoch | ) |

private

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!).

## getPrimaryGroupAxisInfo()

void casacore::MSFitsInput::getPrimaryGroupAxisInfo | ( |  | ) |

private

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

## operator=()

MSFitsInput & casacore::MSFitsInput::operator= | ( | const MSFitsInput & | other | ) |

delete

References MSFitsInput().

## readFitsFile()

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.

References casacore::MSTileLayout::Standard.

## readPrimaryTableUVFits()

void casacore::MSFitsInput::readPrimaryTableUVFits | ( | Int | obsType | ) |

private

## readRandomGroupUVFits()

void casacore::MSFitsInput::readRandomGroupUVFits | ( | Int | obsType | ) |

private

## setFreqFrameVar()

void casacore::MSFitsInput::setFreqFrameVar | ( | BinaryTable & | binTab | ) |

private

Check the frame if there is an SU table.

## setupMeasurementSet()

void casacore::MSFitsInput::setupMeasurementSet | ( | const String & | MSFileName,
|  | Bool | useTSM = True,
|  | Int | obsType = MSTileLayout::Standard )

private

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.

References casacore::MSTileLayout::Standard, and casacore::True.

## sortPolarizations()

void casacore::MSFitsInput::sortPolarizations | ( |  | ) |

private

extract axis information

## updateSpectralWindowTable()

void casacore::MSFitsInput::updateSpectralWindowTable | ( |  | ) |

private

update a the Spectral window post filling if necessary

## Member Data Documentation

## _addSourceTable

Bool casacore::MSFitsInput::_addSourceTable

private

Definition at line 315 of file MSFitsInput.h.

## _array

String casacore::MSFitsInput::_array

private

Definition at line 302 of file MSFitsInput.h.

## _chanFreq

Vector<Double> casacore::MSFitsInput::_chanFreq

private

Definition at line 320 of file MSFitsInput.h.

## _coordType

Vector<String> casacore::MSFitsInput::_coordType

private

Definition at line 300 of file MSFitsInput.h.

## _corrIndex

Block<Int> casacore::MSFitsInput::_corrIndex

private

Definition at line 298 of file MSFitsInput.h.

## _corrProduct

Matrix<Int> casacore::MSFitsInput::_corrProduct

private

Definition at line 299 of file MSFitsInput.h.

## _corrType

Vector<Int> casacore::MSFitsInput::_corrType

private

Definition at line 297 of file MSFitsInput.h.

## _delta

Vector<Double> casacore::MSFitsInput::_delta

private

Definition at line 301 of file MSFitsInput.h.

## _epoch

Double casacore::MSFitsInput::_epoch

private

Definition at line 303 of file MSFitsInput.h.

## _epochRef

MDirection::Types casacore::MSFitsInput::_epochRef

private

Definition at line 304 of file MSFitsInput.h.

## _freqsys

MFrequency::Types casacore::MSFitsInput::_freqsys

private

Definition at line 313 of file MSFitsInput.h.

## _header

Record casacore::MSFitsInput::_header

private

Definition at line 317 of file MSFitsInput.h.

## _infile

FitsInput* casacore::MSFitsInput::_infile

private

Definition at line 290 of file MSFitsInput.h.

## _log

LogIO casacore::MSFitsInput::_log

private

Definition at line 316 of file MSFitsInput.h.

## _ms

MeasurementSet casacore::MSFitsInput::_ms

private

Definition at line 294 of file MSFitsInput.h.

## _msc

MSColumns* casacore::MSFitsInput::_msc

private

Definition at line 295 of file MSFitsInput.h.

## _msCreated

Bool casacore::MSFitsInput::_msCreated

private

Definition at line 326 of file MSFitsInput.h.

## _msFile

String casacore::MSFitsInput::_msFile

private

Definition at line 291 of file MSFitsInput.h.

## _nAntRow

Int casacore::MSFitsInput::_nAntRow

private

number of rows in the created MS ANTENNA table

Definition at line 310 of file MSFitsInput.h.

## _nArray

Int casacore::MSFitsInput::_nArray

private

Definition at line 311 of file MSFitsInput.h.

## _newNameStyle

Bool casacore::MSFitsInput::_newNameStyle

private

Definition at line 321 of file MSFitsInput.h.

## _nIF

Int casacore::MSFitsInput::_nIF

private

Definition at line 296 of file MSFitsInput.h.

## _nPixel

Vector<Int> casacore::MSFitsInput::_nPixel

private

Definition at line 297 of file MSFitsInput.h.

## _object

String casacore::MSFitsInput::_object

private

Definition at line 302 of file MSFitsInput.h.

## _obsTime

Vector<Double> casacore::MSFitsInput::_obsTime

private

Definition at line 322 of file MSFitsInput.h.

## _priGroup

MSPrimaryGroupHolder casacore::MSFitsInput::_priGroup

private

Definition at line 292 of file MSFitsInput.h.

## _priTable

MSPrimaryTableHolder casacore::MSFitsInput::_priTable

private

Definition at line 293 of file MSFitsInput.h.

## _receptorAngle

Vector<Double> casacore::MSFitsInput::_receptorAngle

private

Definition at line 312 of file MSFitsInput.h.

## _refFreq

Double casacore::MSFitsInput::_refFreq

private

Definition at line 318 of file MSFitsInput.h.

## _refPix

Vector<Double> casacore::MSFitsInput::_refPix

private

Definition at line 301 of file MSFitsInput.h.

## _refVal

Vector<Double> casacore::MSFitsInput::_refVal

private

Definition at line 301 of file MSFitsInput.h.

## _restFreq

Matrix<Double> casacore::MSFitsInput::_restFreq

private

Definition at line 324 of file MSFitsInput.h.

## _restfreq

Double casacore::MSFitsInput::_restfreq

private

Definition at line 314 of file MSFitsInput.h.

## _sysVel

Matrix<Double> casacore::MSFitsInput::_sysVel

private

Definition at line 325 of file MSFitsInput.h.

## _timsys

String casacore::MSFitsInput::_timsys

private

Definition at line 302 of file MSFitsInput.h.

## _uniqueAnts

std::set<Int> casacore::MSFitsInput::_uniqueAnts

private

determined by epoch_p, hence the name and type.

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

Definition at line 308 of file MSFitsInput.h.

## _useAltrval

Bool casacore::MSFitsInput::_useAltrval

private

Definition at line 319 of file MSFitsInput.h.

The documentation for this class was generated from the following file:

- msfits/MSFits/MSFitsInput.h