wapp_header_06.h
1 /*
2  RCS: $Id: wapp_header_06.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 6
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 
21 struct WAPP_HEADER_v6 {
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  double dumptime; /* folded integrations for this period of time */
75  double power_analog[2]; /* Power measured by Analog Detector */
76 /*
77  In the following, pulsar-specific information is recorded for use
78  by folding programs e.g. the quick-look software. This is passed to
79  WAPP by psrcontrol at the start of the observation.
80 
81  The apparent pulse phase and frequency at time "dt" minutes with
82  respect to the start of the observation are then calculated as:
83 
84  phase = rphase + dt*60*f0 + coeff[0] + dt*coeff[1] + dt*dt*coeff[2] + ...
85  freq(Hz) = f0 + (1/60)*(coeff[1] + 2*dt*coeff[2] + 3*dt*dt*coeff[3] + ...)
86 
87  where the C notation has been used (i.e. coeff[0] is first coefficient etc)
88  for details, see TEMPO notes (http://www.naic.edu/~pulsar/docs/tempo.txt)
89 */
90  double psr_dm; /* pulsar's dispersion measure (cm-3 pc) */
91  double rphase[16]; /* reference phase of pulse (0-1) */
92  double psr_f0[16]; /* pulse frequency at reference epoch (Hz) */
93  double poly_tmid[16]; /* mid point of polyco in (MJD) modified Julian date */
94  double coeff[192]; /* polynomial coefs made by TEMPO, 16 sets of 12 */
95  int32_t num_coeffs[16]; /* number of coefficients */
96  char hostname[24]; /* ascii hostname of machine that took this data */
97  int32_t fold_bits; /* 0 if 16 bits (old default) 1 if 32 bit folding */
98  int32_t iflo_flip; /* consider entire iflo and determine flip */
99 
100 /* add iflo data */
101 
102  double syn1; /* upstairs synthesizer freq Hz */
103  double synfrq[4]; /* downstairs synthesizers (Hz) */
104 
105 
106  unsigned char shcl; /* true if receiver shutter closed */
107  unsigned char sbshcl; /* true if Sband receiver shutter closed */
108 
109  unsigned char rfnum; /* position of the receiver selectror */
110  unsigned char zmnormal; /* transfer switch to reverse channels, true normal */
111  unsigned char rfattn[2]; /* attenuator position */
112  unsigned char ifnum; /* if selector, 1/300 2/750, 3/1500, 4/10GHz1500, 5-thru */
113  unsigned char ifattn[2]; /* IF attenuator positions */
114  unsigned char fiber; /* true fi fiber is chosen (always the case) */
115  unsigned char ac2sw; /* ac power to various instruments and other stuff */
116 
117  unsigned char phbsig; /* converter combiner signal phase adjust */
118  unsigned char hybrid; /* converter combiner hybrid */
119  unsigned char phblo; /* convert combiner lo phase adjust */
120 
121 /* downstairs */
122 
123  unsigned char xfnormal; /* transfer switch true if normal */
124  unsigned char noise; /* noise on */
125  unsigned char gain[2]; /* gain of downstairs amps */
126  unsigned char inpfrq; /* input distributor position */
127  unsigned char mixer[4]; /* mixer source switches */
128  unsigned char vlbainp; /* vlba input switch position */
129  unsigned char ampinp[4]; /* amplifier input source switches */
130  unsigned char extinp[4]; /* external input selector switches */
131  unsigned char syndest[4]; /* synthesizer destinations */
132  unsigned char calsrc; /* cal source bit */
133 
134  unsigned char vis30mhz; /* greg 1 ch 0 */
135  unsigned char pwrmet; /* power meter input switch */
136  unsigned char blank430; /* 430 blanking on */
137 };
138 

Generated using doxygen 1.8.17