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

a class containing the header information from an SDDFile More...

#include <SDDHeader.h>

List of all members.

Public Types

enum  StringHeader {
  OBSID,
  OBSERVER,
  TELESCOP,
  PROJID,
  OBJECT,
  OBSMODE,
  FRONTEND,
  BACKEND,
  PRECIS,
  PT_MODEL,
  CL11TYPE,
  COORDCD,
  FRAME,
  VELDEF,
  TYPECAL,
  CFFORM,
  OPENPAR,
  POLARIZ,
  RX_INFO,
  LAST_STRING
}
 String Header Values. More...
enum  BasicInformation {
  HEADLEN,
  DATALEN,
  SCAN,
  SAVENUM,
  NORECORD,
  RECORDID,
  LAST_BASIC
}
 R*8 (Double) Header values. More...
enum  PointingParameters {
  XPOINT,
  YPOINT,
  UXPNT,
  UYPNT,
  PTCON0,
  PTCON1,
  PTCON2,
  PTCON3,
  ORIENT,
  FOCUSR,
  FOCUSV,
  FOCUSH,
  LAST_POINTING
}
enum  ObservingParameters {
  UTDATE,
  UT,
  LST,
  NORCHAN,
  NOSWVAR,
  NOPHASE,
  CYCLEN,
  SAMPRAT,
  PHASEID,
  LAST_OBSERVING
}
enum  Positions {
  EPOCH,
  XSOURCE,
  YSOURCE,
  XREF,
  YREF,
  EPOCRA,
  EPOCDEC,
  GALLONG,
  GALLAT,
  AZ,
  EL,
  INDX,
  INDY,
  DESORG0,
  DESORG1,
  DESORG2,
  LAST_POSITIONS
}
enum  Environment {
  TAMB,
  PRESSURE,
  HUMIDTY,
  REFRAC,
  DEWPT,
  MMH2O,
  LAST_ENVIRONMENT
}
enum  MapParameters {
  SCANANG,
  XZERO,
  YZERO,
  DELTAXR,
  DELTAYR,
  NOPTS,
  NOXPTS,
  NOYPTS,
  XCELL0,
  YCELL0,
  LAST_MAP
}
enum  DataParameters {
  BHWHM,
  OFFSCAN,
  BADCHV,
  RVSYS,
  VELOCITY,
  LAST_DATA
}
enum  EngineeringParameters {
  APPEFF,
  BEAMEFF,
  ANTGAIN,
  ETAL,
  ETAFSS,
  LAST_ENGINEERING
}
enum  GreenBank {
  L1,
  L1F1,
  L1F2,
  L2,
  L2F1,
  L2F2,
  LA,
  LB,
  LC,
  LD,
  LEVCORR,
  PTFUDGE0,
  PTFUDGE1,
  RHO,
  THETA,
  LAST_GREENBANK
}
enum  Tucson {
  SYNFREQ,
  LOFACT,
  HARMONIC,
  LOIF,
  FIRSTIF,
  RAZOFF,
  RELOFF,
  BMTHROW,
  BMORENT,
  BASEOFF,
  OBSTOL,
  SIDEBAND,
  WL,
  GAINS,
  PBEAM0,
  PBEAM1,
  MBEAM0,
  MBEAM1,
  SROFF0,
  SROFF1,
  SROFF2,
  SROFF3,
  FOFFSIG,
  FOFFREF1,
  FOFFREF2,
  LAST_TUCSON
}
enum  OriginalPhaseBlock {
  ORIGINAL_VARVAL,
  LAST_ORIGINAL_PHASE
}
enum  OriginalPhaseBlockStrings {
  ORIGINAL_VARDES,
  ORIGINAL_PHASTB
}
enum  NewPhaseBlockBasics {
  NOSWVARF,
  NUMCYC,
  NUMCYCF,
  NOPHASEF,
  CYCLENF,
  SAMPTIMF,
  LAST_NEW_PHASE_BASICS
}
enum  NewPhaseBlock {
  VARVAL,
  LAST_NEW_PHASE
}
enum  NewPhaseBlockStrings {
  VARDES,
  PHASTB
}
enum  ReceiverBlock {
  OBSFREQ,
  RESTFREQ,
  FREQRES,
  BW,
  TRX,
  TCAL,
  STSYS,
  RTSYS,
  TSOURCE,
  TRMS,
  REFPT,
  X0,
  DELTAX,
  INTTIME,
  NOINT,
  SPN,
  TAUH2O,
  TH2O,
  TAUO2,
  TO2,
  EFFINT,
  LAST_RECEIVER
}
enum  ReductionParameters {
  NOSTAC,
  FSCAN,
  LSCAN,
  LAMP,
  LWID,
  ILI,
  RMS,
  LAST_REDUCTION
}

Public Member Functions

 SDDHeader ()
 construct an empty header block, minimal header, no data array
 SDDHeader (istream &in)
 construct one from istream, uses start of istream to determine how many records to use
 SDDHeader (const SDDHeader &other)
 copy constructor, true copy
 ~SDDHeader ()
 clean up the pointers
SDDHeaderoperator= (const SDDHeader &other)
 assignment operator, true copy
uInt fill (istream &in)
 fill an existing SDDHeader from istream, uses start of istream to determine how many records to use, returns number of bytes actually read the header is resized if necessary
uInt write (ostream &out) const
 write to ostream, returns the number of bytes actually written
void empty ()
 empty out all the header words
Bool isNRAO () const
 Is it an NRAO telescope (12m or 140')
Bool is12m () const
 Is it the 12m.
Bool is140ft () const
 Is it the 140'.
Bool isOTF () const
 see if this is an OTF scan
uInt nvectors () const
 The number of data vectors present (only !=1 for OTF amd POLZ data at present)
String get (StringHeader field) const
 functions to retrieve and set parameters for now, its just simpler to adopt the unipops rule and do no sanity checks on any values (except the string header words)
Bool put (StringHeader field, const String &value)
Double get (BasicInformation field) const
Bool put (BasicInformation field, const Double &value)
Double get (PointingParameters field) const
Bool put (PointingParameters field, const Double &value)
Double get (ObservingParameters field) const
Bool put (ObservingParameters field, const Double &value)
Double get (Positions field) const
Bool put (Positions field, const Double &value)
Double get (Environment field) const
Bool put (Environment field, const Double &value)
Double get (MapParameters field) const
Bool put (MapParameters field, const Double &value)
Double get (DataParameters field) const
Bool put (DataParameters field, const Double &value)
Double get (EngineeringParameters field) const
Bool put (EngineeringParameters field, const Double &value)
Double get (GreenBank field) const
Bool put (GreenBank field, const Double &value)
Double get (Tucson field) const
Bool put (Tucson field, const Double &value)
Double get (ReceiverBlock field) const
Bool put (ReceiverBlock field, const Double &value)
Double get (ReductionParameters field) const
Bool put (ReductionParameters field, const Double &value)
Double get (OriginalPhaseBlock, uInt whichBlock=0) const
 Old class 11, need to specify which block as well as the field.
Bool put (OriginalPhaseBlock field, const Double &value, uInt whichBlock=0)
String get (OriginalPhaseBlockStrings field, uInt whichBlock=0) const
 String get and put.
Bool put (OriginalPhaseBlockStrings field, const String &value, uInt whichBlock=0)
Double get (NewPhaseBlockBasics field) const
 New class 11, the basics are only at the start of the class.
Bool put (NewPhaseBlockBasics field, const Double &value)
Double get (NewPhaseBlock field, uInt whichBlock=0) const
 And for the rest, the block needs to be specified.
Bool put (NewPhaseBlock field, const Double &value, uInt whichBlock)
String get (NewPhaseBlockStrings field, uInt whichBlock=0) const
 Strings need get and put.
Bool put (NewPhaseBlockStrings field, const String &value, uInt whichBlock=0)

Private Member Functions

Double getFromClass (uInt whichClass, uInt offset) const
Bool putToClass (uInt whichClass, uInt offset, const Double &value)
void init_nchars ()
void init_strOffset ()
uInt setOffset (uInt whichClass, uInt number) const
void putPreamble ()
void getPreamble ()

Private Attributes

Vector< Int > * preamble_p
 this holds the preamble information
SDDBlockhdu_p
 this actually holds the header
Bool isOtf_p
 helpful to stash these here
uInt nvectors_p
Vector< uInt > nchars_p
 maps the GNU compiler doesn't seem to like it that this is static I don't think its crucial so punt for now static Vector<uInt> nchars_p;
Vector< uInt > strOffset_p

Detailed Description

a class containing the header information from an SDDFile

Intended use:

Public interface

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

Synopsis

Example

Motivation

Definition at line 74 of file SDDHeader.h.


Member Enumeration Documentation

R*8 (Double) Header values.

Enumerator:
HEADLEN 
DATALEN 
SCAN 
SAVENUM 
NORECORD 
RECORDID 

OR # of OTF spectra in this row.

LAST_BASIC 

OR the # of this OTF spectra.

Definition at line 102 of file SDDHeader.h.

Enumerator:
BHWHM 
OFFSCAN 
BADCHV 
RVSYS 
VELOCITY 
LAST_DATA 

Definition at line 187 of file SDDHeader.h.

Enumerator:
APPEFF 
BEAMEFF 
ANTGAIN 
ETAL 
ETAFSS 
LAST_ENGINEERING 

Definition at line 196 of file SDDHeader.h.

Enumerator:
TAMB 
PRESSURE 
HUMIDTY 
REFRAC 
DEWPT 
MMH2O 
LAST_ENVIRONMENT 

Definition at line 163 of file SDDHeader.h.

Enumerator:
L1 
L1F1 
L1F2 
L2 
L2F1 
L2F2 
LA 
LB 
LC 
LD 
LEVCORR 
PTFUDGE0 
PTFUDGE1 
RHO 
THETA 
LAST_GREENBANK 

Definition at line 205 of file SDDHeader.h.

Enumerator:
SCANANG 
XZERO 
YZERO 
DELTAXR 
DELTAYR 
NOPTS 
NOXPTS 
NOYPTS 
XCELL0 
YCELL0 
LAST_MAP 

Definition at line 173 of file SDDHeader.h.

Enumerator:
VARVAL 
LAST_NEW_PHASE 

Definition at line 271 of file SDDHeader.h.

Enumerator:
NOSWVARF 
NUMCYC 
NUMCYCF 
NOPHASEF 
CYCLENF 
SAMPTIMF 
LAST_NEW_PHASE_BASICS 

Definition at line 262 of file SDDHeader.h.

Enumerator:
VARDES 
PHASTB 

Definition at line 275 of file SDDHeader.h.

Enumerator:
UTDATE 
UT 
LST 
NORCHAN 
NOSWVAR 
NOPHASE 
CYCLEN 
SAMPRAT 
PHASEID 
LAST_OBSERVING 

Definition at line 130 of file SDDHeader.h.

Enumerator:
ORIGINAL_VARVAL 
LAST_ORIGINAL_PHASE 

Definition at line 253 of file SDDHeader.h.

Enumerator:
ORIGINAL_VARDES 
ORIGINAL_PHASTB 

Definition at line 257 of file SDDHeader.h.

Enumerator:
XPOINT 
YPOINT 
UXPNT 
UYPNT 
PTCON0 
PTCON1 
PTCON2 
PTCON3 
ORIENT 
FOCUSR 
FOCUSV 
FOCUSH 
LAST_POINTING 

Definition at line 114 of file SDDHeader.h.

Enumerator:
EPOCH 
XSOURCE 
YSOURCE 
XREF 
YREF 
EPOCRA 
EPOCDEC 
GALLONG 
GALLAT 
AZ 
EL 
INDX 
INDY 
DESORG0 
DESORG1 
DESORG2 
LAST_POSITIONS 

Definition at line 143 of file SDDHeader.h.

Enumerator:
OBSFREQ 
RESTFREQ 
FREQRES 
BW 

Scale Factor (CONT) (K/Count)

TRX 
TCAL 
STSYS 
RTSYS 
TSOURCE 
TRMS 
REFPT 
X0 
DELTAX 
INTTIME 
NOINT 
SPN 
TAUH2O 
TH2O 
TAUO2 
TO2 
EFFINT 
LAST_RECEIVER 

Definition at line 280 of file SDDHeader.h.

Enumerator:
NOSTAC 
FSCAN 
LSCAN 
LAMP 
LWID 
ILI 
RMS 
LAST_REDUCTION 

Definition at line 306 of file SDDHeader.h.

String Header Values.

Enumerator:
OBSID 
OBSERVER 
TELESCOP 
PROJID 
OBJECT 
OBSMODE 
FRONTEND 
BACKEND 
PRECIS 
PT_MODEL 
CL11TYPE 
COORDCD 
FRAME 
VELDEF 
TYPECAL 
CFFORM 
OPENPAR 
POLARIZ 
RX_INFO 
LAST_STRING 

Definition at line 77 of file SDDHeader.h.

Enumerator:
SYNFREQ 
LOFACT 
HARMONIC 
LOIF 
FIRSTIF 
RAZOFF 
RELOFF 
BMTHROW 
BMORENT 
BASEOFF 
OBSTOL 
SIDEBAND 
WL 
GAINS 
PBEAM0 
PBEAM1 
MBEAM0 
MBEAM1 
SROFF0 
SROFF1 
SROFF2 
SROFF3 
FOFFSIG 
FOFFREF1 
FOFFREF2 
LAST_TUCSON 

Definition at line 224 of file SDDHeader.h.


Constructor & Destructor Documentation

construct an empty header block, minimal header, no data array

SDDHeader::SDDHeader ( istream &  in)

construct one from istream, uses start of istream to determine how many records to use

SDDHeader::SDDHeader ( const SDDHeader other)

copy constructor, true copy

clean up the pointers


Member Function Documentation

void SDDHeader::empty ( )

empty out all the header words

uInt SDDHeader::fill ( istream &  in)

fill an existing SDDHeader from istream, uses start of istream to determine how many records to use, returns number of bytes actually read the header is resized if necessary

functions to retrieve and set parameters for now, its just simpler to adopt the unipops rule and do no sanity checks on any values (except the string header words)

for string header words, they must be less than the approproate length or that string will not be set.

Double SDDHeader::get ( BasicInformation  field) const
Double SDDHeader::get ( PointingParameters  field) const
Double SDDHeader::get ( ObservingParameters  field) const
Double SDDHeader::get ( Positions  field) const
Double SDDHeader::get ( Environment  field) const
Double SDDHeader::get ( MapParameters  field) const
Double SDDHeader::get ( DataParameters  field) const
Double SDDHeader::get ( EngineeringParameters  field) const
Double SDDHeader::get ( GreenBank  field) const
Double SDDHeader::get ( Tucson  field) const
Double SDDHeader::get ( ReceiverBlock  field) const
Double SDDHeader::get ( ReductionParameters  field) const
Double SDDHeader::get ( OriginalPhaseBlock  ,
uInt  whichBlock = 0 
) const

Old class 11, need to specify which block as well as the field.

String SDDHeader::get ( OriginalPhaseBlockStrings  field,
uInt  whichBlock = 0 
) const

String get and put.

Double SDDHeader::get ( NewPhaseBlockBasics  field) const

New class 11, the basics are only at the start of the class.

Double SDDHeader::get ( NewPhaseBlock  field,
uInt  whichBlock = 0 
) const

And for the rest, the block needs to be specified.

String SDDHeader::get ( NewPhaseBlockStrings  field,
uInt  whichBlock = 0 
) const

Strings need get and put.

Double SDDHeader::getFromClass ( uInt  whichClass,
uInt  offset 
) const [private]
void SDDHeader::getPreamble ( ) [private]
void SDDHeader::init_nchars ( ) [private]
void SDDHeader::init_strOffset ( ) [private]
Bool SDDHeader::is12m ( ) const

Is it the 12m.

Bool SDDHeader::is140ft ( ) const

Is it the 140'.

Bool SDDHeader::isNRAO ( ) const

Is it an NRAO telescope (12m or 140')

Bool SDDHeader::isOTF ( ) const

see if this is an OTF scan

uInt SDDHeader::nvectors ( ) const

The number of data vectors present (only !=1 for OTF amd POLZ data at present)

SDDHeader& SDDHeader::operator= ( const SDDHeader other)

assignment operator, true copy

Bool SDDHeader::put ( StringHeader  field,
const String value 
)
Bool SDDHeader::put ( BasicInformation  field,
const Double &  value 
)
Bool SDDHeader::put ( PointingParameters  field,
const Double &  value 
)
Bool SDDHeader::put ( ObservingParameters  field,
const Double &  value 
)
Bool SDDHeader::put ( Positions  field,
const Double &  value 
)
Bool SDDHeader::put ( Environment  field,
const Double &  value 
)
Bool SDDHeader::put ( MapParameters  field,
const Double &  value 
)
Bool SDDHeader::put ( DataParameters  field,
const Double &  value 
)
Bool SDDHeader::put ( EngineeringParameters  field,
const Double &  value 
)
Bool SDDHeader::put ( GreenBank  field,
const Double &  value 
)
Bool SDDHeader::put ( Tucson  field,
const Double &  value 
)
Bool SDDHeader::put ( ReceiverBlock  field,
const Double &  value 
)
Bool SDDHeader::put ( ReductionParameters  field,
const Double &  value 
)
Bool SDDHeader::put ( OriginalPhaseBlock  field,
const Double &  value,
uInt  whichBlock = 0 
)
Bool SDDHeader::put ( OriginalPhaseBlockStrings  field,
const String value,
uInt  whichBlock = 0 
)
Bool SDDHeader::put ( NewPhaseBlockBasics  field,
const Double &  value 
)
Bool SDDHeader::put ( NewPhaseBlock  field,
const Double &  value,
uInt  whichBlock 
)
Bool SDDHeader::put ( NewPhaseBlockStrings  field,
const String value,
uInt  whichBlock = 0 
)
void SDDHeader::putPreamble ( ) [private]
Bool SDDHeader::putToClass ( uInt  whichClass,
uInt  offset,
const Double &  value 
) [private]
uInt SDDHeader::setOffset ( uInt  whichClass,
uInt  number 
) const [private]
uInt SDDHeader::write ( ostream &  out) const

write to ostream, returns the number of bytes actually written


Member Data Documentation

this actually holds the header

Definition at line 424 of file SDDHeader.h.

Bool SDDHeader::isOtf_p [private]

helpful to stash these here

Definition at line 427 of file SDDHeader.h.

Vector<uInt> SDDHeader::nchars_p [private]

maps the GNU compiler doesn't seem to like it that this is static I don't think its crucial so punt for now static Vector<uInt> nchars_p;

Definition at line 434 of file SDDHeader.h.

uInt SDDHeader::nvectors_p [private]

Definition at line 428 of file SDDHeader.h.

Vector<Int>* SDDHeader::preamble_p [private]

this holds the preamble information

Definition at line 422 of file SDDHeader.h.

Vector<uInt> SDDHeader::strOffset_p [private]

Definition at line 436 of file SDDHeader.h.


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