Linuxpops  3.01.04
Spectral Anaysis Package for Single Dish Data
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ds_proto.h
Go to the documentation of this file.
1 
2 /* dataserv.c */
3 int to_helper(char *buf);
4 int to_xgraphic(char *buf);
5 int getNProcs(void);
6 int main(int argc, char *argv[]);
7 int myIOErrorHandler(Display *display, XErrorEvent *myerr);
8 int myErrorHandler(Display *display, XErrorEvent *myerr);
9 void signalHandler(void);
10 int exitProc(int status);
11 int dummieEventProc(XEvent *event);
12 struct WINDOW *createWindow(struct XGR_ *s, char *title, int cw, int ch, int xpos, int ypos, int bg, int usPixmap, int which);
13 int createWindows(struct XGR_ *s, char *title, int cw, int ch, int xpos, int ypos, int bg, int usPixmap);
14 int argmatch(char *s1, char *s2, int atleast);
15 int usage(char *progname);
16 int mainFrameRepaint(void);
17 int verifyScanDone(int scn);
18 int insertScan(int scn);
19 int to_monitor(char *buf);
20 int to_rambo(char *buf);
21 int to_exec(char *buf);
22 int do_toggleFixData(char *buf);
23 int show_display(void);
24 int showDisplay(void);
25 int main_loop(void);
26 int processEvent(struct XGR_ *s);
27 int set_sock_callback(int (*call)(void));
28 int synchronize(int v);
29 int do_printData(char *buf);
30 int determine_min_max(float *ydata, int dl, double scan);
31 int do_filename(char *buf);
32 int do_gfilename(char *buf);
33 int ds_delay(double dc);
34 /* read_scan.c */
35 int checkBoot(struct BOOTSTRAP *b, char *fn);
36 int fixVel(struct HEADER *head);
37 int read_scan(double scan, char *filename, float **data, struct HEADER *head);
38 int modefield(int id, char *field);
39 int peekScan(double scan, char *filename, int *be, int *modeid, struct HEADER *head);
40 /* mailparse.c */
41 int do_tiltmeter(char *buf);
42 int do_load(char *buf);
43 int readMail(char *buf, int len);
44 int parseMail(char *buf);
45 int do_scanDone(char *buf);
46 int do_calDone(void);
47 int do_status(void);
48 int do_badChan(char *buf);
49 int do_quit(void);
50 int do_stop(void);
51 int do_xsync(char *buf);
52 int do_help(char *buf);
53 int do_setClip(char *buf);
54 int do_ignoreGains(char *buf);
55 int do_ignoreRepaints(char *buf);
56 int do_hardCopy(char *buf);
57 int do_diagHarCopyServ(void);
58 int do_diagHarCopyGrid(void);
59 int do_makeGif(char *buf);
60 char *vxstrtok(char *string, char *last_token, char *delim);
61 int do_mallocmap(void);
62 int do_fixedzero(char *buf);
63 int do_markers(char *buf);
64 int do_debug(char *buf);
65 int do_otfLockScale(char *buf);
66 int do_ephemObj(char *buf);
67 int do_otfGridChanCompress(char *buf);
68 int do_otfGridCellSizeRa(char *buf);
69 int do_otfGridCellSizeDec(char *buf);
70 int do_otfGridSizeRa(char *buf);
71 int do_otfGridSizeDec(char *buf);
72 int do_otfGridRestfreq(char *buf);
73 int do_otfGridFreqres(char *buf);
74 int do_otfGridCols(char *buf);
75 int do_otfGridRows(char *buf);
76 int do_otfGridNoint(char *buf);
77 int do_otfGridAllowVelShift(char *buf);
78 int do_otfGridRa(char *buf);
79 int do_otfGridDec(char *buf);
80 int do_otfGridVelocity(char *buf);
81 int do_otfCutOff(char *buf);
82 int do_otfBadChan(char *buf);
83 int do_otfSpectraDebug(char *buf);
84 int do_otfLoadChoice(char *buf);
85 int do_otfIFchoice(char *buf);
86 int do_otfNumColors(char *buf);
87 int do_otfInterp(void);
88 int do_otfColorChoice(char *buf);
89 int do_otfGamma(char *buf);
90 int do_otfGridScale(char *buf);
91 int do_otfSingleChan(char *buf);
92 int do_otfSingleBin(char *buf);
93 int do_otfDisplayArray(char *buf);
94 int do_otfTsys(char *buf);
95 int do_otfRms(char *buf);
96 int do_otfTime(char *buf);
97 int do_otfChans(char *buf);
98 int do_otfBeamSize(char *buf);
99 int do_otfBeamArm(char *buf);
100 int do_otfBaseLine(char *buf);
101 int do_baseLines(char *buf);
102 /* spectra.c */
103 int display_spectra(double xb, double xe, double yb, double ye, float *data, struct HEADER *head, int procSpec);
104 int do_spectraCombine(char *buf);
105 int do_sendSpecComb(void);
106 int do_specCombClear(void);
107 int combineData(float *xdata, float *yd, struct HEADER *head);
108 int remSpecScans(void);
109 int addSpecScans(double s);
110 int checkSpecScans(double s);
111 int do_ignorePos(char *buf);
112 int putHeader(struct DS_IMAGE_INFO *image);
113 int display_image(double xb, double xe, double yb, double ye, struct DS_IMAGE_INFO *im);
114 int doSpecPlot(struct DS_IMAGE_INFO *im);
115 int doSpecWinRepaint(void);
116 int doSpecWinReSize(void);
117 int putChanTemp(int c, double t);
118 int doSpecPlotWinEvent(XEvent *event, unsigned int mask);
119 /* gaussfit.c */
120 int nrerror(char *error_text);
121 float *vector(int nl, int nh);
122 int *ivector(int nl, int nh);
123 float **matrix(int nrl, int nrh, int ncl, int nch);
124 int free_vector(float *v, int nl);
125 int free_ivector(int *v, int nl);
126 int free_matrix(float **m, int nrl, int nrh, int ncl);
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);
134 float gammln(double xx);
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);
137 /* otf.c */
138 int otfInit(void);
139 int freeOtfMemory(void);
140 int otfGridInit(int cols, int rows, int noint);
141 struct HEADER *do_addHeader(int ver, double scan, struct HEADER *head);
142 struct HEADER *checkScanHeader(int v, double s);
143 struct HEADER *addScanHeader(int v, double s, struct HEADER *head);
144 int remScanHeaders(void);
145 int do_ignoreScan(char *buf);
146 int checkIgnoreScans(int v, double s);
147 int addIgnoreScans(int v, double s);
148 int remIgnoreScans(void);
149 int do_saveIgnoreScans(FILE *fp);
150 int do_printIgnoreScans(void);
151 int do_clearIgnore(void);
152 int checkMapScans(int v, double s);
153 int addMapScans(int v, double s);
154 int remMapScans(void);
155 int do_printMapScans(void);
156 int getNumSpectra(double datalen, double noint);
157 int resendSpecData(struct SPECDATA *sd);
158 int do_otf(float *data, struct HEADER *head, float *offdata, float *gainsdata);
159 int do_otfRegular(void);
160 int doOtfGridRePaint(void);
161 int doOtfGridReSize(void);
162 int do_otfRmBadChan(void);
163 int spikeCheck(char *buf);
164 int computeInten(int bc, int ec);
165 int computeMinMax(void);
166 int computeShade(void);
167 int scaleData(float *data);
168 int subtractPredictedRA(float *data);
169 int placeBeamSize(void);
170 int initGrid(void);
171 int paintOtfGrid(void);
172 int putOtfGrid(void);
173 int drawColorBar(void);
174 int fillOtfGrid(void);
175 int accumDataIntoWork(void);
176 int zeroWorkArray(void);
177 int normalizeAndCal(void);
178 int insertVersion(struct OTF_GRID *g, int ver);
179 int shiftOtfChans(double *in, int n, int shift);
180 int accumWorkIntoGrid(void);
181 int markDataDirty(void);
182 int markBaseDirty(void);
183 int recomputeBaseLines(void);
184 int computeBaseLine(struct OTF_GRID *g, float *data, float *a, float *b, float *Rms, int noint, int mode);
185 int computeRms(float *y, int n, float *rms);
186 int printKeySymHelp(void);
187 int dispatchOtfGridEvents(XEvent *e);
188 int checkKeyPress(XEvent *event);
189 int do_otfSendPlot(char *buf);
190 int getRequestedCell(int row, int col);
191 int otfGridDisplaySpec(XEvent *event, unsigned int mask);
192 int displayRequestedOtf(void);
193 int displayOtfGridSpectra(struct OTF_GRID *s);
194 int getBaselines(int *b);
195 int do_otfVelRun(char *buf);
196 int do_otfGridDump(void);
197 int do_otfGridLoad(char *buf);
198 int do_otfGridInit(void);
199 int otfInterp(void);
200 int interpAndPlot(struct XGR_ *s);
201 int do_otfChannelMap(char *buf);
202 int getChanOTF(void);
203 int createInterpTable(int max);
204 double findInterp(double v1, double v2, int indx, int max);
205 int do_otfSpectralSum(char *buf);
206 int do_otf3dcube(char *buf);
207 int do_otf3dplot(char *buf);
208 int do_otfRmRMS(char *buf);
209 int do_zapCell(char *buf);
210 struct OTF_GRID *fetchMapCell(int row, int col);
211 int setMapCell(int row, int col, struct OTF_GRID *f);
212 int findNextCell(int row, int col, struct OTF_GRID **p2);
213 int do_fullInterpFill(char *buf);
214 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);
215 int do_otfFixBadCells(char *buf);
216 int do_otfListCells(char *buf);
217 int forceDrawGrid(void);
218 int do_otfSlice(char *buf);
219 int do_otfStatus(void);
220 int interpAndWrite(struct XGR_ *s);
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);
222 /* xgr.c */
223 int xgr_graphInit(struct XGR_ *s);
224 int xgr_setNumColors(int n);
225 int xgr_setColorChoice(int c);
226 int loadGrayScale(struct XGR_ *s);
227 int flame(double a, double b, double x);
228 int loadFlameScale(struct XGR_ *s, int cindx);
229 int loadPseudoScale(struct XGR_ *s);
230 int xgr_freeWindows(struct XGR_ *s);
231 int xgr_setWindowSize(char *name, double x, double y);
232 int xgr_setCurWindow(int win, int which);
233 int xgr_pixmapToWindow(char *name);
234 int xgr_mapUnmapWindow(char *name, int map);
235 int xgr_findWindow(Display *dpy, Window win, struct WINDOW **w);
236 int xgr_putXimage(char *win_name, double fx, double fy, int w, int h, unsigned char *data);
237 int xgr_reSizeProc(Window window, int width, int height);
238 int xgr_eventProc(XEvent *event, Window window, unsigned int mask);
239 int xgr_rePaintProc(Window window);
240 struct WINDOW *xgr_getWin(Window win);
241 int xgr_hardCopy(char *win, int land, int rev, char *file);
242 int xgr_makeGif(char *win, char *file);
243 int xgr_clearScreen(void);
244 int xgr_clearArea(double x, double y, double dx, double dy);
245 int find_close_color(Display *dpy, Colormap cmap, XColor *exact_color, char *color);
246 int xgr_drawLine(float *xdata, float *ydata, int n, int color);
247 int xgr_drawLineDirect(double xmin, double xmax, double ymin, double ymax, float *xdata, float *ydata, int n, int color);
248 int xgr_drawPoints(double xmin, double xmax, double ymin, double ymax, float *xdata, float *ydata, int n, int color);
249 int xgr_drawBin(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);
252 int xgr_setBox(double x, double y, double dx, double dy);
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);
257 int xgr_drawPosText(double x, double y, char *msg, int clr, int f);
258 int xgr_drawText(double x, double y, char *msg, int clr, int f);
259 int xgr_drawTextClear(double x, double y, char *msg, int clr, int f);
260 int xgr_drawPoint(float *xdata, float *ydata, int n, double xmin, double xmax, char *msg, int color, int f);
261 int xgr_drawOn(double x, double y, int n, double xmin, double xmax, char *msg, int color, int f);
262 int xgr_drawLabel(char *b1, char *b2, char *b3, int color);
263 int xgr_setFont(struct XGR_ *s, int f);
264 int setInValid(int w);
265 char **findFixedFonts(Display *dpy, int *num);
266 int charcompare(char **s1, char **s2);
267 int setFrameFooter(char *msg, int lr);
268 int xgr_checkForEvents(void);
269 /* interp.c */
270 int interp(float *array, int nx, int ny, float *parray, int npx, int npy);
271 /* obsmodes.c */
272 int loadFile(double ifNum);
273 int do_linetotalmapoff(void);
274 int do_lineotf(void);
275 int setSourceName(struct HEADER *head);
276 int clipDataProc(float *data, struct HEADER *head, int nchan, int cd);
277 int do_linedefault(void);
278 int freeDataPointers(void);
279 int printData(float *f);
280 /* grace_fit.c */
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);
293 int linear_regression(int n, double *x, double *y, double *coeff);
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);
297 /* grace_dofit.c */
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);
312 double *gf_dvector(int l, int h);
313 int *gf_ivector(int l, int h);
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);
317 /* region.c */
318 int region_get_tok(char *edit);
319 int addRegionBox(int color, double ra, double dec, double rsize, double dsize, char *title);
320 int remRegions(void);
321 int listRegions(void);
322 int computeRegionExtents(void);
323 int do_listRegions(char *buf);
324 int do_remRegions(char *buf);
325 int do_loadRegion(char *buf);
326 int do_showRegion(char *buf);
327 int do_toggleRegion(void);
328 int do_toggleRegionLabels(void);
329 int do_toggleRegionBold(int dir);
330 int drawRegions(void);
331 /* etime.c */
332 double getElapseTime(void);
333 int do_etimeInit(void);
334 int do_etimeClear(void);
335 int do_etimeDump(void);
336 int do_etimeShow(void);
337 int do_etime(int func, int action);
338 
339 #ifdef X_H
340 extern XImage *createXimage(Display *display, int w, int h, int depth);
341 #endif
int do_otfRegular(void)
Definition: otf.c:1073
int loadFile()
Definition: io.c:440
int gf_sing(int np, int nrbar, double *d, double *rbar, double *thetab, double *sserr, double *tol, int *lindep)
Definition: grace_dofit.c:285
int xx()
Definition: linuxpops.c:605
int to_rambo(char *buf)
Definition: dataserv.c:650
int main(void)
Definition: gsl_try_2.c:176
int do_otfGridRows(char *buf)
Definition: mailparse.c:957
int doSpecWinRepaint(void)
Definition: specplot.c:211
int freeOtfMemory(void)
Definition: otf.c:126
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)
Definition: otf.c:1291
int xgr_drawLine(float *xdata, float *ydata, int n, int color)
Definition: xgr.c:1124
int xgr_drawBin(float *xdata, float *ydata, int n, int color)
Definition: xgr.c:1455
int remSpecScans(void)
Definition: spectra.c:439
int do_printIgnoreScans(void)
Definition: otf.c:699
int printKeySymHelp(void)
Definition: otf.c:2891
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)
Definition: grace_dofit.c:400
int find_close_color(Display *dpy, Colormap cmap, XColor *exact_color, char *color)
Definition: xgr.c:981
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)
Definition: grace_fit.c:847
int do_toggleRegion(void)
int checkKeyPress(XEvent *event)
Definition: otf.c:3293
int xgr_drawLabel(char *b1, char *b2, char *b3, int color)
Definition: xgr.c:2164
int do_etimeInit(void)
Definition: etime.c:149
int interp(double *array, int nx, int ny, double *parray, int npx, int npy)
Definition: interp.c:102
int gf_clear(int np, int nrbar, double *d, double *rbar, double *thetab, double *sserr)
Definition: grace_dofit.c:184
double noint
Definition: header.h:211
int xgr_makeGif(char *win, char *file)
Definition: xgr.c:887
int shiftOtfChans(double *in, int n, int shift)
Definition: otf.c:2416
int clipDataProc(float *data, struct HEADER *head, int nchan, int cd)
Definition: obsmodes.c:251
int parseMail(char *buf)
Definition: mailparse.c:245
int do_ephemObj(char *buf)
Definition: mailparse.c:796
int myErrorHandler(Display *display, XErrorEvent *myerr)
Definition: dataserv.c:333
int do_otfGridFreqres(char *buf)
Definition: mailparse.c:925
int to_monitor(char *buf)
Definition: dataserv.c:641
int do_otfBadChan(char *buf)
Definition: mailparse.c:1081
int do_calDone(void)
Definition: mailparse.c:345
int do_otfChans(char *buf)
Definition: mailparse.c:1579
int scan
int datalen
Definition: dataserv.c:33
int do_etimeDump(void)
Definition: etime.c:194
int do_fullInterpFill(char *buf)
Definition: otf.c:5640
void xfree(void *ptr)
Definition: grace_fit.c:122
int nrerror()
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)
Definition: etime.c:268
int freeDataPointers(void)
Definition: obsmodes.c:330
int determine_min_max(float *ydata, int dl, double scan)
int do_lineotf(void)
Definition: obsmodes.c:163
int do_otfGridAllowVelShift(char *buf)
Definition: mailparse.c:989
int read_scan()
int do_otfTsys(char *buf)
Definition: mailparse.c:1516
int do_otfRmRMS(char *buf)
Definition: otf.c:5394
char filename[256]
Definition: dataserv.c:49
int verifyScanDone(int scn)
Definition: dataserv.c:606
int accumDataIntoWork(void)
Definition: otf.c:2218
int region_get_tok(char *edit)
Definition: region.c:79
FILE * fp
Definition: linuxpops.c:70
#define max(a, b)
Definition: cactus.h:115
int getChanOTF(void)
Definition: otf.c:4729
Definition: header.h:13
float b
Definition: otf.h:124
int do_otfColorChoice(char *buf)
Definition: mailparse.c:1249
int createInterpTable(int max)
Definition: otf.c:4738
float * offdata
Definition: specdata.c:87
void fgauss()
int gcf()
int do_otfTime(char *buf)
Definition: mailparse.c:1559
int row
Definition: otf.h:110
int gauss_fit()
int gf_regcf(int np, int nrbar, double *d, double *rbar, double *thetab, double *tol, double *beta, int nreq)
Definition: grace_dofit.c:215
int drawColorBar(void)
Definition: otf.c:2108
int xgr_freeWindows(struct XGR_ *s)
Definition: xgr.c:348
void runminmax(double *x, double *y, double *ax, double *ay, int n, int ilen, int type)
Definition: grace_fit.c:374
int combineData(float *xdata, float *yd, struct HEADER *head)
Definition: spectra.c:309
int xgr_putXimage(char *win_name, double fx, double fy, int w, int h, unsigned char *data)
int to_exec(char *buf)
Definition: dataserv.c:658
int do_otfGridChanCompress(char *buf)
Definition: mailparse.c:812
int computeShade(void)
Definition: otf.c:1602
int crosscorr(double *x, double *y, int n, int maxlag, double *xcov, double *xcor)
Definition: grace_fit.c:463
int shift(void)
Definition: shift.c:65
int do_otfLockScale(char *buf)
Definition: mailparse.c:780
int display_image(double xb, double xe, double yb, double ye, struct DS_IMAGE_INFO *im)
int doSpecPlotWinEvent(XEvent *event, unsigned int mask)
Definition: specplot.c:404
int computeBaseLine(struct LP_IMAGE_INFO *image)
Definition: baseline.c:200
int do_fixedzero(char *buf)
Definition: mailparse.c:722
int otfGridDisplaySpec(XEvent *event, unsigned int mask)
Definition: otf.c:3553
int gf_cov(int np, int nrbar, double *d, double *rbar, int nreq, double *rinv, double *var, double *covmat, int dimcov, double *sterr)
Definition: grace_dofit.c:361
int mrqmin()
int gaussj()
int do_otfGridSizeDec(char *buf)
Definition: mailparse.c:890
int mainFrameRepaint(void)
Definition: dataserv.c:594
int markDataDirty(void)
Definition: otf.c:2621
int do_diagHarCopyServ(void)
Definition: mailparse.c:604
int do_otfBaseLine(char *buf)
Definition: mailparse.c:1697
int do_otfGridNoint(char *buf)
Definition: mailparse.c:973
int free_vector()
int * ivector(int nl, int nh)
Definition: gaussfit.c:39
int xgr_drawLineDirect(double xmin, double xmax, double ymin, double ymax, float *xdata, float *ydata, int n, int color)
int do_gfilename(char *buf)
Definition: dataserv.c:1138
int do_otfDisplayArray(char *buf)
Definition: mailparse.c:1479
int computeRms(float *y, int n, float *rms)
Definition: line.c:82
int dofitcurve(int cnt, double *xd, double *yd, int nd, double *c)
Definition: grace_dofit.c:976
int do_ignorePos(char *buf)
Definition: spectra.c:515
int getNProcs(void)
Definition: dataserv.c:153
int doOtfGridRePaint(void)
Definition: otf.c:1104
int usPixmap
Definition: xgr.h:53
struct OTF_GRID * fetchMapCell(int row, int col)
Definition: otf.c:5584
int displayOtfGridSpectra(struct OTF_GRID *s)
Definition: otf.c:3766
int placeBeamSize(void)
Definition: otf.c:1755
int flame(double a, double b, double x)
Definition: xgr.c:195
double gammln()
int mrqcof()
int modefield(int id, char *field)
void runmedian(double *x, double *y, double *ax, double *ay, int n, int ilen)
Definition: grace_fit.c:336
int dummieEventProc(XEvent *event)
Definition: dataserv.c:388
int do_spectraCombine(char *buf)
Definition: spectra.c:170
int do_otfSingleBin(char *buf)
Definition: mailparse.c:1441
void gf_cor(int np, double *d, double *rbar, double *thetab, double *sserr, double *work, double *cormat, double *ycorr)
Definition: grace_dofit.c:457
int addRegionBox(int color, double ra, double dec, double rsize, double dsize, char *title)
Definition: region.c:99
int do_otfNumColors(char *buf)
Definition: mailparse.c:1190
int do_toggleRegionLabels(void)
int interpAndPlot(struct XGR_ *s)
Definition: otf.c:4345
struct HEADER * checkScanHeader(int v, float s)
Definition: gridmap.c:131
int do_mallocmap(void)
Definition: mailparse.c:711
int getNumSpectra(double datalen, double noint)
int do_listRegions(char *buf)
Definition: region.c:299
int markBaseDirty(void)
Definition: otf.c:2641
int xgr_setNumColors(int n)
Definition: xgr.c:93
XImage * createXimage(Display *display, int w, int h, int depth)
Definition: otf.c:4520
int dispatchOtfGridEvents(XEvent *e)
Definition: otf.c:2953
int do_help(char *buf)
Definition: mailparse.c:419
#define dy(i)
int do_specCombClear()
Definition: line.c:194
int do_otfSlice(char *buf)
Definition: otf.c:5964
int do_badChan(char *buf)
Definition: mailparse.c:363
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_linedefault(void)
Definition: obsmodes.c:275
int do_otfGridCellSizeRa(char *buf)
Definition: mailparse.c:831
double getElapseTime(void)
Definition: etime.c:134
int gf_includ(int np, int nrbar, double w, double *xrow, double y, double *d, double *rbar, double *thetab, double *sserr)
Definition: grace_dofit.c:95
int xgr_drawFillBox(double xmin, double xmax, double ymin, double ymax, double xl, double yt, double xr, double yb, int color)
int accumWorkIntoGrid(void)
Definition: otf.c:2497
int do_load(char *buf)
Definition: mailparse.c:178
struct WINDOW * xgr_getWin(Window win)
Definition: xgr.c:826
int do_otf3dplot(char *buf)
Definition: otf.c:5220
int computeRegionExtents(void)
Definition: region.c:238
float * gainsdata
Definition: specdata.c:89
int setInValid(int w)
Definition: xgr.c:2333
int do_otfRmBadChan(void)
Definition: otf.c:1208
int checkMapScans(int v, double s)
int setMapCell(int row, int col, struct OTF_GRID *f)
Definition: otf.c:5597
int do_otfGridSizeRa(char *buf)
Definition: mailparse.c:870
Definition: otf.h:105
int do_linetotalmapoff(void)
Definition: obsmodes.c:154
int xgr_hardCopy(char *win, int land, int rev, char *file)
Definition: xgr.c:851
int do_toggleRegionBold(int dir)
int zeroWorkArray(void)
Definition: otf.c:2328
int do_ignoreGains(char *buf)
Definition: mailparse.c:521
int fitcurve(double *x, double *y, int n, int ideg, double *coeff)
Definition: grace_fit.c:239
int * gf_ivector(int l, int h)
Definition: grace_dofit.c:898
int getRequestedCell(int row, int col)
Definition: otf.c:3482
int do_hardCopy(char *buf)
Definition: mailparse.c:555
double * vector()
int forceDrawGrid(void)
Definition: otf.c:5935
int do_otfListCells(char *buf)
Definition: otf.c:5904
int do_status(void)
Definition: mailparse.c:354
double indx
Definition: header.h:84
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)
#define N
Definition: gsl_try_2.c:67
int putChanTemp(int c, double t)
int free_ivector()
int addSpecScans(double s)
void runstddev(double *x, double *y, double *ax, double *ay, int n, int ilen)
Definition: grace_fit.c:313
void runavg(double *x, double *y, double *ax, double *ay, int n, int ilen)
Definition: grace_fit.c:290
void gf_putdvec(const char *s, double *x, int l, int h)
Definition: grace_dofit.c:960
int drawRegions(void)
int checkIgnoreScans(int v, double s)
double leasev(double *c, int degree, double x)
Definition: grace_fit.c:210
int otfInit(int init)
Definition: otf.c:423
Definition: otf.h:58
int exitProc(int status)
Definition: dataserv.c:371
int do_sendSpecComb(void)
Definition: spectra.c:235
int gser()
int addIgnoreScans(int v, double s)
int initGrid(void)
Definition: otf.c:1812
int loadGrayScale(struct XGR_ *s)
Definition: xgr.c:168
Definition: xgr.h:48
Definition: xgr.h:75
int xgr_findWindow(Display *dpy, Window win, struct WINDOW **w)
Definition: xgr.c:602
int do_otfGridVelocity(char *buf)
Definition: mailparse.c:1044
int do_loadRegion(char *buf)
Definition: region.c:354
int do_filename(char *buf)
Definition: dataserv.c:1100
int remRegions(void)
Definition: region.c:180
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)
Definition: grace_dofit.c:714
int do_otfGamma(char *buf)
Definition: mailparse.c:1356
int doOtfGridReSize(void)
Definition: otf.c:1186
int do_printData(char *buf)
Definition: dataserv.c:1053
int normalizeAndCal(void)
Definition: otf.c:2352
int subtractPredictedRA(float *data)
Definition: otf.c:1715
int do_otfGridRa(char *buf)
Definition: mailparse.c:1005
int charcompare(char **s1, char **s2)
Definition: xgr.c:2458
int xgr_drawPoints(double xmin, double xmax, double ymin, double ymax, float *xdata, float *ydata, int n, int color)
int do_makeGif(char *buf)
Definition: mailparse.c:623
int setSourceName(struct HEADER *head)
Definition: obsmodes.c:234
int do_otfGridScale(char *buf)
Definition: mailparse.c:1384
int fillOtfGrid(void)
Definition: otf.c:2149
int do_otfSpectralSum(char *buf)
Definition: otf.c:4791
int do_clearIgnore(void)
Definition: otf.c:741
int xgr_graphInit(struct XGR_ *s)
Definition: xgr.c:71
char title[256]
Definition: specplot.c:34
int xgr_reSizeProc(Window window, int width, int height)
Definition: xgr.c:698
int do_scanDone(char *buf)
Definition: mailparse.c:306
void gf_pr_utdm_v(double *x, int N, int width, int precision)
Definition: grace_dofit.c:851
int do_diagHarCopyGrid(void)
Definition: mailparse.c:614
int xgr_drawTextClear(double x, double y, char *msg, int clr, int f)
double ** gf_dmatrix(int rl, int rh, int cl, int ch)
Definition: grace_dofit.c:917
int xgr_eventProc(XEvent *event, Window window, unsigned int mask)
Definition: xgr.c:762
int printData(float *f)
Definition: obsmodes.c:461
int linear_regression(int n, double *x, double *y, double *coeff)
Definition: grace_fit.c:497
int main_loop(void)
Definition: dataserv.c:847
int do_otfGridDump(void)
Definition: otf.c:4059
int do_otfSpectraDebug(char *buf)
Definition: mailparse.c:1116
int usage(char *name)
Definition: linuxpops.c:1473
int do_toggleFixData(char *buf)
Definition: dataserv.c:666
int interpAndWrite(struct XGR_ *s)
Definition: otf.c:6299
int do_otfSingleChan(char *buf)
Definition: mailparse.c:1412
int do_otfBeamArm(char *buf)
Definition: mailparse.c:1673
Window win
Definition: xgr.h:52
double findInterp(double v1, double v2, int indx, int max)
Definition: otf.c:4771
int getBaselines(int *b)
Definition: otf.c:3891
int covsrt()
int remIgnoreScans(void)
Definition: otf.c:630
int loadFlameScale(struct XGR_ *s, int cindx)
Definition: xgr.c:215
int displayRequestedOtf(void)
Definition: otf.c:3737
int insertScan(int scn)
Definition: dataserv.c:627
void linearconv(double *x, double *h, double *y, int n, int m)
Definition: grace_fit.c:446
int loadPseudoScale(struct XGR_ *s)
Definition: xgr.c:279
int free_matrix()
double * gf_dvector(int l, int h)
Definition: grace_dofit.c:878
int do_ignoreRepaints(char *buf)
Definition: mailparse.c:542
int argmatch(char *s1, char *s2, int atleast)
Definition: dataserv.c:559
int checkSpecScans(double s)
int synchronize(int v)
Definition: dataserv.c:1036
int xgr_setFont(struct XGR_ *s, int f)
Definition: xgr.c:2294
int fixVel(struct HEADER *head)
Definition: read_scan.c:56
int paintOtfGrid(void)
Definition: otf.c:1844
int do_remRegions(char *buf)
Definition: region.c:309
int do_ignoreScan(char *buf)
Definition: otf.c:448
int do_markers(char *buf)
Definition: mailparse.c:743
int gf_hdiag(double *xrow, int np, int nrbar, double *d, double *rbar, double *tol, int nreq, double *hii)
Definition: grace_dofit.c:780
int gf_ss(int np, double *d, double *thetab, double *sserr, double *rss)
Definition: grace_dofit.c:341
int set_sock_callback(int(*call)(void))
float bdata[MAX_ATM_ELEMENTS]
Definition: atm.c:94
int xgr_setColorChoice(int c)
Definition: xgr.c:106
int addMapScans(int v, double s)
float xdata[MAX_ATM_ELEMENTS]
Definition: atm.c:90
int do_stop(void)
Definition: mailparse.c:393
int do_otfGridInit(void)
Definition: otf.c:4257
double ** matrix()
int do_debug(char *buf)
Definition: mailparse.c:765
void stasum(double *x, int n, double *xbar, double *sd)
Definition: grace_fit.c:180
int putHeader(struct DS_IMAGE_INFO *image)
Definition: specplot.c:819
int do_saveIgnoreScans(FILE *fp)
Definition: otf.c:659
int do_otfLoadChoice(char *buf)
Definition: mailparse.c:1146
int computeInten(int bc, int ec)
Definition: otf.c:1377
int do_otfBeamSize(char *buf)
Definition: mailparse.c:1627
int do_otfRms(char *buf)
Definition: mailparse.c:1538
double rms
Definition: beam.h:5
int do_printMapScans(void)
Definition: otf.c:900
int resendSpecData(struct SPECDATA *sd)
Definition: otf.c:962
int do_otfInterp(void)
Definition: mailparse.c:1234
int listRegions(void)
Definition: region.c:208
int gf_pcorr(int np, int nrbar, double *d, double *rbar, double *thetab, double *sserr, int in, double *cormat, int dimc, double *ycorr)
Definition: grace_dofit.c:427
int do_otfCutOff(char *buf)
Definition: mailparse.c:1060
int readMail(char *buf, int len)
Definition: mailparse.c:223
int col
Definition: otf.h:109
int do_etimeClear(void)
Definition: etime.c:170
int do_otf3dcube(char *buf)
Definition: otf.c:4931
Definition: sdd.h:4
int checkBoot(struct BOOTSTRAP *b, char *fn)
Definition: read_scan.c:15
int do_otf(float *data, struct HEADER *head, float *offdata, float *gainsdata)
Definition: otf.c:1006
int peekScan(double scan, char *filename, int *be, int *modeid, struct HEADER *head)
int do_otfGridCellSizeDec(char *buf)
Definition: mailparse.c:851
int xgr_pixmapToWindow(char *name)
Definition: xgr.c:530
int setFrameFooter(char *msg, int lr)
Definition: xgr.c:2514
int do_tiltmeter(char *buf)
Definition: mailparse.c:171
struct HEADER * addScanHeader(int v, float s, struct HEADER *head)
Definition: gridmap.c:171
int myIOErrorHandler(Display *display, XErrorEvent *myerr)
Definition: dataserv.c:314
int do_otfIFchoice(char *buf)
Definition: mailparse.c:1172
int gf_vmove(int np, int nrbar, int *vorder, double *d, double *rbar, double *thetab, double *rss, int from, int to, double *tol)
Definition: grace_dofit.c:536
double gammq()
int putOtfGrid(void)
Definition: otf.c:2095
int xgr_clearArea(double x, double y, double dx, double dy)
int do_otfVelRun(char *buf)
Definition: otf.c:3904
int xgr_setBox(double x, double y, double dx, double dy)
int do_baseLines(char *buf)
Definition: mailparse.c:1733
int insertVersion(struct OTF_GRID *g, int ver)
Definition: otf.c:2387
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)
Definition: otf.c:5836
int otfGridInit(int cols, int rows, int noint)
Definition: otf.c:167
char ** findFixedFonts(Display *dpy, int *num)
Definition: xgr.c:2351
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)
Definition: otf.c:5732
#define m(i)
char * vxstrtok(char *string, char *last_token, char *delim)
Definition: mailparse.c:655
int to_xgraphic(char *buf)
Definition: dataserv.c:139
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)
Definition: specplot.c:964
float ydata[MAX_ATM_ELEMENTS]
Definition: atm.c:91
struct HEADER * do_addHeader(int ver, float scan, struct HEADER *head)
Definition: gridmap.c:104
int showDisplay(void)
Definition: dataserv.c:690
struct WINDOW * createWindow(struct XGR_ *s, char *title, int cw, int ch, int xpos, int ypos, int bg, int usPixmap, int which)
Definition: dataserv.c:415
int do_otfStatus(void)
Definition: otf.c:6152
int do_etimeShow(void)
Definition: etime.c:230
int do_setClip(char *buf)
Definition: mailparse.c:473
int scaleData(float *data)
Definition: otf.c:1691
int otfInterp(void)
Definition: otf.c:4282
int remScanHeaders()
Definition: gridmap.c:224
void filterser(int n, double *x, double *y, double *resx, double *resy, double *h, int len)
Definition: grace_fit.c:421
int findNextCell(int row, int col, struct OTF_GRID **p2)
Definition: otf.c:5614
int do_zapCell(char *buf)
Definition: otf.c:5497
int xgr_mapUnmapWindow(char *name, int map)
Definition: xgr.c:568
int ds_delay(double dc)
Definition: dataserv.c:1167
void signalHandler(void)
Definition: dataserv.c:351
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 do_quit(void)
Definition: mailparse.c:384
int display_spectra(double xb, double xe, double yb, double ye, float *data, struct HEADER *head, int procSpec)
#define dx(i)
int show_display(void)
Definition: dataserv.c:680
int do_otfGridLoad(char *buf)
Definition: otf.c:4100
int remMapScans(void)
Definition: otf.c:871
int do_otfGridCols(char *buf)
Definition: mailparse.c:941
int doSpecWinReSize(void)
Definition: specplot.c:227
void spline(int n, double *x, double *y, double *b, double *c, double *d)
Definition: grace_fit.c:615
struct SPECDATA sd
Definition: otf.c:43
int to_helper(char *buf)
Definition: dataserv.c:125
void sort_xy(double *tmp1, double *tmp2, int up, int sorton, int stype)
Definition: grace_fit.c:133
int xgr_rePaintProc(Window window)
Definition: xgr.c:794
int do_otfGridDec(char *buf)
Definition: mailparse.c:1025
int xgr_checkForEvents(void)
Definition: xgr.c:2547
int computeMinMax(void)
Definition: otf.c:1511
int recomputeBaseLines(void)
Definition: otf.c:2662
int do_xsync(char *buf)
Definition: mailparse.c:401
int createWindows(struct XGR_ *s, char *title, int cw, int ch, int xpos, int ypos, int bg, int usPixmap)
Definition: dataserv.c:512
int gf_tolset(int np, int nrbar, double *d, double *rbar, double *tol)
Definition: grace_dofit.c:247
int do_otfSendPlot(char *buf)
Definition: otf.c:3453
int xgr_clearScreen(void)
Definition: xgr.c:921
void aspline(int n, double *x, double *y, double *b, double *c, double *d)
Definition: grace_fit.c:754
int do_otfGridRestfreq(char *buf)
Definition: mailparse.c:909
int do_otfChannelMap(char *buf)
Definition: otf.c:4558
int processEvent(struct XGR_ *s)
Definition: dataserv.c:908
int xgr_setCurWindow(int win, int which)
Definition: xgr.c:483