6 int main(
int argc,
char *argv[]);
14 int argmatch(
char *s1,
char *s2,
int atleast);
15 int usage(
char *progname);
60 char *
vxstrtok(
char *
string,
char *last_token,
char *delim);
121 float *
vector(
int nl,
int nh);
123 float **
matrix(
int nrl,
int nrh,
int ncl,
int nch);
127 int gaussj(
float a[100 +1][100 +1],
int n,
float **b,
int m);
128 int mrqmin(
float x[],
float y[],
float sig[],
int ndata,
float a[],
int ma,
int lista[],
int mfit,
float covar[100 +1][100 +1],
float alpha[100 +1][100 +1],
float *chisq,
void (*funcs)(
void),
float *alamda);
129 int mrqcof(
float x[],
float y[],
float sig[],
int ndata,
float a[],
int ma,
int lista[],
int mfit,
float alpha[100 +1][100 +1],
float beta[],
float *chisq,
void (*funcs)(
void));
130 int covsrt(
float covar[100 +1][100 +1],
int ma,
int lista[],
int mfit);
131 float gammq(
double a,
double x);
132 int gser(
float *gamser,
double a,
double x,
float *gln);
133 int gcf(
float *gammcf,
double a,
double x,
float *gln);
135 void fgauss(
double x,
float *a,
float *y,
float *dyda);
136 int gauss_fit(
float *x,
float *y,
float *sig,
int npts,
float *a);
221 int lsqfit(
float x[],
float y[],
int bdata,
int ndata,
float sig[],
int mwt,
float *a,
float *
b,
float *siga,
float *sigb,
float *chi2,
float *q);
227 int flame(
double a,
double b,
double x);
236 int xgr_putXimage(
char *win_name,
double fx,
double fy,
int w,
int h,
unsigned char *
data);
238 int xgr_eventProc(XEvent *event, Window window,
unsigned int mask);
245 int find_close_color(Display *dpy, Colormap cmap, XColor *exact_color,
char *color);
248 int xgr_drawPoints(
double xmin,
double xmax,
double ymin,
double ymax,
float *
xdata,
float *
ydata,
int n,
int color);
250 int xgr_drawGrid(
double f1b,
double f1e,
double f2b,
double f2e,
int n1,
int n2,
int dx,
int dy,
int tick,
int label,
int clr1,
int clr2,
int format);
251 int xgr_drawBox(
double x,
double y,
double x2,
double y2,
int color);
253 int xgr_drawFillBox(
double xmin,
double xmax,
double ymin,
double ymax,
double xl,
double yt,
double xr,
double yb,
int color);
254 int xgr_drawRectangle(
double xmin,
double xmax,
double ymin,
double ymax,
double xl,
double yt,
double xr,
double yb,
int color,
int bold);
255 int xgr_drawTextInGrid(
double xmin,
double xmax,
double ymin,
double ymax,
double x,
double y,
char *msg,
int color,
int f);
256 int xgr_drawCircle(
double xmin,
double xmax,
double ymin,
double ymax,
double x,
double y,
double w,
double h,
int color,
int size);
258 int xgr_drawText(
double x,
double y,
char *msg,
int clr,
int f);
261 int xgr_drawOn(
double x,
double y,
int n,
double xmin,
double xmax,
char *msg,
int color,
int f);
270 int interp(
float *array,
int nx,
int ny,
float *parray,
int npx,
int npy);
281 void xfree(
void *ptr);
282 void sort_xy(
double *tmp1,
double *tmp2,
int up,
int sorton,
int stype);
283 void stasum(
double *x,
int n,
double *xbar,
double *
sd);
284 double leasev(
double *c,
int degree,
double x);
285 int fitcurve(
double *x,
double *y,
int n,
int ideg,
double *coeff);
286 void runavg(
double *x,
double *y,
double *ax,
double *ay,
int n,
int ilen);
287 void runstddev(
double *x,
double *y,
double *ax,
double *ay,
int n,
int ilen);
288 void runmedian(
double *x,
double *y,
double *ax,
double *ay,
int n,
int ilen);
289 void runminmax(
double *x,
double *y,
double *ax,
double *ay,
int n,
int ilen,
int type);
290 void filterser(
int n,
double *x,
double *y,
double *resx,
double *resy,
double *h,
int len);
291 void linearconv(
double *x,
double *h,
double *y,
int n,
int m);
292 int crosscorr(
double *x,
double *y,
int n,
int maxlag,
double *xcov,
double *xcor);
294 void spline(
int n,
double *x,
double *y,
double *b,
double *c,
double *d);
295 void aspline(
int n,
double *x,
double *y,
double *b,
double *c,
double *d);
296 double seval(
int n,
double u,
double *x,
double *y,
double *b,
double *c,
double *d);
298 int gf_includ(
int np,
int nrbar,
double w,
double *xrow,
double y,
double *d,
double *rbar,
double *thetab,
double *sserr);
299 int gf_clear(
int np,
int nrbar,
double *d,
double *rbar,
double *thetab,
double *sserr);
300 int gf_regcf(
int np,
int nrbar,
double *d,
double *rbar,
double *thetab,
double *tol,
double *beta,
int nreq);
301 int gf_tolset(
int np,
int nrbar,
double *d,
double *rbar,
double *tol);
302 int gf_sing(
int np,
int nrbar,
double *d,
double *rbar,
double *thetab,
double *sserr,
double *tol,
int *lindep);
303 int gf_ss(
int np,
double *d,
double *thetab,
double *sserr,
double *rss);
304 int gf_cov(
int np,
int nrbar,
double *d,
double *rbar,
int nreq,
double *rinv,
double *var,
double *covmat,
int dimcov,
double *sterr);
305 void gf_inv(
int np,
int nrbar,
double *rbar,
int nreq,
double *rinv);
306 int gf_pcorr(
int np,
int nrbar,
double *d,
double *rbar,
double *thetab,
double *sserr,
int in,
double *cormat,
int dimc,
double *ycorr);
307 void gf_cor(
int np,
double *d,
double *rbar,
double *thetab,
double *sserr,
double *work,
double *cormat,
double *ycorr);
308 int gf_vmove(
int np,
int nrbar,
int *vorder,
double *d,
double *rbar,
double *thetab,
double *rss,
int from,
int to,
double *tol);
309 int gf_reordr(
int np,
int nrbar,
int *vorder,
double *d,
double *rbar,
double *thetab,
double *rss,
double *tol,
int *list,
int n,
int pos1);
310 int gf_hdiag(
double *xrow,
int np,
int nrbar,
double *d,
double *rbar,
double *tol,
int nreq,
double *hii);
311 void gf_pr_utdm_v(
double *x,
int N,
int width,
int precision);
314 double **
gf_dmatrix(
int rl,
int rh,
int cl,
int ch);
315 void gf_putdvec(
const char *s,
double *x,
int l,
int h);
316 int dofitcurve(
int cnt,
double *xd,
double *yd,
int nd,
double *c);
319 int addRegionBox(
int color,
double ra,
double dec,
double rsize,
double dsize,
char *
title);
340 extern XImage *
createXimage(Display *display,
int w,
int h,
int depth);
int gf_sing(int np, int nrbar, double *d, double *rbar, double *thetab, double *sserr, double *tol, int *lindep)
int do_otfGridRows(char *buf)
int doSpecWinRepaint(void)
int xgr_drawGrid(double f1b, double f1e, double f2b, double f2e, int n1, int n2, int dx, int dy, int tick, int label, int clr1, int clr2, int format)
int spikeCheck(char *buf)
int xgr_drawLine(float *xdata, float *ydata, int n, int color)
int xgr_drawBin(float *xdata, float *ydata, int n, int color)
int do_printIgnoreScans(void)
int printKeySymHelp(void)
int xgr_drawPosText(double x, double y, char *msg, int clr, int f)
void gf_inv(int np, int nrbar, double *rbar, int nreq, double *rinv)
int find_close_color(Display *dpy, Colormap cmap, XColor *exact_color, char *color)
int xgr_drawBox(double x, double y, double x2, double y2, int color)
double seval(int n, double u, double *x, double *y, double *b, double *c, double *d)
int do_toggleRegion(void)
int checkKeyPress(XEvent *event)
int xgr_drawLabel(char *b1, char *b2, char *b3, int color)
int interp(double *array, int nx, int ny, double *parray, int npx, int npy)
int gf_clear(int np, int nrbar, double *d, double *rbar, double *thetab, double *sserr)
int xgr_makeGif(char *win, char *file)
int shiftOtfChans(double *in, int n, int shift)
int clipDataProc(float *data, struct HEADER *head, int nchan, int cd)
int do_ephemObj(char *buf)
int myErrorHandler(Display *display, XErrorEvent *myerr)
int do_otfGridFreqres(char *buf)
int to_monitor(char *buf)
int do_otfBadChan(char *buf)
int do_otfChans(char *buf)
int do_fullInterpFill(char *buf)
int xgr_drawTextInGrid(double xmin, double xmax, double ymin, double ymax, double x, double y, char *msg, int color, int f)
int xgr_drawText(double x, double y, char *msg, int clr, int f)
int do_etime(int func, int action)
int freeDataPointers(void)
int determine_min_max(float *ydata, int dl, double scan)
int do_otfGridAllowVelShift(char *buf)
int do_otfTsys(char *buf)
int do_otfRmRMS(char *buf)
int verifyScanDone(int scn)
int accumDataIntoWork(void)
int region_get_tok(char *edit)
int do_otfColorChoice(char *buf)
int createInterpTable(int max)
int do_otfTime(char *buf)
int gf_regcf(int np, int nrbar, double *d, double *rbar, double *thetab, double *tol, double *beta, int nreq)
int xgr_freeWindows(struct XGR_ *s)
void runminmax(double *x, double *y, double *ax, double *ay, int n, int ilen, int type)
int combineData(float *xdata, float *yd, struct HEADER *head)
int xgr_putXimage(char *win_name, double fx, double fy, int w, int h, unsigned char *data)
int do_otfGridChanCompress(char *buf)
int crosscorr(double *x, double *y, int n, int maxlag, double *xcov, double *xcor)
int do_otfLockScale(char *buf)
int display_image(double xb, double xe, double yb, double ye, struct DS_IMAGE_INFO *im)
int doSpecPlotWinEvent(XEvent *event, unsigned int mask)
int computeBaseLine(struct LP_IMAGE_INFO *image)
int do_fixedzero(char *buf)
int otfGridDisplaySpec(XEvent *event, unsigned int mask)
int gf_cov(int np, int nrbar, double *d, double *rbar, int nreq, double *rinv, double *var, double *covmat, int dimcov, double *sterr)
int do_otfGridSizeDec(char *buf)
int mainFrameRepaint(void)
int do_diagHarCopyServ(void)
int do_otfBaseLine(char *buf)
int do_otfGridNoint(char *buf)
int * ivector(int nl, int nh)
int xgr_drawLineDirect(double xmin, double xmax, double ymin, double ymax, float *xdata, float *ydata, int n, int color)
int do_gfilename(char *buf)
int do_otfDisplayArray(char *buf)
int computeRms(float *y, int n, float *rms)
int dofitcurve(int cnt, double *xd, double *yd, int nd, double *c)
int do_ignorePos(char *buf)
int doOtfGridRePaint(void)
struct OTF_GRID * fetchMapCell(int row, int col)
int displayOtfGridSpectra(struct OTF_GRID *s)
int flame(double a, double b, double x)
int modefield(int id, char *field)
void runmedian(double *x, double *y, double *ax, double *ay, int n, int ilen)
int dummieEventProc(XEvent *event)
int do_spectraCombine(char *buf)
int do_otfSingleBin(char *buf)
void gf_cor(int np, double *d, double *rbar, double *thetab, double *sserr, double *work, double *cormat, double *ycorr)
int addRegionBox(int color, double ra, double dec, double rsize, double dsize, char *title)
int do_otfNumColors(char *buf)
int do_toggleRegionLabels(void)
int interpAndPlot(struct XGR_ *s)
struct HEADER * checkScanHeader(int v, float s)
int getNumSpectra(double datalen, double noint)
int do_listRegions(char *buf)
int xgr_setNumColors(int n)
XImage * createXimage(Display *display, int w, int h, int depth)
int dispatchOtfGridEvents(XEvent *e)
int do_otfSlice(char *buf)
int do_badChan(char *buf)
int lsqfit(float x[], float y[], int bdata, int ndata, float sig[], int mwt, float *a, float *b, float *siga, float *sigb, float *chi2, float *q)
int do_otfGridCellSizeRa(char *buf)
double getElapseTime(void)
int gf_includ(int np, int nrbar, double w, double *xrow, double y, double *d, double *rbar, double *thetab, double *sserr)
int xgr_drawFillBox(double xmin, double xmax, double ymin, double ymax, double xl, double yt, double xr, double yb, int color)
int accumWorkIntoGrid(void)
struct WINDOW * xgr_getWin(Window win)
int do_otf3dplot(char *buf)
int computeRegionExtents(void)
int do_otfRmBadChan(void)
int checkMapScans(int v, double s)
int setMapCell(int row, int col, struct OTF_GRID *f)
int do_otfGridSizeRa(char *buf)
int do_linetotalmapoff(void)
int xgr_hardCopy(char *win, int land, int rev, char *file)
int do_toggleRegionBold(int dir)
int do_ignoreGains(char *buf)
int fitcurve(double *x, double *y, int n, int ideg, double *coeff)
int * gf_ivector(int l, int h)
int getRequestedCell(int row, int col)
int do_hardCopy(char *buf)
int do_otfListCells(char *buf)
int xgr_setWindowSize(char *name, double x, double y)
int xgr_drawPoint(float *xdata, float *ydata, int n, double xmin, double xmax, char *msg, int color, int f)
int putChanTemp(int c, double t)
int addSpecScans(double s)
void runstddev(double *x, double *y, double *ax, double *ay, int n, int ilen)
void runavg(double *x, double *y, double *ax, double *ay, int n, int ilen)
void gf_putdvec(const char *s, double *x, int l, int h)
int checkIgnoreScans(int v, double s)
double leasev(double *c, int degree, double x)
int do_sendSpecComb(void)
int addIgnoreScans(int v, double s)
int loadGrayScale(struct XGR_ *s)
int xgr_findWindow(Display *dpy, Window win, struct WINDOW **w)
int do_otfGridVelocity(char *buf)
int do_loadRegion(char *buf)
int do_filename(char *buf)
int gf_reordr(int np, int nrbar, int *vorder, double *d, double *rbar, double *thetab, double *rss, double *tol, int *list, int n, int pos1)
int do_otfGamma(char *buf)
int doOtfGridReSize(void)
int do_printData(char *buf)
int normalizeAndCal(void)
int subtractPredictedRA(float *data)
int do_otfGridRa(char *buf)
int charcompare(char **s1, char **s2)
int xgr_drawPoints(double xmin, double xmax, double ymin, double ymax, float *xdata, float *ydata, int n, int color)
int do_makeGif(char *buf)
int setSourceName(struct HEADER *head)
int do_otfGridScale(char *buf)
int do_otfSpectralSum(char *buf)
int xgr_graphInit(struct XGR_ *s)
int xgr_reSizeProc(Window window, int width, int height)
int do_scanDone(char *buf)
void gf_pr_utdm_v(double *x, int N, int width, int precision)
int do_diagHarCopyGrid(void)
int xgr_drawTextClear(double x, double y, char *msg, int clr, int f)
double ** gf_dmatrix(int rl, int rh, int cl, int ch)
int xgr_eventProc(XEvent *event, Window window, unsigned int mask)
int linear_regression(int n, double *x, double *y, double *coeff)
int do_otfSpectraDebug(char *buf)
int do_toggleFixData(char *buf)
int interpAndWrite(struct XGR_ *s)
int do_otfSingleChan(char *buf)
int do_otfBeamArm(char *buf)
double findInterp(double v1, double v2, int indx, int max)
int loadFlameScale(struct XGR_ *s, int cindx)
int displayRequestedOtf(void)
void linearconv(double *x, double *h, double *y, int n, int m)
int loadPseudoScale(struct XGR_ *s)
double * gf_dvector(int l, int h)
int do_ignoreRepaints(char *buf)
int argmatch(char *s1, char *s2, int atleast)
int checkSpecScans(double s)
int xgr_setFont(struct XGR_ *s, int f)
int fixVel(struct HEADER *head)
int do_remRegions(char *buf)
int do_ignoreScan(char *buf)
int do_markers(char *buf)
int gf_hdiag(double *xrow, int np, int nrbar, double *d, double *rbar, double *tol, int nreq, double *hii)
int gf_ss(int np, double *d, double *thetab, double *sserr, double *rss)
int set_sock_callback(int(*call)(void))
float bdata[MAX_ATM_ELEMENTS]
int xgr_setColorChoice(int c)
int addMapScans(int v, double s)
float xdata[MAX_ATM_ELEMENTS]
void stasum(double *x, int n, double *xbar, double *sd)
int putHeader(struct DS_IMAGE_INFO *image)
int do_saveIgnoreScans(FILE *fp)
int do_otfLoadChoice(char *buf)
int computeInten(int bc, int ec)
int do_otfBeamSize(char *buf)
int do_printMapScans(void)
int resendSpecData(struct SPECDATA *sd)
int gf_pcorr(int np, int nrbar, double *d, double *rbar, double *thetab, double *sserr, int in, double *cormat, int dimc, double *ycorr)
int do_otfCutOff(char *buf)
int readMail(char *buf, int len)
int do_otf3dcube(char *buf)
int checkBoot(struct BOOTSTRAP *b, char *fn)
int do_otf(float *data, struct HEADER *head, float *offdata, float *gainsdata)
int peekScan(double scan, char *filename, int *be, int *modeid, struct HEADER *head)
int do_otfGridCellSizeDec(char *buf)
int xgr_pixmapToWindow(char *name)
int setFrameFooter(char *msg, int lr)
int do_tiltmeter(char *buf)
struct HEADER * addScanHeader(int v, float s, struct HEADER *head)
int myIOErrorHandler(Display *display, XErrorEvent *myerr)
int do_otfIFchoice(char *buf)
int gf_vmove(int np, int nrbar, int *vorder, double *d, double *rbar, double *thetab, double *rss, int from, int to, double *tol)
int xgr_clearArea(double x, double y, double dx, double dy)
int do_otfVelRun(char *buf)
int xgr_setBox(double x, double y, double dx, double dy)
int do_baseLines(char *buf)
int insertVersion(struct OTF_GRID *g, int ver)
int xgr_drawCircle(double xmin, double xmax, double ymin, double ymax, double x, double y, double w, double h, int color, int size)
int do_otfFixBadCells(char *buf)
int otfGridInit(int cols, int rows, int noint)
char ** findFixedFonts(Display *dpy, int *num)
int weightedAvergeCells(struct OTF_GRID *f, struct OTF_GRID *p1, double p1_avg, struct OTF_GRID *p2, double p2_avg, int try, int row, int col, int *count)
char * vxstrtok(char *string, char *last_token, char *delim)
int to_xgraphic(char *buf)
int xgr_drawOn(double x, double y, int n, double xmin, double xmax, char *msg, int color, int f)
int doSpecPlot(struct DS_IMAGE_INFO *im)
float ydata[MAX_ATM_ELEMENTS]
struct HEADER * do_addHeader(int ver, float scan, struct HEADER *head)
struct WINDOW * createWindow(struct XGR_ *s, char *title, int cw, int ch, int xpos, int ypos, int bg, int usPixmap, int which)
int do_setClip(char *buf)
int scaleData(float *data)
void filterser(int n, double *x, double *y, double *resx, double *resy, double *h, int len)
int findNextCell(int row, int col, struct OTF_GRID **p2)
int do_zapCell(char *buf)
int xgr_mapUnmapWindow(char *name, int map)
int do_showRegion(char *buf)
int xgr_drawRectangle(double xmin, double xmax, double ymin, double ymax, double xl, double yt, double xr, double yb, int color, int bold)
int display_spectra(double xb, double xe, double yb, double ye, float *data, struct HEADER *head, int procSpec)
int do_otfGridLoad(char *buf)
int do_otfGridCols(char *buf)
int doSpecWinReSize(void)
void spline(int n, double *x, double *y, double *b, double *c, double *d)
void sort_xy(double *tmp1, double *tmp2, int up, int sorton, int stype)
int xgr_rePaintProc(Window window)
int do_otfGridDec(char *buf)
int xgr_checkForEvents(void)
int recomputeBaseLines(void)
int createWindows(struct XGR_ *s, char *title, int cw, int ch, int xpos, int ypos, int bg, int usPixmap)
int gf_tolset(int np, int nrbar, double *d, double *rbar, double *tol)
int do_otfSendPlot(char *buf)
int xgr_clearScreen(void)
void aspline(int n, double *x, double *y, double *b, double *c, double *d)
int do_otfGridRestfreq(char *buf)
int do_otfChannelMap(char *buf)
int processEvent(struct XGR_ *s)
int xgr_setCurWindow(int win, int which)