baseband_header.h
1 /***************************************************************************
2  *
3  * Copyright (C) 2003 by Willem van Straten
4  * Licensed under the Academic Free License version 2.1
5  *
6  ***************************************************************************/
7 #ifndef __BASEBAND_HEADER_H
8 #define __BASEBAND_HEADER_H
9 
10 #include <inttypes.h>
11 
12 // Q: why a C struct?
13 // A: to minimize the chances of discrepency between state as understood
14 // in the software and state as written to disk with one big write
15 
16 typedef struct baseband_header_t {
17 
18  // Endian-ness code
19  uint32_t endian;
20  unsigned int version;
21  unsigned int size;
22 
23  // How the data was read from file during processing
24  unsigned int totaljobs;
25  uint64_t gulpsize;
26  uint64_t seeksize;
27 
28  // state of voltage: analytic(complex)=2 or Nyquist(real)=1
29  int voltage_state;
30  // the number of independantly sampled analog channels
31  int analog_channels;
32  // number of time samples used while dynamic level setting
33  int ppweight;
34  // tolerance to invalid sampling threshold
35  int dls_threshold_limit;
36 
37  // number of passbands kept (usually 2 polns, or maybe one for each of four
38  // undersampled analog channels)
39  int pband_channels;
40 
41  // number of bins in passband
42  int pband_resolution;
43 
44  // # of time samples entering into convolution with the dedispersion kernel
45  int nfft;
46 
47  // # of (native voltage state) time samples discarded after convolution
48  // int nsmear;
49 
50  // Version 5 change: As the impulse response function may be
51  // assymetric, the old nsmear attribute is now interpreted as
52  // nsmear_pos * 2.
53  int nsmear_pos;
54 
55  // scrunch detected power before folding
56  int nscrunch;
57 
58  // This space ensures that the structure appears the same regardless of
59  // memory alignment convention
60  int memory_align;
61 
62  // the factor by which the resulting profiles are normalized
63  double power_normalization;
64 
65  // If a synthetic filterbank was created, then the following apply:
66  // size of backward FFTs (into time domain)
67  int f_resolution;
68  // over-sampling in the time domain
69  int t_resolution;
70 
71  // various flags for various states and operations performed.
72 
73  uint64_t time_domain;
74  uint64_t frequency_domain;
75 
76  // Version 1 additions
77  float mean_power_cutoff;
78 
79  // Version 2 additions
80  int hanning_smoothing;
81 
82  // Version 3 addition
83  // char pcalid [16];
84 
85  // Version 4 addition
86  // (note that Version 4 simply increases the size of pcalid)
87  char pcalid [64];
88 
89  // Version 5 addition
90  //
91  // # of time samples discarded from right hand side of convolution product
92  int nsmear_neg;
93 
94  // # number of filterbank channels used during reduction
95  int nchan;
96 
97 } baseband_header;
98 
99 
100 // //////////////////////////////////////////////////////////////////////
101 // sizeof(baseband_header)
102 #define BASEBAND_HEADER_SIZE 184
103 
104 // //////////////////////////////////////////////////////////////////////
105 // Endian code
106 #define BASEBAND_HEADER_ENDIAN 0x01234567
107 #define BASEBAND_OPPOSITE_ENDIAN 0x67452301
108 
109 // //////////////////////////////////////////////////////////////////////
110 // Version
111 #define BASEBAND_HEADER_VERSION 6
112 
113 #endif
Defines the PSRCHIVE library.
Definition: CalSource.h:17

Generated using doxygen 1.8.17