casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes
GBTFITSreader Class Reference

class for GBT SDFITS input using CFITSIO. More...

#include <GBTFITSreader.h>

Inheritance diagram for GBTFITSreader:
FITSreader

List of all members.

Public Member Functions

 GBTFITSreader ()
 Default constructor.
virtual ~GBTFITSreader ()
 Destructor.
virtual int open (char *sdname, int &nBeam, int *&beams, int &nIF, int *&IFs, int *&nChan, int *&nPol, int *&haveXPol, int &haveBase, int &haveSpectra, int &extraSysCal)
 Open an SDFITS file for reading.
virtual int getHeader (char observer[32], char project[32], char telescope[32], double antPos[3], char obsMode[32], char bunit[32], float &equinox, char radecsys[32], char dopplerFrame[32], char datobs[32], double &utc, double &refFreq, double &bandwidth)
 Get parameters describing the data.
virtual int getFreqInfo (int &nIF, double *&startFreq, double *&endFreq)
 Get frequency parameters for each IF.
virtual int findRange (int &nRow, int &nSel, char dateSpan[2][32], double utcSpan[2], double *&positions)
 Find the range of the data selected in time and position.
virtual int read (MBrecord &record)
 Read the next data record.
virtual void close (void)
 Close the SDFITS file.

Private Types

enum  {
  SCAN,
  CYCLE,
  DATE_OBS,
  TIME,
  EXPOSURE,
  OBJECT,
  OBJ_RA,
  OBJ_DEC,
  RESTFRQ,
  OBSMODE,
  BEAM,
  IF,
  FqRefVal,
  FqDelt,
  FqRefPix,
  RA,
  DEC,
  TimeRefVal,
  TimeDelt,
  TimeRefPix,
  SCANRATE,
  TSYS,
  CALFCTR,
  XCALFCTR,
  BASELIN,
  BASESUB,
  DATA,
  FLAGGED,
  DATAXED,
  XPOLDATA,
  REFBEAM,
  TCAL,
  TCALTIME,
  AZIMUTH,
  ELEVATIO,
  PARANGLE,
  FOCUSAXI,
  FOCUSTAN,
  FOCUSROT,
  TAMBIENT,
  PRESSURE,
  HUMIDITY,
  WINDSPEE,
  WINDDIRE,
  STOKES,
  SIG,
  CAL,
  VFRAME,
  RVSYS,
  VELDEF,
  TIMESTAMP,
  DURATION,
  SAMPLER,
  NDATA
}

Private Member Functions

void log (LogOrigin origin, LogIO::Command cmd, const char *msg=0x0)
 Message handling.
void findData (int iData, char *name, int type)
void findCol (char *name, int *colnum)
int readDim (int iData, long iRow, int *naxis, long naxes[])
int readParm (char *name, int type, void *value)
int readData (char *name, int type, long iRow, void *value)
int readData (int iData, long iRow, void *value)
int readCol (int iData, void *value)
int readTime (long iRow, int iPix, char *datobs, double &utc)
int alfaCal (short iBeam, short iIF, short iPol)
float alfaGain (float zd)
long cRowRelative (long iRow)
 For multiple binary table SDFITS (GBT)
Vector< IntnIFPerHDU ()
Double getRefValLSR (int irow)
Double getRefValLSR (long iRow, int idx, char *sampler, double restfreq)
Int mergeIFPerHDU (int start, int n)

Private Attributes

int cCycleNo
int cExtraSysCal
int cNAxes
int cStatus
long cBeamAxis
long cDecAxis
long cFreqAxis
long cNAxis [5]
long cNAxisTime
long cNRow
long cRaAxis
long cRow
long cStokesAxis
long cTimeAxis
long cTimeIdx
double cLastUTC
fitsfile * cSDptr
class FITSparm * cData
int cBeam_1rel
 These are to differentiate 0-, and 1-relative beam and IF numbering.
int cIF_1rel
int * cPols
 for GBT
int cALFA
int cALFA_BD
int cALFA_CIMA
int cALFAscan
int cScanNo
float cALFAacc
int cGBT
 These are for GBT data.
int cFirstScanNo
double cGLastUTC [4]
int cGLastScan [4]
int cGCycleNo [4]
long * cNRowT
long * cNRowCum
int * hduId
int numHDU
vector< StringcRefValKey
vector< double > cRefVal
vector< double > cIncVal
Vector< IntcIFNO
vector< int > cNumKeys

Static Private Attributes

static int sInit
 These are for ALFA data: "BDFITS" or "CIMAFITS".
static int sReset
static int(* sALFAcalNon )[2]
static int((* sALFAcalNoff )[2]
static float(* sALFAcal )[2]
static float((* sALFAcalOn )[2]
static float(((* sALFAcalOff )[2]

Detailed Description

class for GBT SDFITS input using CFITSIO.

Definition at line 58 of file GBTFITSreader.h.


Member Enumeration Documentation

anonymous enum [private]
Enumerator:
SCAN 
CYCLE 
DATE_OBS 
TIME 
EXPOSURE 
OBJECT 
OBJ_RA 
OBJ_DEC 
RESTFRQ 
OBSMODE 
BEAM 
IF 
FqRefVal 
FqDelt 
FqRefPix 
RA 
DEC 
TimeRefVal 
TimeDelt 
TimeRefPix 
SCANRATE 
TSYS 
CALFCTR 
XCALFCTR 
BASELIN 
BASESUB 
DATA 
FLAGGED 
DATAXED 
XPOLDATA 
REFBEAM 
TCAL 
TCALTIME 
AZIMUTH 
ELEVATIO 
PARANGLE 
FOCUSAXI 
FOCUSTAN 
FOCUSROT 
TAMBIENT 
PRESSURE 
HUMIDITY 
WINDSPEE 
WINDDIRE 
STOKES 
SIG 
CAL 
VFRAME 
RVSYS 
VELDEF 
TIMESTAMP 
DURATION 
SAMPLER 
NDATA 

Definition at line 131 of file GBTFITSreader.h.


Constructor & Destructor Documentation

Default constructor.

virtual GBTFITSreader::~GBTFITSreader ( ) [virtual]

Destructor.


Member Function Documentation

int GBTFITSreader::alfaCal ( short  iBeam,
short  iIF,
short  iPol 
) [private]
float GBTFITSreader::alfaGain ( float  zd) [private]
virtual void GBTFITSreader::close ( void  ) [virtual]

Close the SDFITS file.

Implements FITSreader.

long GBTFITSreader::cRowRelative ( long  iRow) [private]

For multiple binary table SDFITS (GBT)

void GBTFITSreader::findCol ( char *  name,
int *  colnum 
) [private]
void GBTFITSreader::findData ( int  iData,
char *  name,
int  type 
) [private]
virtual int GBTFITSreader::findRange ( int &  nRow,
int &  nSel,
char  dateSpan[2][32],
double  utcSpan[2],
double *&  positions 
) [virtual]

Find the range of the data selected in time and position.

Implements FITSreader.

virtual int GBTFITSreader::getFreqInfo ( int &  nIF,
double *&  startFreq,
double *&  endFreq 
) [virtual]

Get frequency parameters for each IF.

Implements FITSreader.

virtual int GBTFITSreader::getHeader ( char  observer[32],
char  project[32],
char  telescope[32],
double  antPos[3],
char  obsMode[32],
char  bunit[32],
float &  equinox,
char  radecsys[32],
char  dopplerFrame[32],
char  datobs[32],
double &  utc,
double &  refFreq,
double &  bandwidth 
) [virtual]

Get parameters describing the data.

Implements FITSreader.

Double GBTFITSreader::getRefValLSR ( int  irow) [private]
Double GBTFITSreader::getRefValLSR ( long  iRow,
int  idx,
char *  sampler,
double  restfreq 
) [private]
void GBTFITSreader::log ( LogOrigin  origin,
LogIO::Command  cmd,
const char *  msg = 0x0 
) [private]

Message handling.

Int GBTFITSreader::mergeIFPerHDU ( int  start,
int  n 
) [private]
virtual int GBTFITSreader::open ( char *  sdname,
int &  nBeam,
int *&  beams,
int &  nIF,
int *&  IFs,
int *&  nChan,
int *&  nPol,
int *&  haveXPol,
int &  haveBase,
int &  haveSpectra,
int &  extraSysCal 
) [virtual]

Open an SDFITS file for reading.

Implements FITSreader.

virtual int GBTFITSreader::read ( MBrecord record) [virtual]

Read the next data record.

Implements FITSreader.

int GBTFITSreader::readCol ( int  iData,
void *  value 
) [private]
int GBTFITSreader::readData ( char *  name,
int  type,
long  iRow,
void *  value 
) [private]
int GBTFITSreader::readData ( int  iData,
long  iRow,
void *  value 
) [private]
int GBTFITSreader::readDim ( int  iData,
long  iRow,
int *  naxis,
long  naxes[] 
) [private]
int GBTFITSreader::readParm ( char *  name,
int  type,
void *  value 
) [private]
int GBTFITSreader::readTime ( long  iRow,
int  iPix,
char *  datobs,
double &  utc 
) [private]

Member Data Documentation

int GBTFITSreader::cALFA [private]

Definition at line 157 of file GBTFITSreader.h.

int GBTFITSreader::cALFA_BD [private]

Definition at line 157 of file GBTFITSreader.h.

Definition at line 157 of file GBTFITSreader.h.

float GBTFITSreader::cALFAacc [private]

Definition at line 158 of file GBTFITSreader.h.

int GBTFITSreader::cALFAscan [private]

Definition at line 157 of file GBTFITSreader.h.

These are to differentiate 0-, and 1-relative beam and IF numbering.

Definition at line 126 of file GBTFITSreader.h.

long GBTFITSreader::cBeamAxis [private]

Definition at line 119 of file GBTFITSreader.h.

int GBTFITSreader::cCycleNo [private]

Definition at line 118 of file GBTFITSreader.h.

class FITSparm* GBTFITSreader::cData [private]

Definition at line 123 of file GBTFITSreader.h.

long GBTFITSreader::cDecAxis [private]

Definition at line 119 of file GBTFITSreader.h.

Definition at line 118 of file GBTFITSreader.h.

Definition at line 170 of file GBTFITSreader.h.

long GBTFITSreader::cFreqAxis [private]

Definition at line 119 of file GBTFITSreader.h.

int GBTFITSreader::cGBT [private]

These are for GBT data.

Definition at line 170 of file GBTFITSreader.h.

int GBTFITSreader::cGCycleNo[4] [private]

Definition at line 173 of file GBTFITSreader.h.

int GBTFITSreader::cGLastScan[4] [private]

Definition at line 172 of file GBTFITSreader.h.

double GBTFITSreader::cGLastUTC[4] [private]

Definition at line 171 of file GBTFITSreader.h.

int GBTFITSreader::cIF_1rel [private]

Definition at line 126 of file GBTFITSreader.h.

Definition at line 181 of file GBTFITSreader.h.

vector<double> GBTFITSreader::cIncVal [private]

Definition at line 180 of file GBTFITSreader.h.

double GBTFITSreader::cLastUTC [private]

Definition at line 121 of file GBTFITSreader.h.

int GBTFITSreader::cNAxes [private]

Definition at line 118 of file GBTFITSreader.h.

long GBTFITSreader::cNAxis[5] [private]

Definition at line 119 of file GBTFITSreader.h.

long GBTFITSreader::cNAxisTime [private]

Definition at line 119 of file GBTFITSreader.h.

long GBTFITSreader::cNRow [private]

Definition at line 119 of file GBTFITSreader.h.

long* GBTFITSreader::cNRowCum [private]

Definition at line 175 of file GBTFITSreader.h.

long* GBTFITSreader::cNRowT [private]

Definition at line 174 of file GBTFITSreader.h.

vector<int> GBTFITSreader::cNumKeys [private]

Definition at line 182 of file GBTFITSreader.h.

int* GBTFITSreader::cPols [private]

for GBT

Definition at line 129 of file GBTFITSreader.h.

long GBTFITSreader::cRaAxis [private]

Definition at line 119 of file GBTFITSreader.h.

vector<double> GBTFITSreader::cRefVal [private]

Definition at line 179 of file GBTFITSreader.h.

vector<String> GBTFITSreader::cRefValKey [private]

Definition at line 178 of file GBTFITSreader.h.

long GBTFITSreader::cRow [private]

Definition at line 119 of file GBTFITSreader.h.

int GBTFITSreader::cScanNo [private]

Definition at line 157 of file GBTFITSreader.h.

fitsfile* GBTFITSreader::cSDptr [private]

Definition at line 122 of file GBTFITSreader.h.

int GBTFITSreader::cStatus [private]

Definition at line 118 of file GBTFITSreader.h.

Definition at line 119 of file GBTFITSreader.h.

long GBTFITSreader::cTimeAxis [private]

Definition at line 119 of file GBTFITSreader.h.

long GBTFITSreader::cTimeIdx [private]

Definition at line 119 of file GBTFITSreader.h.

int* GBTFITSreader::hduId [private]

Definition at line 176 of file GBTFITSreader.h.

int GBTFITSreader::numHDU [private]

Definition at line 177 of file GBTFITSreader.h.

float(* GBTFITSreader::sALFAcal)[2] [static, private]

Definition at line 155 of file GBTFITSreader.h.

int((* GBTFITSreader::sALFAcalNoff)[2] [static, private]

Definition at line 154 of file GBTFITSreader.h.

int(* GBTFITSreader::sALFAcalNon)[2] [static, private]

Definition at line 154 of file GBTFITSreader.h.

float(((* GBTFITSreader::sALFAcalOff)[2] [static, private]

Definition at line 155 of file GBTFITSreader.h.

float((* GBTFITSreader::sALFAcalOn)[2] [static, private]

Definition at line 155 of file GBTFITSreader.h.

int GBTFITSreader::sInit [static, private]

These are for ALFA data: "BDFITS" or "CIMAFITS".

Statics are required for CIMAFITS v2.0 because CAL ON/OFF data is split into separate files.

Definition at line 153 of file GBTFITSreader.h.

int GBTFITSreader::sReset [static, private]

Definition at line 153 of file GBTFITSreader.h.


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