HOPS
HOPS class reference
fringex.h
Go to the documentation of this file.
1  /* Modes for clear_fxp() */
2 #define ALL 0
3 #define FILES 1
4 #define ACCUMS 2
5  /* Modes for fringex itself */
6 #define CMODE 0x01
7 #define OMODE 0x02
8 #define QMODE 0x04
9 #define SEARCH 0x08
10 #define NOLOSS 0x10
11 #define BINARYMODE 0x20
12 #define SRCHPOS 0x40
13 
14 //memory allocation codes
15 #define NO_ALLOC_ERROR 0
16 #define ALLOC_ERROR 1
17 
18 //#define PI 3.141592654
19 #define PI M_PI
20 
21 #include <math.h>
22 #include <stdio.h>
23 #include <stdlib.h>
24 #include <string.h>
25 #include "adata.h"
26 #include "fstruct.h"
27 #include "general.h"
28 #include "mk4_afio.h"
29 #include "mk4_data.h"
30 #include "mk4_dfio.h"
31 #include "mk4_util.h"
32 #include "mk4_vex.h"
33 #include "msg.h"
34 
35 #define NFX_FCHAN MAXFREQ
36 #define NFX_SB_64 64 /* type 205->ffit_chan */
37 #define NFX_SB_32 8*MAXFREQ /* type 203->channels */
38 
39 struct fxparam
40  {
41  /* Command line parameters */
42  int mode;
44  double raoff;
45  double decoff;
46  double rateoff;
47  double delayoff;
48  double userfreq;
49  double nsecs;
50  int account;
51  int version;
52  /* Calculated parameters */
53  double fchan[NFX_FCHAN];
54  double ffit_reffreq;
55  double reffreq;
56  double reftime;
57  double dprate;
58  double acc_period;
59  double srch_cotime;
60  double noloss_cotime;
61  double delay;
62  double rate;
63  double bandwidth;
64  double amp_corr_fact;
65  /* Binary file images */
66  struct mk4_fringe *fringe;
67  struct mk4_sdata *sdata[2]; /* ptrs to ref,rem station data */
68 
69  /* Interim segment sums */
70  int nsegs;
72  double tstart;
73  double numaccp;
74  double segstart;
75  double* rsum;
76  double* isum;
77  double* segsec;
78  double* segcount;
79  double* seglen;
80  /* Receptacle for results */
82  };
83 
84  /* Structure for looping functions */
85 #define MAXNSECS 50
86 #define MAXRATES 500
87 #define MAXDELAYS 500
88 
89 struct loops
90  {
91  int nnsec;
92  double nsecs[MAXNSECS];
93  int nrates;
94  double rates[MAXRATES];
95  int ndelays;
96  double delays[MAXDELAYS];
97  };
98 
99 extern int msglev;
100 
101 extern void accum_segs (struct fxparam *);
102 extern void init_fxp(struct fxparam *);
103 extern int determine_nsegs (const struct fxparam *);
104 extern int realloc_segs(struct fxparam *, int);
105 extern int calc_seg (struct fxparam *, int );
106 extern void clear_loops (struct loops *);
107 extern void clear_fxp (struct fxparam *, int );
108 extern int filelist (char *, int , fstruct **, int *);
109 extern int fill_aline (struct mk4_fringe *, struct vex *,
110  char *, fringesum *, int);
111 extern void model (double, struct fxparam *, double *);
112 extern int parse_dflag (char *, int *, struct loops *);
113 extern int parse_iflag (char *, int *, struct loops *);
114 extern int parse_cmdline (int, char **,
115  fstruct **, struct fxparam *, struct loops *);
116 extern int read_binaries (fstruct *, struct fxparam *);
117 extern int set_loops (struct fxparam *, struct loops *);
118 
119 /*
120  * eof
121  */
Definition: adata.h:70
int determine_nsegs(const struct fxparam *)
Definition: determine_nsegs.c:20
double decoff
Definition: fringex.h:45
int no_amp_corr
Definition: fringex.h:43
double * segcount
Definition: fringex.h:78
fringesum adata
Definition: fringex.h:81
int realloc_segs(struct fxparam *, int)
Definition: realloc_segs.c:16
double ffit_reffreq
Definition: fringex.h:54
#define MAXRATES
Definition: fringex.h:86
void accum_segs(struct fxparam *)
Definition: accum_segs.c:23
int account
Definition: fringex.h:50
double delayoff
Definition: fringex.h:47
double * seglen
Definition: fringex.h:79
void clear_loops(struct loops *)
Definition: clear_loops.c:14
void model(double, struct fxparam *, double *)
Definition: model.c:8
double reftime
Definition: fringex.h:56
int read_binaries(fstruct *, struct fxparam *)
Definition: read_binaries.c:24
int nsegs_allocd
Definition: fringex.h:71
double rates[MAXRATES]
Definition: fringex.h:94
struct mk4_sdata * sdata[2]
Definition: fringex.h:67
struct mk4_fringe * fringe
Definition: fringex.h:66
int parse_cmdline(int, char **, fstruct **, struct fxparam *, struct loops *)
Definition: applications/fringex/src/parse_cmdline.c:28
double tstart
Definition: fringex.h:72
double acc_period
Definition: fringex.h:58
double segstart
Definition: fringex.h:74
#define MAXNSECS
Definition: fringex.h:85
int version
Definition: fringex.h:51
double fchan[NFX_FCHAN]
Definition: fringex.h:53
double delays[MAXDELAYS]
Definition: fringex.h:96
#define MAXDELAYS
Definition: fringex.h:87
double rateoff
Definition: fringex.h:46
double nsecs
Definition: fringex.h:49
double * segsec
Definition: fringex.h:77
double amp_corr_fact
Definition: fringex.h:64
int nsegs
Definition: fringex.h:70
int calc_seg(struct fxparam *, int)
Definition: calc_seg.c:22
int parse_iflag(char *, int *, struct loops *)
Definition: parse_iflag.c:20
int fill_aline(struct mk4_fringe *, struct vex *, char *, fringesum *, int)
Definition: fill_aline.c:24
int ndelays
Definition: fringex.h:95
double numaccp
Definition: fringex.h:73
double dprate
Definition: fringex.h:57
double bandwidth
Definition: fringex.h:63
double userfreq
Definition: fringex.h:48
int set_loops(struct fxparam *, struct loops *)
Definition: set_loops.c:21
double reffreq
Definition: fringex.h:55
int mode
Definition: fringex.h:42
void init_fxp(struct fxparam *)
Definition: init_fxp.c:16
double * rsum
Definition: fringex.h:75
double noloss_cotime
Definition: fringex.h:60
void clear_fxp(struct fxparam *, int)
Definition: clear_fxp.c:16
int msglev
Definition: CorAsc2.c:73
double * isum
Definition: fringex.h:76
double delay
Definition: fringex.h:61
double srch_cotime
Definition: fringex.h:59
int parse_dflag(char *, int *, struct loops *)
Definition: parse_dflag.c:19
double rate
Definition: fringex.h:62
int nrates
Definition: fringex.h:93
int nnsec
Definition: fringex.h:91
double nsecs[MAXNSECS]
Definition: fringex.h:92
int filelist(char *, int, fstruct **, int *)
Definition: filelist.c:24
#define NFX_FCHAN
Definition: fringex.h:35
double raoff
Definition: fringex.h:44
Definition: fringex.h:40
Definition: fringex.h:90
Definition: fstruct.h:36
Definition: mk4_data.h:82
Definition: mk4_data.h:108
Definition: vex.h:28