//#--------------------------------------------------------------------------- //# NROReader.h: Base class to read NRO 45m and ASTE data. //#--------------------------------------------------------------------------- //# Copyright (C) 2000-2006 //# Associated Universities, Inc. Washington DC, USA. //# //# This library is free software; you can redistribute it and/or modify it //# under the terms of the GNU Library General Public License as published by //# the Free Software Foundation; either version 2 of the License, or (at your //# option) any later version. //# //# This library is distributed in the hope that it will be useful, but WITHOUT //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public //# License for more details. //# //# You should have received a copy of the GNU Library General Public License //# along with this library; if not, write to the Free Software Foundation, //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. //# //# Correspondence concerning AIPS++ should be addressed as follows: //# Internet email: aips2-request@nrao.edu. //# Postal address: AIPS++ Project Office //# National Radio Astronomy Observatory //# 520 Edgemont Road //# Charlottesville, VA 22903-2475 USA //# //# $Id$ //#--------------------------------------------------------------------------- //# Original: 2008/10/30, Takeshi Nakazato, NAOJ //#--------------------------------------------------------------------------- #ifndef NRO_READER_H #define NRO_READER_H #include #include #include #include #include #include #include #include #include #include #include #include #include //#include #include #include #include using namespace std ; // // Base class to read NRO 45m and ASTE data. // // // // //
  • NRODataset // // // // // // // NROReader is a base class for all NRO reader classes. // Reader classes have NRODataset object to access // actual data. These classes are a kind of interface for Scantable data filler. // // // // Abstract class that is designed as a base class for NRO reader classes. // // // Open an appropriate NROreader for a NRO 45m and ASTE dataset. class NROReader *getNROReader( const String filename, String &datatype ); // As above, but search a list of directories for it. class NROReader *getNROReader( const String filename, const Vector directories, int &iDir, String &datatype ) ; // // NROReader // class NROReader { public: // Constructor NROReader( string name ) ; // Destructor. virtual ~NROReader() ; // Read data header virtual Int read() = 0 ; // Get header information virtual int getHeaderInfo( Int &nchan, Int &npol, Int &nif, Int &nbeam, String &observer, String &project, String &obstype, String &antname, Vector &antpos, Float &equinox, String &freqref, Double &reffreq, Double &bw, Double &utc, String &fluxunit, String &epoch, String &poltype ) ; // Get scan information virtual int getScanInfo( int irow, uInt &scanno, uInt &cycleno, uInt &beamno, uInt &polno, vector &freqs, Vector &restfreq, uInt &refbeamno, Double &scantime, Double &interval, String &srcname, String &fieldname, Array &spectra, Array &flagtra, Array &tsys, Array &direction, Float &azimuth, Float &elevation, Float ¶ngle, Float &opacity, uInt &tcalid, Int &fitid, uInt &focusid, Float &temperature, Float &pressure, Float &humidity, Float &windvel, Float &winddir, Double &srcvel, Array &propermotion, Vector &srcdir, Array &scanrate ) ; // Get scan type virtual string getScanType( int i ) ; // Get dataset virtual NRODataset *getDataset() { return dataset_ ; } ; // Get number of rows virtual Int getRowNum() ; // Get IF settings virtual vector getIFs() ; // Get Beam settings virtual vector getBeams() ; protected: // convert time in character representation to MJD representation virtual double getMJD( char *time ) ; virtual double getMJD( string strStartTime ) ; // Get spectrum virtual vector< vector > getSpectrum() ; // Get number of polarization virtual Int getPolarizationNum() ; // Get MJD time virtual double getStartTime() ; virtual double getEndTime() ; virtual vector getStartIntTime() ; //virtual double getStartIntTime( int i ) ; // Get Antenna Position in ITRF coordinate virtual vector getAntennaPosition() = 0 ; // Get SRCDIRECTION in RADEC(J2000) virtual Vector getSourceDirection() ; // Get DIRECTION in RADEC(J2000) virtual Vector getDirection( int i ) ; // filename string filename_ ; // dataset NRODataset *dataset_ ; // Logger //LogIO os ; }; #endif /* NRO_READER_H */