casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
casa::NRO2MSReader Class Reference

#include <NRO2MSReader.h>

Inheritance diagram for casa::NRO2MSReader:
casa::ReaderInterface casa::NonCopyable< ReaderInterface >

Classes

struct  NROArrayData
 

Public Types

typedef NROOptionalTables OptionalTables
 
- Public Types inherited from casa::ReaderInterface
typedef NullOptionalTables
< ReaderInterface
OptionalTables
 

Public Member Functions

 NRO2MSReader (std::string const &scantable_name)
 
virtual ~NRO2MSReader ()
 
virtual size_t getNumberOfRows ()
 get number of rows More...
 
virtual casacore::MDirection::Types getDirectionFrame () const
 
virtual casacore::Bool isFloatData () const
 
virtual casacore::String getDataUnit () const
 
virtual casacore::Bool getObservationRow (sdfiller::ObservationRecord &record)
 to get OBSERVATION table More...
 
virtual casacore::Bool getAntennaRow (sdfiller::AntennaRecord &record)
 to get ANTENNA table More...
 
virtual casacore::Bool getProcessorRow (sdfiller::ProcessorRecord &record)
 to get PROCESSOR table More...
 
virtual casacore::Bool getSourceRow (sdfiller::SourceRecord &record)
 to get SOURCE table More...
 
virtual casacore::Bool getFieldRow (sdfiller::FieldRecord &record)
 to get FIELD table More...
 
virtual casacore::Bool getSpectralWindowRow (sdfiller::SpectralWindowRecord &record)
 to get SOURCE table More...
 
virtual casacore::Bool getData (size_t irow, sdfiller::DataRecord &record)
 for DataAccumulator More...
 
int getNROArraySize () const
 
int getNRONumBeam () const
 
int getNRONumPol () const
 
int getNRONumSpw () const
 
bool isNROArrayUsed (int array_id) const
 
int getNROArrayBeamId (int array_id) const
 
casacore::Stokes::StokesTypes getNROArrayPol (int array_id) const
 
int getNROArraySpwId (int array_id) const
 
- Public Member Functions inherited from casa::ReaderInterface
 ReaderInterface (std::string const &name)
 
virtual ~ReaderInterface ()
 
std::string const & getName () const
 
void initialize ()
 
void finalize ()
 

Protected Member Functions

void initializeSpecific ()
 
void finalizeSpecific ()
 

Private Member Functions

void readObsHeader ()
 
void readScanData (int const irow, sdfiller::NRODataScanData &data)
 
void checkEndian ()
 
template<typename T >
void convertEndian (T &value)
 
template<typename T >
void readHeader (T &v)
 
template<typename T >
void readHeader (T *v, size_t numArray)
 
void readHeader (string &v, size_t strLength)
 
void readHeader (string *v, size_t strLength, size_t numArray)
 
void constructArrayTable ()
 
bool checkScanArray (string const scan_array, NROArrayData const *header_array)
 
int getFirstArrayIdWithSpwID (int spwid)
 Returns the first array ID whose SPW ID is spwid. More...
 
double getMJD (string const &time)
 
double getIntMiddleTimeSec (sdfiller::NRODataScanData const &data)
 
double getIntStartTimeSec (int const scanno)
 
double getIntEndTimeSec (int const scanno)
 
void getFullTimeRange ()
 
double getMiddleOfTimeRangeSec ()
 
double getRestFrequency (int const spwno)
 
string convertVRefName (string const &vref0)
 
void shiftFrequency (string const &vdef, double const v, std::vector< double > &freqs)
 
std::vector< double > getSpectrum (int const irow, sdfiller::NRODataScanData const &data)
 
casacore::Bool getAntennaRowImpl (sdfiller::AntennaRecord &record)
 
casacore::Bool getFieldRowImpl (sdfiller::FieldRecord &record)
 
casacore::Bool getObservationRowImpl (sdfiller::ObservationRecord &record)
 
casacore::Bool getProcessorRowImpl (sdfiller::ProcessorRecord &record)
 
casacore::Bool getSourceRowImpl (sdfiller::SourceRecord &record)
 
casacore::Bool getSpectralWindowRowImpl (sdfiller::SpectralWindowRecord &record)
 
template<class _Record >
casacore::Bool noMoreRowImpl (_Record &)
 

Private Attributes

FILE * fp_
 
sdfiller::NRODataObsHeader obs_header_
 
bool same_endian_
 
std::vector< NROArrayDataarray_mapper_
 
int beam_id_counter_
 
int source_spw_id_counter_
 
int spw_id_counter_
 
casacore::Vector
< casacore::Double
time_range_sec_
 
int const len_obs_header_
 
casacore::Double const posx_
 
casacore::Double const posy_
 
casacore::Double const posz_
 
casacore::Bool(NRO2MSReader::* get_antenna_row_ )(sdfiller::AntennaRecord &)
 casacore::Int getPolNo(string const &rx); More...
 
casacore::Bool(NRO2MSReader::* get_field_row_ )(sdfiller::FieldRecord &)
 
casacore::Bool(NRO2MSReader::* get_observation_row_ )(sdfiller::ObservationRecord &)
 
casacore::Bool(NRO2MSReader::* get_processor_row_ )(sdfiller::ProcessorRecord &)
 
casacore::Bool(NRO2MSReader::* get_source_row_ )(sdfiller::SourceRecord &)
 
casacore::Bool(NRO2MSReader::* get_spw_row_ )(sdfiller::SpectralWindowRecord &)
 

Additional Inherited Members

- Protected Attributes inherited from casa::ReaderInterface
std::string const name_
 

Detailed Description

Definition at line 30 of file NRO2MSReader.h.

Member Typedef Documentation

Definition at line 32 of file NRO2MSReader.h.

Constructor & Destructor Documentation

casa::NRO2MSReader::NRO2MSReader ( std::string const &  scantable_name)
virtual casa::NRO2MSReader::~NRO2MSReader ( )
virtual

Member Function Documentation

void casa::NRO2MSReader::checkEndian ( )
private
bool casa::NRO2MSReader::checkScanArray ( string const  scan_array,
NROArrayData const *  header_array 
)
private
void casa::NRO2MSReader::constructArrayTable ( )
private
template<typename T >
void casa::NRO2MSReader::convertEndian ( T &  value)
inlineprivate

Definition at line 142 of file NRO2MSReader.h.

References first, and casacore::value().

string casa::NRO2MSReader::convertVRefName ( string const &  vref0)
private
void casa::NRO2MSReader::finalizeSpecific ( )
protectedvirtual

Implements casa::ReaderInterface.

virtual casacore::Bool casa::NRO2MSReader::getAntennaRow ( sdfiller::AntennaRecord record)
inlinevirtual

to get ANTENNA table

Implements casa::ReaderInterface.

Definition at line 59 of file NRO2MSReader.h.

References POST_END, and POST_START.

casacore::Bool casa::NRO2MSReader::getAntennaRowImpl ( sdfiller::AntennaRecord record)
private
virtual casacore::Bool casa::NRO2MSReader::getData ( size_t  irow,
sdfiller::DataRecord record 
)
virtual

for DataAccumulator

Implements casa::ReaderInterface.

virtual casacore::String casa::NRO2MSReader::getDataUnit ( ) const
inlinevirtual

Reimplemented from casa::ReaderInterface.

Definition at line 46 of file NRO2MSReader.h.

virtual casacore::MDirection::Types casa::NRO2MSReader::getDirectionFrame ( ) const
virtual

Reimplemented from casa::ReaderInterface.

virtual casacore::Bool casa::NRO2MSReader::getFieldRow ( sdfiller::FieldRecord record)
inlinevirtual

to get FIELD table

Implements casa::ReaderInterface.

Definition at line 83 of file NRO2MSReader.h.

References POST_END, and POST_START.

casacore::Bool casa::NRO2MSReader::getFieldRowImpl ( sdfiller::FieldRecord record)
private
int casa::NRO2MSReader::getFirstArrayIdWithSpwID ( int  spwid)
inlineprivate

Returns the first array ID whose SPW ID is spwid.

no array with spwid found

Definition at line 233 of file NRO2MSReader.h.

void casa::NRO2MSReader::getFullTimeRange ( )
private
double casa::NRO2MSReader::getIntEndTimeSec ( int const  scanno)
private
double casa::NRO2MSReader::getIntMiddleTimeSec ( sdfiller::NRODataScanData const &  data)
private
double casa::NRO2MSReader::getIntStartTimeSec ( int const  scanno)
private
double casa::NRO2MSReader::getMiddleOfTimeRangeSec ( )
private
double casa::NRO2MSReader::getMJD ( string const &  time)
private
int casa::NRO2MSReader::getNROArrayBeamId ( int  array_id) const
inline

assert(array_id >= 0 && array_id < getNROArraySize());

Definition at line 118 of file NRO2MSReader.h.

Referenced by casa::NROOptionalTables::Generate_NRO_ARRAY().

casacore::Stokes::StokesTypes casa::NRO2MSReader::getNROArrayPol ( int  array_id) const
inline

assert(array_id >= 0 && array_id < getNROArraySize());

Definition at line 122 of file NRO2MSReader.h.

Referenced by casa::NROOptionalTables::Generate_NRO_ARRAY().

int casa::NRO2MSReader::getNROArraySize ( ) const
inline

return obs_header_.ARYNM0; //obs_header_.NBEAM * obs_header_.NPOL * obs_header_.NSPWIN;

Definition at line 101 of file NRO2MSReader.h.

References NRO_ARYMAX.

Referenced by casa::NROOptionalTables::Generate_NRO_ARRAY().

int casa::NRO2MSReader::getNROArraySpwId ( int  array_id) const
inline

assert(array_id >= 0 && array_id < getNROArraySize());

Definition at line 126 of file NRO2MSReader.h.

Referenced by casa::NROOptionalTables::Generate_NRO_ARRAY().

int casa::NRO2MSReader::getNRONumBeam ( ) const
inline

Definition at line 105 of file NRO2MSReader.h.

int casa::NRO2MSReader::getNRONumPol ( ) const
inline

Definition at line 108 of file NRO2MSReader.h.

int casa::NRO2MSReader::getNRONumSpw ( ) const
inline

Definition at line 111 of file NRO2MSReader.h.

virtual size_t casa::NRO2MSReader::getNumberOfRows ( )
virtual

get number of rows

Implements casa::ReaderInterface.

virtual casacore::Bool casa::NRO2MSReader::getObservationRow ( sdfiller::ObservationRecord record)
inlinevirtual

to get OBSERVATION table

Implements casa::ReaderInterface.

Definition at line 51 of file NRO2MSReader.h.

References POST_END, and POST_START.

casacore::Bool casa::NRO2MSReader::getObservationRowImpl ( sdfiller::ObservationRecord record)
private
virtual casacore::Bool casa::NRO2MSReader::getProcessorRow ( sdfiller::ProcessorRecord record)
inlinevirtual

to get PROCESSOR table

Implements casa::ReaderInterface.

Definition at line 67 of file NRO2MSReader.h.

References POST_END, and POST_START.

casacore::Bool casa::NRO2MSReader::getProcessorRowImpl ( sdfiller::ProcessorRecord record)
private
double casa::NRO2MSReader::getRestFrequency ( int const  spwno)
private
virtual casacore::Bool casa::NRO2MSReader::getSourceRow ( sdfiller::SourceRecord record)
inlinevirtual

to get SOURCE table

Implements casa::ReaderInterface.

Definition at line 75 of file NRO2MSReader.h.

References POST_END, and POST_START.

casacore::Bool casa::NRO2MSReader::getSourceRowImpl ( sdfiller::SourceRecord record)
private
virtual casacore::Bool casa::NRO2MSReader::getSpectralWindowRow ( sdfiller::SpectralWindowRecord record)
inlinevirtual

to get SOURCE table

Implements casa::ReaderInterface.

Definition at line 91 of file NRO2MSReader.h.

References POST_END, and POST_START.

casacore::Bool casa::NRO2MSReader::getSpectralWindowRowImpl ( sdfiller::SpectralWindowRecord record)
private
std::vector<double> casa::NRO2MSReader::getSpectrum ( int const  irow,
sdfiller::NRODataScanData const &  data 
)
private
void casa::NRO2MSReader::initializeSpecific ( )
protectedvirtual

Implements casa::ReaderInterface.

virtual casacore::Bool casa::NRO2MSReader::isFloatData ( ) const
inlinevirtual

Reimplemented from casa::ReaderInterface.

Definition at line 42 of file NRO2MSReader.h.

bool casa::NRO2MSReader::isNROArrayUsed ( int  array_id) const
inline

Definition at line 115 of file NRO2MSReader.h.

Referenced by casa::NROOptionalTables::Generate_NRO_ARRAY().

template<class _Record >
casacore::Bool casa::NRO2MSReader::noMoreRowImpl ( _Record &  )
inlineprivate

Definition at line 283 of file NRO2MSReader.h.

References POST_END, and POST_START.

template<typename T >
void casa::NRO2MSReader::readHeader ( T &  v)
inlineprivate

Definition at line 151 of file NRO2MSReader.h.

template<typename T >
void casa::NRO2MSReader::readHeader ( T *  v,
size_t  numArray 
)
inlineprivate

Definition at line 161 of file NRO2MSReader.h.

void casa::NRO2MSReader::readHeader ( string &  v,
size_t  strLength 
)
inlineprivate

Definition at line 167 of file NRO2MSReader.h.

References STRING2CHAR.

void casa::NRO2MSReader::readHeader ( string *  v,
size_t  strLength,
size_t  numArray 
)
inlineprivate

Definition at line 175 of file NRO2MSReader.h.

void casa::NRO2MSReader::readObsHeader ( )
private
void casa::NRO2MSReader::readScanData ( int const  irow,
sdfiller::NRODataScanData data 
)
private
void casa::NRO2MSReader::shiftFrequency ( string const &  vdef,
double const  v,
std::vector< double > &  freqs 
)
private

Member Data Documentation

std::vector<NROArrayData> casa::NRO2MSReader::array_mapper_
private

Definition at line 228 of file NRO2MSReader.h.

int casa::NRO2MSReader::beam_id_counter_
private

Definition at line 243 of file NRO2MSReader.h.

FILE* casa::NRO2MSReader::fp_
private

Definition at line 136 of file NRO2MSReader.h.

casacore::Bool(NRO2MSReader::* casa::NRO2MSReader::get_antenna_row_)(sdfiller::AntennaRecord &)
private

casacore::Int getPolNo(string const &rx);

Definition at line 268 of file NRO2MSReader.h.

casacore::Bool(NRO2MSReader::* casa::NRO2MSReader::get_field_row_)(sdfiller::FieldRecord &)
private

Definition at line 269 of file NRO2MSReader.h.

casacore::Bool(NRO2MSReader::* casa::NRO2MSReader::get_observation_row_)(sdfiller::ObservationRecord &)
private

Definition at line 270 of file NRO2MSReader.h.

casacore::Bool(NRO2MSReader::* casa::NRO2MSReader::get_processor_row_)(sdfiller::ProcessorRecord &)
private

Definition at line 271 of file NRO2MSReader.h.

casacore::Bool(NRO2MSReader::* casa::NRO2MSReader::get_source_row_)(sdfiller::SourceRecord &)
private

Definition at line 272 of file NRO2MSReader.h.

casacore::Bool(NRO2MSReader::* casa::NRO2MSReader::get_spw_row_)(sdfiller::SpectralWindowRecord &)
private

Definition at line 273 of file NRO2MSReader.h.

int const casa::NRO2MSReader::len_obs_header_
private

Definition at line 247 of file NRO2MSReader.h.

sdfiller::NRODataObsHeader casa::NRO2MSReader::obs_header_
private

Definition at line 137 of file NRO2MSReader.h.

casacore::Double const casa::NRO2MSReader::posx_
private

Definition at line 255 of file NRO2MSReader.h.

casacore::Double const casa::NRO2MSReader::posy_
private

Definition at line 256 of file NRO2MSReader.h.

casacore::Double const casa::NRO2MSReader::posz_
private

Definition at line 257 of file NRO2MSReader.h.

bool casa::NRO2MSReader::same_endian_
private

Definition at line 148 of file NRO2MSReader.h.

int casa::NRO2MSReader::source_spw_id_counter_
private

Definition at line 244 of file NRO2MSReader.h.

int casa::NRO2MSReader::spw_id_counter_
private

Definition at line 245 of file NRO2MSReader.h.

casacore::Vector<casacore::Double> casa::NRO2MSReader::time_range_sec_
private

Definition at line 246 of file NRO2MSReader.h.


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