casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
NRODataRecord.h
Go to the documentation of this file.
00001 //#---------------------------------------------------------------------------
00002 //# NRODatRecord.h: Class for NRO 45m and ASTE data.
00003 //#---------------------------------------------------------------------------
00004 //# Copyright (C) 2000-2006
00005 //# Associated Universities, Inc. Washington DC, USA.
00006 //#
00007 //# This library is free software; you can redistribute it and/or modify it
00008 //# under the terms of the GNU Library General Public License as published by
00009 //# the Free Software Foundation; either version 2 of the License, or (at your
00010 //# option) any later version.
00011 //#
00012 //# This library is distributed in the hope that it will be useful, but WITHOUT
00013 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00014 //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00015 //# License for more details.
00016 //#
00017 //# You should have received a copy of the GNU Library General Public License
00018 //# along with this library; if not, write to the Free Software Foundation,
00019 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
00020 //#
00021 //# Correspondence concerning AIPS++ should be addressed as follows:
00022 //#        Internet email: aips2-request@nrao.edu.
00023 //#        Postal address: AIPS++ Project Office
00024 //#                        National Radio Astronomy Observatory
00025 //#                        520 Edgemont Road
00026 //#                        Charlottesville, VA 22903-2475 USA
00027 //#
00028 //# $Id$
00029 //#---------------------------------------------------------------------------
00030 //# Original: 2008/10/30, Takeshi Nakazato, NAOJ
00031 //#---------------------------------------------------------------------------
00032 
00033 #ifndef NRO_DATA_RECORD_H
00034 #define NRO_DATA_RECORD_H
00035 
00036 #include <string>
00037 #include <stdio.h>
00038 #include <vector>
00039 
00040 using namespace std ;
00041 
00042 // <summary>
00043 // <linkto class=NRODataRecord>NRODataRecord</linkto> is a class 
00044 // that represents a single scan record 
00045 // (scan header + data record) for NRO 45m and ASTE raw data. 
00046 // </summary>
00047 
00048 // <use visibility=global>
00049 
00050 // <reviewed reviewer="" date="" tests="" demos="">
00051 // </reviewed>
00052 
00053 // <etymology>
00054 // NRO and ASTE raw data format consists of two major components; data 
00055 // header and scan record. <linkto class=NRODataRecord>NRODataRecord</linkto> 
00056 // is a representation of the scan record 
00057 // that contains a scan header and a spectral data.
00058 // </etymology>
00059 //
00060 // <synopsis>
00061 // <linkto class=NRODataRecord>NRODataRecord</linkto> is a struct that is an 
00062 // implementation of a single scan record.
00063 // All attributes are public.
00064 // </synopsis>
00065 //
00066 // <motivation>
00067 // <linkto class=NRODataRecord>NRODataRecord</linkto> are defined to import 
00068 // NRO and ASTE raw data effictively. 
00069 // It enable to read scan record all at once instead of to read each 
00070 // attributes individually.
00071 // </motivation>
00072 //
00073 struct NRODataRecord
00074 {
00075   // Type of file record
00076   char LSFIL[4] ;
00077 
00078   // Scan number
00079   int ISCAN ;
00080 
00081   // Integration start time with format of "YYYYMMDDHHMMSS.sss" (UTC)
00082   char LAVST[24] ;
00083 
00084   // Scan type (ON or ZERO)
00085   char SCANTP[8] ;
00086 
00087   // Offset position of the scan RA/GL/AZ [rad]
00088   double DSCX ;
00089 
00090   // Offset position of the scan DEC/GB/EL [rad]
00091   double DSCY ;
00092 
00093   // Absolute position of the scan RA/GL/AZ [rad]
00094   double SCX ;
00095 
00096   // Absolute position of the scan DEC/GB/EL [rad]
00097   double SCY ;
00098 
00099   // Position of the scan in the program RA/GL/AZ [rad]
00100   double PAZ ;
00101 
00102   // Position of the scan in the program DEC/GB/EL [rad]
00103   double PEL ;
00104 
00105   // Real position of the scan RA/GL/AZ [rad]
00106   double RAZ ;
00107 
00108   // Real position of the scan DEC/GB/EL [rad]
00109   double REL ;
00110 
00111   // X-coordinate value [rad]
00112   double XX ;
00113 
00114   // Y-coordinate value [rad]
00115   double YY ;
00116 
00117   // Array type (beam or IF)
00118   char ARRYT[4] ;
00119 
00120   // Ambient temperature [Celcius]
00121   float TEMP ;
00122 
00123   // Air pressure [hPa]
00124   float PATM ;
00125 
00126   // Pressure of water vapor [hPa]
00127   float PH2O ;
00128 
00129   // Wind speed [m/s]
00130   float VWIND ;
00131 
00132   // Wind direction [rad]
00133   float DWIND ;
00134 
00135   // Atmospheric optical depth
00136   float TAU ;
00137 
00138   // System noise temperature [K]
00139   float TSYS ;
00140 
00141   // Atmospheric temperature [K]
00142   float BATM ;
00143 
00144   // Line number of executable
00145   int LINE ;
00146 
00147   // Dummy data
00148   int IDMY1[4] ;
00149 
00150   // Recessional velocity of the antenna [m/s]
00151   double VRAD ;
00152 
00153   // Central frequency in the rest frame [Hz]
00154   double FREQ0 ;
00155 
00156   // Tracking frequency in the rest frame [Hz]
00157   double FQTRK ;
00158 
00159   // Frequency of first IF [Hz]
00160   double FQIF1 ;
00161 
00162   // ALC control voltage
00163   double ALCV ;
00164 
00165   // OFF position before and after the integration
00166   double OFFCD[2][2] ;
00167 
00168   // Data flag  0: effective  1: flagged
00169   int IDMY0 ;
00170 
00171   // Dummy data
00172   int IDMY2 ;
00173 
00174   // Correction for Doppler frequency shift
00175   double DPFRQ ;
00176 
00177   // Dummy data
00178   char CDMY1[144] ;
00179 
00180   // Scaling factor of the array
00181   double SFCTR ;
00182 
00183   // Offset for array data
00184   double ADOFF ;
00185 
00186   // Spectral data for OTF data: 
00187   // Originally the data are double array. 
00188   // But they are quantized and converted to the int array with 
00189   // a scalling factor and an offset value. Additionally, 
00190   // this int array is stored into the char array.
00191   //
00192   // 2009/02/26 Takeshi Nakazato  Moved to NROReader
00193   char *LDATA ;
00194   // Spectral data for FITS data
00195   //vector<int> JDATA ;
00196 } ;
00197 
00198 #endif /* NRO_DATA_RECORD_H */