HOPS
HOPS class reference
pass_struct.h
Go to the documentation of this file.
1 #ifndef PASS_STRUCT
2 #define PASS_STRUCT
3 
4 #include "hops_complex.h"
5 #include "control.h"
6 #include "mk4_data.h"
7 #include "mk4_sizes.h"
8 
9 #define USB_FLAG 1
10 #define LSB_FLAG 2
11  // polarization values in pass array structure
12 #define POL_LL 0
13 #define POL_RR 1
14 #define POL_LR 2
15 #define POL_RL 3
16  // polarization values in param array structure
17 #define POL_ALL 0
18 #define POLMASK_LL 1
19 #define POLMASK_RR 2
20 #define POLMASK_LR 4
21 #define POLMASK_RL 8
22 #define POL_IXY 31
23  /* maximum # of pcal tones per channel */
24 #define MAX_PCF 64
25 
27  {
28  hops_complex phasecal_lcp[MAX_PCF]; /* USB only for now */
29  float pcweight_lcp; /* (see pcal_interp routine) */
31  float pcweight_rcp;
32  float bigpos[4]; /* State count statistics as fractions: */
33  float pos[4]; /* lcp_usb, lcp_lsb, rcp_usb, rcp_lsb */
34  float neg[4];
35  float bigneg[4];
36  hops_complex mt_pcal[2]; // pc phasor for multitone mode L:R or H:V
37  double mt_delay[2]; // multitone delay (us) [L:R or H:V or X:Y]
38  };
39 
40 struct data_corel
41  {
42  int flag;
43  struct type_120 *apdata_ll[2]; // Correlated data by sideband
44  struct type_120 *apdata_rr[2];
45  struct type_120 *apdata_lr[2];
46  struct type_120 *apdata_rl[2];
47  int sband;
48  hops_complex *sbdelay; // Allocated and freed in fringe_search
49  struct interp_sdata ref_sdata;
50  struct interp_sdata rem_sdata;
51  float usbfrac;
52  float lsbfrac;
53  hops_complex pc_phasor[4]; // Extracted in rotate_pcal [LL:RR:LR:RL]
54  };
55 
56 struct freq_corel
57  {
58  char freq_code; /* Fourfit frequency identifier (a..zA..Z$%) */
59  double frequency; /* sky frequency (MHz) */
60  char fgroup;
61  int ch_idx[2]; // [ref/rem] index into ovex channels array for this freq
62  char ch_usb_lcp[2][8]; /* VEX channel ids by station */
63  char ch_usb_rcp[2][8];
64  char ch_lsb_lcp[2][8];
65  char ch_lsb_rcp[2][8];
66  short trk_lcp[2][16]; /* Contributing tracks by station */
67  short trk_rcp[2][16];
68  float mean_lcp_trk_err[2][16]; /* Mean track error rates by station */
69  float mean_rcp_trk_err[2][16];
70  float pc_freqs[2][MAX_PCF];
71  short bbc_lcp[2]; /* Physical BBC numbers by station */
72  short bbc_rcp[2];
73  int index[8]; /* Corel index number by sideband/pol'n */
74  int nsb_channels; /* count of sidebands for integration time */
75  int data_peers; /* number of freq_corel sharing underlying data */
76  int corel_index; /* index in the correlated data (freq_corel) */
77  int fcode_index; /* index in list of frequency labels (control.chid) */
78  int data_alloc; /* Flag indicating whether space alloced for data */
79  struct data_corel *data; /* pointer to first of parent.num_ap; the rest follow */
80  };
81 
82 
83 // pass_data[MAX_FREQ] seems to have been the case at one time,
84 // but MAX_CHAN was boosted to twice that, presumably a DSB thing.
85 struct type_pass
86  {
88  int nfreq;
89  int channels; // sum(fc nsb_channels)
90  int nlags;
91  int num_ap;
92  int npctones; // max number of pcal tones in any freq
93  int ap_off;
94  int pol; // 0|1|2|3 = LL|RR|LR|RL or last pol if param.pol!=0
95  int linpol[2]; // 0|1 if circular|linear pol for ref & remote
96  int npols; // number of polarizations in coherent sum
97  int pprods_present[4]; // flags for pol.product present, like pol
98  int autocorr;
99  int pci[2][MAX_CHAN]; /* index of desired pcal tone by stn */
101  double start;
102  double stop;
103  double reftime;
104  struct c_block control;
105  };
106 
107 static char fchars[64] =
108  {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p',
109  'q','r','s','t','u','v','w','x','y','z','A','B','C','D','E','F',
110  'G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V',
111  'W','X','Y','Z','0','1','2','3','4','5','6','7','8','9','$','%'};
112 
113 static char *polab[4] =
114  { (char*)"LL", (char*)"RR", (char*)"LR", (char*)"RL" };
115 
116 extern void modify_pol (struct type_pass *p, char *polstr);
117 #endif
Definition: control.h:23
#define hops_complex
Definition: hops_complex.h:48
#define MAX_CHAN
Definition: mk4_sizes.h:24
float neg[4]
Definition: pass_struct.h:34
float mean_rcp_trk_err[2][16]
Definition: pass_struct.h:69
int flag
Definition: pass_struct.h:42
struct type_120 * apdata_ll[2]
Definition: pass_struct.h:43
short bbc_lcp[2]
Definition: pass_struct.h:71
hops_complex phasecal_lcp[MAX_PCF]
Definition: pass_struct.h:28
int corel_index
Definition: pass_struct.h:76
double mt_delay[2]
Definition: pass_struct.h:37
float bigneg[4]
Definition: pass_struct.h:35
short trk_lcp[2][16]
Definition: pass_struct.h:66
char ch_lsb_rcp[2][8]
Definition: pass_struct.h:65
struct interp_sdata ref_sdata
Definition: pass_struct.h:49
int fcode_index
Definition: pass_struct.h:77
struct freq_corel pass_data[MAX_CHAN]
Definition: pass_struct.h:87
hops_complex pc_phasor[4]
Definition: pass_struct.h:53
int ap_off
Definition: pass_struct.h:93
struct type_120 * apdata_lr[2]
Definition: pass_struct.h:45
int data_peers
Definition: pass_struct.h:75
double stop
Definition: pass_struct.h:102
int npctones
Definition: pass_struct.h:92
float pos[4]
Definition: pass_struct.h:33
int pprods_present[4]
Definition: pass_struct.h:97
int pcinband[2][MAX_CHAN][MAX_PCF]
Definition: pass_struct.h:100
float mean_lcp_trk_err[2][16]
Definition: pass_struct.h:68
char ch_lsb_lcp[2][8]
Definition: pass_struct.h:64
int index[8]
Definition: pass_struct.h:73
float lsbfrac
Definition: pass_struct.h:52
hops_complex phasecal_rcp[MAX_PCF]
Definition: pass_struct.h:30
int linpol[2]
Definition: pass_struct.h:95
int nfreq
Definition: pass_struct.h:88
int channels
Definition: pass_struct.h:89
short trk_rcp[2][16]
Definition: pass_struct.h:67
double start
Definition: pass_struct.h:101
float pc_freqs[2][MAX_PCF]
Definition: pass_struct.h:70
char ch_usb_rcp[2][8]
Definition: pass_struct.h:63
char fgroup
Definition: pass_struct.h:60
float usbfrac
Definition: pass_struct.h:51
char freq_code
Definition: pass_struct.h:58
int ch_idx[2]
Definition: pass_struct.h:61
double frequency
Definition: pass_struct.h:59
int data_alloc
Definition: pass_struct.h:78
int sband
Definition: pass_struct.h:47
float pcweight_rcp
Definition: pass_struct.h:31
char ch_usb_lcp[2][8]
Definition: pass_struct.h:62
struct interp_sdata rem_sdata
Definition: pass_struct.h:50
int num_ap
Definition: pass_struct.h:91
int nsb_channels
Definition: pass_struct.h:74
double reftime
Definition: pass_struct.h:103
#define MAX_PCF
Definition: pass_struct.h:24
int pci[2][MAX_CHAN]
Definition: pass_struct.h:99
short bbc_rcp[2]
Definition: pass_struct.h:72
struct type_120 * apdata_rr[2]
Definition: pass_struct.h:44
hops_complex mt_pcal[2]
Definition: pass_struct.h:36
int npols
Definition: pass_struct.h:96
struct type_120 * apdata_rl[2]
Definition: pass_struct.h:46
int autocorr
Definition: pass_struct.h:98
float pcweight_lcp
Definition: pass_struct.h:29
hops_complex * sbdelay
Definition: pass_struct.h:48
struct data_corel * data
Definition: pass_struct.h:79
float bigpos[4]
Definition: pass_struct.h:32
struct c_block control
Definition: pass_struct.h:104
int nlags
Definition: pass_struct.h:90
void modify_pol(struct type_pass *p, char *polstr)
Definition: generate_text.c:1065
int pol
Definition: pass_struct.h:94
Definition: pass_struct.h:41
Definition: pass_struct.h:57
Definition: pass_struct.h:27
Definition: pass_struct.h:86
Definition: type_120.h:80