1 // Copyright (c) <2012> <Leif Asbrink>
2 //
3 // Permission is hereby granted, free of charge, to any person
4 // obtaining a copy of this software and associated documentation
5 // files (the "Software"), to deal in the Software without restriction,
6 // including without limitation the rights to use, copy, modify,
7 // merge, publish, distribute, sublicense, and/or sell copies of
8 // the Software, and to permit persons to whom the Software is
9 // furnished to do so, subject to the following conditions:
10 //
11 // The above copyright notice and this permission notice shall be
12 // included in all copies or substantial portions of the Software.
13 //
14 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
16 // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
18 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
19 // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
21 // OR OTHER DEALINGS IN THE SOFTWARE.
22 
23 
24 
25 #include "globdef.h"
26 #include "caldef.h"
27 
28 char *cal_type_text[CAL_TYPE_MAX]={
29                      "Refine filter calibration",
30                      "Collect pulses to calibrate filter",
31                      "I/Q balance calibration",
32                      "I/Q balance calibration, data in ram",
33                      "I/Q balance calibration, collect data",
34                      "Adjust pulse generator for filter calibration",
35                      "Set desired shape for filter calibration",
36                      "Remove center discontinuity. Set exclude",
37                      "Remove center discontinuity results",
38                      "Interpolate across center discontinuity",
39                      "Calibration routines"};
40 
41 int cal_type;
42 
43 
44 short int *cal_graph;
45 unsigned short int *cal_permute;
46 COSIN_TABLE *cal_table;
47 float *cal_win;
48 float *cal_buf;
49 float *cal_buf2;
50 float *cal_buf3;
51 float *cal_buf4;
52 float *cal_buf5;
53 float *cal_buf6;
54 float *cal_buf7;
55 float *cal_tmp;
56 float *cal_fft1_desired;
57 float *cal_fft1_filtercorr;
58 float *cal_fft1_sumsq;
59 float *cal_fft1_slowsum;
60 
61 int *bal_flag;
62 int *bal_pos;
63 float *bal_phsum;
64 float *bal_amprat;
65 float *contracted_iq_foldcorr;
66 MEM_INF calmem[MAX_CAL_ARRAYS];
67 MEMREF_T *calmem_handle;
68 int bal_updflag;
69 int bal_segments;
70 int bal_screen;
71 float cal_ymax;
72 float cal_yzer;
73 float cal_xgain;
74 int cal_xshift;
75 float cal_ygain;
76 int cal_lowedge;
77 int cal_midlim;
78 int cal_domain;
79 float cal_interval;
80 float cal_signal_level;
81 int cal_fft1_n;
82 int cal_fft1_size;
83 int caliq_clear_flag;
84