65 int noint, nfoc,
feed;
67 int i, j, n, ret, delta, nchan, expectedPos, maxi, save_ps;
68 int start, end, npts, bchans;
77 st_report(
"Using User supplied Center Channel: %d", expectedPos);
81 expectedPos = noint / 2;
105 st_report(
"specFocusOne(): noint = %d, nfoc = %d, expectedPos = %d, delta = %d",
106 noint, nfoc, expectedPos, delta);
127 strcpy(cmdBuf,
"show");
142 strcpy(cmdBuf,
"gracefit");
146 strcpy(cmdBuf,
"rmbase");
150 strcpy(cmdBuf,
"show");
156 sprintf(cmdBuf,
"make /c /g /d sfocus_data.%.2f.png",
h0->
head.
scan);
183 for(i=start;i<end;i++)
185 nchan = expectedPos + (noint * i);
189 for(j=(nchan-delta);j<(nchan+delta);j++)
196 peaks[i] /= (double)n;
204 st_report(
"[%2d]: %f %f", i, focusp[i], peaks[i]);
214 st_report(
"Fitting a %d Point Gauss to Peak: %f, @ %f, HP = %f", npts, maxG, focusp[maxi],
h0->
head.
wl * 6.0);
224 st_report(
"gauss_fit() returned: %d", ret);
227 st_report(
"Gaussian Peak: %7.2f K", aa1[1]);
228 st_report(
"Gaussian Center: %7.2f", aa1[2]);
229 st_report(
"Gaussian FWHM: %7.2f mm", aa1[3]);
268 sprintf(cmdBuf,
"make /c /g /d sfocus_gauss.%.2f.png",
h0->
head.
scan);
307 int i, ret, noint, nfoc;
309 char monBuf[256], cmdBuf[256];
323 st_fail(
"Missing Scan Number");
339 st_fail(
"doSfocus(): Scan %.2f, not found", scan);
358 sprintf(cmdBuf,
"show /f");
399 st_fail(
"monitor sockect not defined");
struct LP_IMAGE_INFO * h0
int clearFillContStruct(struct HEADER *h, int dlen, char *xl, char *yl)
struct PARSE_STACK * args
int plotGauss(double *x, int len, double *a, struct HEADER *h, int mode)
int printH_FlagHelp(char *cmd)
float xdata[MAX_CONT_SAMPLES]
float ydata[MAX_CONT_SAMPLES]
#define PLOT_STYLE_LINEPTS
int sock_send(struct SOCK *s, char *message)
struct SOCK * monitorSock
struct CONTINUUM_PLAIN cont_plain_send
int specFocusOne(int noint, int nfoc, int feed)
int baselines[MAX_BASELINES][2]