HOPS
HOPS class reference
Classes | Macros | Typedefs | Functions | Variables
cohfit.h File Reference
#include <stdio.h>
#include <unistd.h>
#include <gsl/gsl_errno.h>
#include "adata.h"
#include "msg.h"

Go to the source code of this file.

Classes

struct  avdata
 
struct  avgdatastore
 
struct  cosummary
 
struct  edatum
 
struct  examdata
 

Macros

#define FALSE   0
 
#define FITOPT_ALLFITS   (FITOPT_AMP_ALL|FITOPT_SNR_ALL)
 
#define FITOPT_AMP_ALL   (FITOPT_AMP_PS|FITOPT_AMP_PO|FITOPT_AMP_SO)
 
#define FITOPT_AMP_PO   0x02 /* do plateau-only fit */
 
#define FITOPT_AMP_PS   0x01 /* do plateau-slope fit */
 
#define FITOPT_AMP_SO   0x04 /* do slope-only fit */
 
#define FITOPT_NDX_2P7   5 /* < NFITOPT */
 
#define FITOPT_NDX_2P8   4 /* < NFITOPT */
 
#define FITOPT_NDX_3PT   3 /* < NFITOPT */
 
#define FITOPT_NDX_PO   1 /* < NFITOPT */
 
#define FITOPT_NDX_PS   0 /* < NFITOPT */
 
#define FITOPT_NDX_SO   2 /* < NFITOPT */
 
#define FITOPT_NOFITS   0x00 /* do no fits */
 
#define FITOPT_SNR_2P7   0x40 /* do GSL 2.7 cubic spline fit */
 
#define FITOPT_SNR_2P8   0x20 /* do GSL 2.8 cubic spline fit */
 
#define FITOPT_SNR_3PT   0x10 /* do 3-point SNR fit at max */
 
#define FITOPT_SNR_ALL   (FITOPT_SNR_3PT|FITOPT_SNR_2P8|FITOPT_SNR_2P7)
 
#define HAVEGSL2P7   0
 
#define HAVEGSL2P8   0
 
#define INCR_AVSP   100 /* increment for more */
 
#define INIT_AVSP   500 /* avg data storage, initially */
 
#define MAX_BNO   120 /* 20 stations */
 
#define MAX_COTIME   392.0 /* historical limit */
 
#define MAX_ITERS   100 /* max iterations */
 
#define MAX_NSEGLEN   100 /* Fringex max -iarg MAXNSECS */
 
#define MAX_TXT   80 /* pgplot labels */
 
#define NFITOPT   6 /* number FITOPT bits */
 
#define TRUE   1
 

Typedefs

typedef struct avdata avg_data
 
typedef struct avgdatastore avgspace
 
typedef struct cosummary cosumary
 
typedef struct edatum edatum
 
typedef struct examdata examdata
 

Functions

char * as_fit_ndx_nm (int)
 
char * as_fit_nm_ndx (int, int *)
 
void clear_codata (cosumary *)
 
void clear_err_handler_report (void)
 
int exam_edit (char *, examdata *)
 
void exam_file (cosumary *, int, examdata *)
 
void exam_gnuplot (examdata *)
 
int fit_ampl (cosumary *, int, int)
 
void fit_codata (cosumary *, examdata *)
 
int fit_msnr (cosumary *, int)
 
char * get_err_handler_report ()
 
int get_gslegacy_default (void)
 
int normalize_snr (cosumary *, int)
 
int parse_cmdline (int, char **, FILE **, examdata *)
 
void plot_codata (cosumary *)
 
int read_data (avgspace *, char *, int *, int *)
 
void set_gnuplot_opts (examdata *)
 
int sort_data (avg_data *, int)
 
void sorter (avg_data *, int)
 
int write_codata (cosumary *, FILE *)
 

Variables

gsl_error_handler_t err_handler
 

Class Documentation

◆ avdata

struct avdata
Class Members
fringesum fdata
int keyval
int lastorder
int order

◆ avgdatastore

struct avgdatastore
Class Members
avg_data * data
int space

◆ cosummary

struct cosummary
Class Members
float ampl[MAX_NSEGLEN]
double ampl_cotime
int bestamp
int bestsnr
float breakpoint
int cbs_p2p7[3]
int cbs_p2p8[3]
float cohereloss
fringesum * datum
int didfits
int examlen
char * exampat
float fit2p7[MAX_NSEGLEN]
float fit2p8[MAX_NSEGLEN]
float fitapo[MAX_NSEGLEN]
float fitaps[MAX_NSEGLEN]
float fitaso[MAX_NSEGLEN]
int fitmask
float fitsnr[MAX_NSEGLEN]
int iteratio[NFITOPT]
int labels
double maxcotime
int navg[MAX_NSEGLEN]
int nsegtime
float orig_srch
float plateau
double poerr[1]
double popar[1]
double pserr[3]
double pspar[3]
float redchisq[NFITOPT]
float seglen[MAX_NSEGLEN]
float slope
float snr[MAX_NSEGLEN]
double snr_cotime
int snr_peak[3]
double soerr[2]
double sopar[2]

◆ edatum

struct edatum
Class Members
double ampl_cotime
double ampmax
double ampmin
int bestampndx
int bestsnrndx
int bno
double breakpoint
double cohereloss
char * examfile
char frlabel[MAX_TXT]
double lenmax
double lenmin
double plateau
double poerr[1]
double popar[1]
double pserr[3]
double pspar[3]
double redchisq[NFITOPT]
double slope
double snr_cotime
double snrmax
double snrmin
double soerr[2]
double sopar[2]

◆ examdata

struct examdata
Class Members
float closs
int customlimits
int density
char * devp
edatum edata[MAX_BNO]
char * edit
int elen
char * epat
int fitmask
int gnuplot
int gpboldface
int gpdashtype
int gslegacy
int labels
int montage
double mxcotime
int nbno
int pbno
char * pdfile
int rnc[2]

Macro Definition Documentation

◆ FALSE

#define FALSE   0

◆ FITOPT_ALLFITS

#define FITOPT_ALLFITS   (FITOPT_AMP_ALL|FITOPT_SNR_ALL)

◆ FITOPT_AMP_ALL

#define FITOPT_AMP_ALL   (FITOPT_AMP_PS|FITOPT_AMP_PO|FITOPT_AMP_SO)

◆ FITOPT_AMP_PO

#define FITOPT_AMP_PO   0x02 /* do plateau-only fit */

◆ FITOPT_AMP_PS

#define FITOPT_AMP_PS   0x01 /* do plateau-slope fit */

◆ FITOPT_AMP_SO

#define FITOPT_AMP_SO   0x04 /* do slope-only fit */

◆ FITOPT_NDX_2P7

#define FITOPT_NDX_2P7   5 /* < NFITOPT */

◆ FITOPT_NDX_2P8

#define FITOPT_NDX_2P8   4 /* < NFITOPT */

◆ FITOPT_NDX_3PT

#define FITOPT_NDX_3PT   3 /* < NFITOPT */

◆ FITOPT_NDX_PO

#define FITOPT_NDX_PO   1 /* < NFITOPT */

◆ FITOPT_NDX_PS

#define FITOPT_NDX_PS   0 /* < NFITOPT */

◆ FITOPT_NDX_SO

#define FITOPT_NDX_SO   2 /* < NFITOPT */

◆ FITOPT_NOFITS

#define FITOPT_NOFITS   0x00 /* do no fits */

◆ FITOPT_SNR_2P7

#define FITOPT_SNR_2P7   0x40 /* do GSL 2.7 cubic spline fit */

◆ FITOPT_SNR_2P8

#define FITOPT_SNR_2P8   0x20 /* do GSL 2.8 cubic spline fit */

◆ FITOPT_SNR_3PT

#define FITOPT_SNR_3PT   0x10 /* do 3-point SNR fit at max */

◆ FITOPT_SNR_ALL

#define FITOPT_SNR_ALL   (FITOPT_SNR_3PT|FITOPT_SNR_2P8|FITOPT_SNR_2P7)

◆ HAVEGSL2P7

#define HAVEGSL2P7   0

◆ HAVEGSL2P8

#define HAVEGSL2P8   0

◆ INCR_AVSP

#define INCR_AVSP   100 /* increment for more */

◆ INIT_AVSP

#define INIT_AVSP   500 /* avg data storage, initially */

◆ MAX_BNO

#define MAX_BNO   120 /* 20 stations */

◆ MAX_COTIME

#define MAX_COTIME   392.0 /* historical limit */

◆ MAX_ITERS

#define MAX_ITERS   100 /* max iterations */

◆ MAX_NSEGLEN

#define MAX_NSEGLEN   100 /* Fringex max -iarg MAXNSECS */

◆ MAX_TXT

#define MAX_TXT   80 /* pgplot labels */

◆ NFITOPT

#define NFITOPT   6 /* number FITOPT bits */

◆ TRUE

#define TRUE   1

Typedef Documentation

◆ avg_data

typedef struct avdata avg_data

◆ avgspace

typedef struct avgdatastore avgspace

◆ cosumary

typedef struct cosummary cosumary

◆ edatum

typedef struct edatum edatum

◆ examdata

typedef struct examdata examdata

Function Documentation

◆ as_fit_ndx_nm()

char* as_fit_ndx_nm ( int  index)

◆ as_fit_nm_ndx()

char* as_fit_nm_ndx ( int  flag,
int *  index 
)

◆ clear_codata()

void clear_codata ( cosumary codata)

◆ clear_err_handler_report()

void clear_err_handler_report ( void  )

◆ exam_edit()

int exam_edit ( char *  optarg,
examdata exdp 
)

◆ exam_file()

void exam_file ( cosumary codatum,
int  bno,
examdata exdata 
)

◆ exam_gnuplot()

void exam_gnuplot ( examdata exdp)

◆ fit_ampl()

int fit_ampl ( cosumary codatum,
int  npt,
int  gslegacy 
)

◆ fit_codata()

void fit_codata ( cosumary ,
examdata  
)

◆ fit_msnr()

int fit_msnr ( cosumary codatum,
int  npt 
)

◆ get_err_handler_report()

char* get_err_handler_report ( )

◆ get_gslegacy_default()

int get_gslegacy_default ( void  )

◆ normalize_snr()

int normalize_snr ( cosumary codatum,
int  npt 
)

◆ parse_cmdline()

int parse_cmdline ( int  argc,
char **  argv,
FILE **  fpout,
examdata exdp 
)

◆ plot_codata()

void plot_codata ( cosumary )

◆ read_data()

int read_data ( avgspace avgp,
char *  filename,
int *  navg,
int *  nfails 
)

◆ set_gnuplot_opts()

void set_gnuplot_opts ( examdata exdp)

◆ sort_data()

int sort_data ( avg_data data,
int  navg 
)

◆ sorter()

void sorter ( avg_data data,
int  navg 
)

◆ write_codata()

int write_codata ( cosumary codata,
FILE *  fpout 
)

Variable Documentation

◆ err_handler

gsl_error_handler_t err_handler
extern