// // C++ Interface: MSFiller // // Description: // // This class is specific filler for MS format // // Takeshi Nakazato , (C) 2010 // // Copyright: See COPYING file that comes with this distribution // // #ifndef ASAPMSFILLER_H #define ASAPMSFILLER_H // STL #include // Boost #include // AIPS++ #include #include #include #include #include #include #include #include //#include #include #include #include "Scantable.h" namespace asap { class MSFiller { public: explicit MSFiller(casa::CountedPtr stable) ; virtual ~MSFiller() ; virtual bool open(const std::string& filename, const casa::Record& rec) ; virtual void fill() ; virtual void close() ; protected: private: MSFiller(); MSFiller(const MSFiller&); MSFiller& operator=(const MSFiller&); // fill subtables //void fillFrequencies() ; //void fillMolecules() ; void fillWeather() ; void fillFocus() ; //void fillHistory() ; //void fillFit() ; void fillTcal( boost::object_pool *poolr ) ; // get SRCTYPE from STATE_ID casa::Int getSrcType( casa::Int stateId, boost::object_pool *pool ) ; // get POLNO from CORR_TYPE casa::Block getPolNo( casa::Int corrType ) ; // get poltype from CORR_TYPE casa::String getPolType( casa::Int corrType ) ; // get WEATHER_ID casa::uInt getWeatherId( casa::uInt idx, casa::Double wtime ) ; // get time stamp in SYSCAL table // assume that tab is selected by ANTENNA_ID, FEED_ID, SPECTRAL_WINDOW_ID // and sorted by TIME void getSysCalTime( casa::Vector &scTimeIn, casa::Vector &scInterval, casa::Block &tcol, casa::Block &tidx ) ; // get TCAL_ID casa::Block getTcalId( casa::Int feedId, casa::Int spwId, casa::MEpoch &t ) ; // get direction for DIRECTION, AZIMUTH, and ELEVATION columns casa::uInt getDirection( casa::uInt idx, casa::Vector &dir, casa::Vector &srate, casa::String &ref, casa::MSPointing &tab, casa::Double t ) ; // create key for TCAL table casa::String keyTcal( casa::Int feedid, casa::Int spwid, casa::String stime ) ; // binary search casa::uInt binarySearch( casa::Vector &timeList, casa::Double target ) ; // tool for HPC double gettimeofday_sec() ; casa::CountedPtr table_ ; casa::MeasurementSet mstable_ ; casa::String tablename_ ; casa::Int antenna_ ; casa::String antennaStr_ ; casa::Bool getPt_ ; casa::Bool isFloatData_ ; casa::Bool isData_ ; casa::Bool isDoppler_ ; casa::Bool isFlagCmd_ ; casa::Bool isFreqOffset_ ; casa::Bool isHistory_ ; casa::Bool isProcessor_ ; casa::Bool isSysCal_ ; casa::Bool isWeather_ ; casa::String colTsys_ ; casa::String colTcal_ ; casa::LogIO os_ ; casa::Vector mwTime_ ; casa::Vector mwInterval_ ; // Record for TCAL_ID // "FIELD0": "SPW0": Vector // "SPW1": Vector // ... casa::Record tcalrec_ ; //casa::ROTableColumn *scCol_ ; }; }; #endif