wapp_header_03.h
1 /*
2  RCS: $Id: wapp_header_03.h,v 1.1 2008/01/17 20:59:40 demorest Exp $
3  wapp_head.h - header parameters for WAPP (Wideband Arecibo Pulsar Processor)
4  This structure (WAPP_HEADER) is based on the PSPM-style headers but has
5  been somewhat simplified to include just essential/relevant parameters.
6 */
7 
8 //#define HEADER_VERSION 3
9 
10 /* lagformat for wapp_header */
11 
12 //#define INTLAGS 0 /* 16 bit integers - searching only */
13 //#define LONGLAGS 1 /* 32 bit integers - searching only */
14 //#define FLOATLAGS 2 /* 32 bit float ACF/CCFs folding only */
15 //#define FLOATSPEC 3 /* 32 bit float fftd ACFs folding only */
16 
17 struct WAPP_HEADER_v3 {
18 
19  int32_t header_version; /* some integer that increments with each revision */
20  int32_t header_size; /* size (in bytes) of this header (nom =1024) */
21  char obs_type[24]; /* what kind of observation is this */
22  /* PULSAR_SEARCH */
23  /* PULSAR_FOLDING */
24  /* SPECTRA_TOTALPOWER */
25 /*
26  The following are obtained from current telescope status display
27  note that start AST/LST are for reference purposes only and should
28  not be taken as accurate time stamps. The time stamp can be derived
29  from the obs_date/start_time variables further down in the structure.
30 */
31  double src_ra; /* requested ra J2000 (10000*hr+100*min+sec) */
32  double src_dec; /* requested dec J2000 (10000*deg+100*min+sec) */
33  double start_az; /* telescope azimuth at start of scan (deg) */
34  double start_za; /* telescope zenith angle at start of scan (deg) */
35  double start_ast; /* AST at start of scan (sec) */
36  double start_lst; /* local siderial time at start of scan (sec) */
37 /*
38  In the following, anything not supplied/requested by the user
39  is assumed to be calculated by WAPP when it writes the header
40 */
41  double cent_freq; /* user-supplied band center frequency (MHz) */
42  double obs_time; /* user-requested length of this integration (s) */
43  double samp_time; /* user-requested sample time (us) */
44  double wapp_time; /* actual sample time (us) i.e. requested+dead time */
45  double bandwidth; /* total bandwidth (MHz) for this observation */
46 
47  int32_t num_lags; /* user-requested number of lags per dump per spect */
48  int32_t scan_number; /* built by WAPP from year+daynumber+3-digit-number */
49 
50  char src_name[24]; /* user-supplied source name (usually pulsar name) */
51  char obs_date[24]; /* built by WAPP from yyyymmdd */
52  char start_time[24]; /* UT seconds after midnight (start on 1-sec tick) */
53  char project_id[24]; /* user-supplied AO proposal number (XYYYY) */
54  char observers[24]; /* observer(s) name(s) */
55 
56  int32_t nifs; /* user-requested: number of IFs to be recorded */
57  int32_t level; /* user-requested: 1 means 3-level; 2 mean 9-level */
58  int32_t sum; /* user-requested: 1 means that data is sum of IFs */
59  int32_t freqinversion; /* 1 band is inverted, else band is not inverted */
60  int64_t timeoff; /* number of reads between obs start and snap block */
61  int32_t lagformat; /* 0=16 bit uint lags , 1=32 bit uint lags */
62  /* 2=32 bit float lags, 3=32 bit float spectra */
63  int32_t lagtrunc; /* if we truncate data (0 no trunc) */
64  /* for 16 bit lagmux modes, selects which 16 bits */
65  /* of the 32 are included as data */
66  /* 0 is bits 15-0 1,16-1 2,17-2...7,22-7 */
67  int32_t firstchannel; /* 0 when correlator channel a is first, 1 if b */
68  int32_t nbins; /* number of time bins for pulsar folding mode */
69  /* doulbles as maxrecs for snap mode */
70  double dumptime; /* folded integrations for this period of time */
71  double power_analog[2]; /* Power measured by Analog Detector */
72 /*
73  In the following, pulsar-specific information is recorded for use
74  by folding programs e.g. the quick-look software. This is passed to
75  WAPP by psrcontrol at the start of the observation.
76 
77  The apparent pulse phase and frequency at time "dt" minutes with
78  respect to the start of the observation are then calculated as:
79 
80  phase = rphase + dt*60*f0 + coeff[0] + dt*coeff[1] + dt*dt*coeff[2] + ...
81  freq(Hz) = f0 + (1/60)*(coeff[1] + 2*dt*coeff[2] + 3*dt*dt*coeff[3] + ...)
82 
83  where the C notation has been used (i.e. coeff[0] is first coefficient etc)
84  for details, see TEMPO notes (http://www.naic.edu/~pulsar/docs/tempo.txt)
85 */
86  double psr_dm; /* pulsar's dispersion measure (cm-3 pc) */
87  double rphase[16]; /* reference phase of pulse (0-1) */
88  double psr_f0[16]; /* pulse frequency at reference epoch (Hz) */
89  double poly_tmid[16]; /* mid point of polyco in (MJD) modified Julian date */
90  double coeff[144]; /* polynomial coefficients calculated by TEMPO effectively [9][16] */
91  int32_t num_coeffs[16]; /* number of coefficients */
92 
93  char filler[120]; /* this pads out the header to 2048 bytes */
94 
95 };

Generated using doxygen 1.8.17