wapp_header_08.h
1/*
2 RCS: $Id: wapp_header_08.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 8
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//#define BYTELAGS 4 /* 8 bit integers ACF/CCF searching only */
17//#define NIBBLAGS 5 /* 4 bit integers ACF/CCF searching only */
18//#define FOLD32 8 /* bit mask with FLOATLAGS and FLOATSPEC */
19 /* if on 32 bit folding is turned on */
20
21struct WAPP_HEADER_v8 {
22
23 int32_t header_version; /* some integer that increments with each revision */
24 int32_t header_size; /* size (in bytes) of this header (nom =1024) */
25 char obs_type[24]; /* what kind of observation is this */
26 /* PULSAR_SEARCH */
27 /* PULSAR_FOLDING */
28 /* SPECTRA_TOTALPOWER */
29/*
30 The following are obtained from current telescope status display
31 note that start AST/LST are for reference purposes only and should
32 not be taken as accurate time stamps. The time stamp can be derived
33 from the obs_date/start_time variables further down in the structure.
34*/
35 double src_ra; /* requested ra J2000 (10000*hr+100*min+sec) */
36 double src_dec; /* requested dec J2000 (10000*deg+100*min+sec) */
37 double start_az; /* telescope azimuth at start of scan (deg) */
38 double start_za; /* telescope zenith angle at start of scan (deg) */
39 double start_ast; /* AST at start of scan (sec) */
40 double start_lst; /* local siderial time at start of scan (sec) */
41/*
42 In the following, anything not supplied/requested by the user
43 is assumed to be calculated by WAPP when it writes the header
44*/
45 double cent_freq; /* user-supplied band center frequency (MHz) */
46 double obs_time; /* user-requested length of this integration (s) */
47 double samp_time; /* user-requested sample time (us) */
48 double wapp_time; /* actual sample time (us) i.e. requested+dead time */
49 double bandwidth; /* total bandwidth (MHz) for this observation */
50
51 int32_t num_lags; /* user-requested number of lags per dump per spect */
52 int32_t scan_number; /* built by WAPP from year+daynumber+3-digit-number */
53
54 char src_name[24]; /* user-supplied source name (usually pulsar name) */
55 char obs_date[24]; /* built by WAPP from yyyymmdd */
56 char start_time[24]; /* UT seconds after midnight (start on 1-sec tick) */
57 char project_id[24]; /* user-supplied AO proposal number (XYYYY) */
58 char observers[24]; /* observer(s) name(s) */
59
60 int32_t nifs; /* user-requested: number of IFs to be recorded */
61 int32_t level; /* user-requested: 1 means 3-level; 2 mean 9-level */
62 int32_t sum; /* user-requested: 1 means that data is sum of IFs */
63 int32_t freqinversion; /* 1 band is inverted, else band is not inverted */
64 int64_t timeoff; /* number of reads between obs start and snap block */
65 int32_t lagformat; /* 0=16 bit uint lags , 1=32 bit uint lags */
66 /* 2=32 bit float lags, 3=32 bit float spectra */
67 int32_t lagtrunc; /* if we truncate data (0 no trunc) */
68 /* for 16 bit lagmux modes, selects which 16 bits */
69 /* of the 32 are included as data */
70 /* 0 is bits 15-0 1,16-1 2,17-2...7,22-7 */
71 int32_t firstchannel; /* 0 when correlator channel a is first, 1 if b */
72 int32_t nbins; /* number of time bins for pulsar folding mode */
73 /* doulbles as maxrecs for snap mode */
74 int32_t isfolding; /* is folding selected */
75 int32_t isalfa; /* is ALFA selected */
76 double dumptime; /* folded integrations for this period of time */
77 double power_analog[2]; /* Power measured by Analog Detector */
78/*
79 In the following, pulsar-specific information is recorded for use
80 by folding programs e.g. the quick-look software. This is passed to
81 WAPP by psrcontrol at the start of the observation.
82
83 The apparent pulse phase and frequency at time "dt" minutes with
84 respect to the start of the observation are then calculated as:
85
86 phase = rphase + dt*60*f0 + coeff[0] + dt*coeff[1] + dt*dt*coeff[2] + ...
87 freq(Hz) = f0 + (1/60)*(coeff[1] + 2*dt*coeff[2] + 3*dt*dt*coeff[3] + ...)
88
89 where the C notation has been used (i.e. coeff[0] is first coefficient etc)
90 for details, see TEMPO notes (http://www.naic.edu/~pulsar/docs/tempo.txt)
91*/
92 double psr_dm; /* pulsar's dispersion measure (cm-3 pc) */
93 double rphase[16]; /* reference phase of pulse (0-1) */
94 double psr_f0[16]; /* pulse frequency at reference epoch (Hz) */
95 double poly_tmid[16]; /* mid point of polyco in (MJD) modified Julian date */
96 double coeff[192]; /* polynomial coefs made by TEMPO, 16 sets of 12 */
97 int32_t num_coeffs[16]; /* number of coefficients */
98 char hostname[24]; /* ascii hostname of machine that took this data */
99 int32_t fold_bits; /* 0 if 16 bits (old default) 1 if 32 bit folding */
100 int32_t iflo_flip; /* consider entire iflo and determine flip */
101 int32_t attena; /* first board parallel port value */
102 int32_t attenb; /* second board parallel port value */
103
104/* alfa info */
105
106 double rfeed_offaz[7]; /* deg az rotated offset all alfa beam to center */
107 double rfeed_offza[7]; /* deg za rotated offset all alfa beam to center */
108 double prfeed_offaz; /* deg az offset to center of alfa beam */
109 double prfeed_offza; /* deg za offset to center of alfa beam */
110 double alfa_raj[7]; /* hr starting actual ra position of alfa beams */
111 double alfa_decj[7]; /* deg starting actual dec position of alfa beams */
112 double alfa_az[7]; /* deg starting actual az position of alfa beams */
113 double alfa_za[7]; /* deg starting actual za postion of alfa beams */
114 double alfa_ang; /* deg alfa rotation angle */
115 double para_ang; /* deg paralactic angle of center beam */
116 char frontend[24]; /* receiver abbrev name */
117
118/* add iflo data */
119
120 double syn1; /* upstairs synthesizer freq Hz */
121 double synfrq[4]; /* downstairs synthesizers (Hz) */
122
123
124 unsigned char prfeed; /* centered alfa beam */
125 unsigned char shcl; /* true if receiver shutter closed */
126 unsigned char sbshcl; /* true if Sband receiver shutter closed */
127
128 unsigned char rfnum; /* position of the receiver selectror */
129 unsigned char zmnormal; /* transfer switch to reverse channels, true normal */
130 unsigned char rfattn[2]; /* attenuator position */
131 unsigned char ifnum; /* if selector, 1/300 2/750, 3/1500, 4/10GHz1500, 5-thru */
132 unsigned char ifattn[2]; /* IF attenuator positions */
133 unsigned char fiber; /* true fi fiber is chosen (always the case) */
134 unsigned char ac2sw; /* ac power to various instruments and other stuff */
135 unsigned char if750nb; /* narrow band 750 filter selected */
136
137 unsigned char phbsig; /* converter combiner signal phase adjust */
138 unsigned char hybrid; /* converter combiner hybrid */
139 unsigned char phblo; /* convert combiner lo phase adjust */
140
141/* downstairs */
142
143 unsigned char xfnormal; /* transfer switch true if normal */
144 unsigned char noise; /* noise on */
145 unsigned char gain[2]; /* gain of downstairs amps */
146 unsigned char inpfrq; /* input distributor position */
147 unsigned char mixer[4]; /* mixer source switches */
148 unsigned char vlbainp; /* vlba input switch position */
149 unsigned char ampinp[4]; /* amplifier input source switches */
150 unsigned char extinp[4]; /* external input selector switches */
151 unsigned char syndest[4]; /* synthesizer destinations */
152 unsigned char calsrc; /* cal source bit */
153
154 unsigned char vis30mhz; /* greg 1 ch 0 */
155 unsigned char pwrmet; /* power meter input switch */
156 unsigned char blank430; /* 430 blanking on */
157 unsigned char fill[6]; /* fill */
158};
159

Generated using doxygen 1.14.0