73 token = strtok(edit,
" ,\t\r\n");
74 while(token != (
char *)NULL)
76 sprintf(
sat_tok[c++],
"%s", token);
77 token = strtok((
char *)NULL,
" ,\t\r\n");
139 st_fail(
"No xgraphic defined");
149 st_report(
"Clearing out Strings And Things");
151 bzero((
char *)&
sat,
sizeof(
sat));
229 if((fp = fopen(fname,
"w")) == NULL)
231 st_fail(
"Unable to open %s", fname);
242 fprintf(fp,
"Number Used Label_x Label_y Color Direct Size Text\n");
248 fprintf(fp,
" %2d %2d %9.3f %9.3f %2d %2d %d %s\n",
349 char tbuf[512], newlabel[256], fname[256], *string, line[256];
350 char ttbuf[512], bbuf[256];
398 if((fp = fopen(fname,
"r")) != NULL)
402 st_report(
"Loading Labels from: %s", fname);
404 while((
string = fgets(line,
sizeof(line), fp)) != NULL)
430 if(strstr(
sat_tok[k],
"Helvet"))
441 sprintf(ttbuf,
"%s ",
sat_tok[k]);
448 sprintf(bbuf,
"{/Helvetica=%d ", size);
452 sprintf(ttbuf,
"%s ",
sat_tok[k]);
478 st_fail(
"Unable to open: %s", fname);
512 sprintf(newlabel,
"{/Helvetica=%d ", l->
size);
515 sprintf(tbuf,
"%s ",
args->
tok[j]);
516 strcat(newlabel, tbuf);
518 strcat(newlabel,
"}");
525 _doCCur(
"Mouse-Click plot to locate label");
531 _doVCur(
"Mouse-Click plot to locate label");
537 _doFCur(
"Mouse-Click plot to locate label");
575 strcpy(l->
label, newlabel);
602 _doCCur(
"Mouse-Click plot to locate label");
608 _doVCur(
"Mouse-Click plot to locate label");
614 _doFCur(
"Mouse-Click plot to locate label");
703 sprintf(bbuf,
"{/Helvetica=%d ", l->
size);
707 sprintf(ttbuf,
"%s ",
args->
tok[k]);
715 strcpy(l->
label, bbuf);
744 if((fp = fopen(fname,
"w")) == NULL)
746 st_fail(
"Unable to open %s", fname);
750 st_report(
"Saving Markers to %s", fname);
758 fprintf(fp,
"# Used Marker_x Marker_y Marker_y2 Color\n");
763 fprintf(fp,
"%2d %d %9.3f %9.3f %9.3f %d\n",
785 int i, n,
color, chan;
786 char fname[256], *string, line[256];
789 float y1,
y2, delta, ny, cy;
822 _doCCur(
"Mouse-Click plot to locate top of marker");
828 _doVCur(
"Mouse-Click plot to locate top of marker");
834 _doFCur(
"Mouse-Click plot to locate top of marker");
842 _doFCur(
"Mouse-Click plot to locate bottom of marker");
854 st_fail(
"n: %d, out of range", i);
909 st_fail(
"Freq of %f, out of range; using default", m->
x);
919 st_print(
"y1 = %f, y2 = %f\n", y1, y2);
938 _doCCur(
"Mouse-Click plot to locate top of marker");
942 _doFCur(
"Mouse-Click plot to locate bottom of marker");
958 st_fail(
"n: %d, out of range", i);
966 st_fail(
"Wrong number of args: %d", n);
992 st_fail(
"n: %d, out of range", i);
1044 if((fp = fopen(fname,
"r")) != NULL)
1048 st_report(
"Loading Markers from: %s", fname);
1050 while((
string = fgets(line,
sizeof(line), fp)) != NULL)
1116 double mx = -1e6, mn = 1e6;
1151 if((fp = fopen(fname,
"w")) == NULL)
1153 st_fail(
"Unable to open %s", fname);
1157 st_report(
"Saving Hlines to %s", fname);
1164 fprintf(fp,
"# \n");
1165 fprintf(fp,
"# Used Color Value\n");
1166 fprintf(fp,
"# \n");
1185 char fname[256], *string, line[256];
1191 st_report(
"Clearing out All Horizontal Lines");
1233 st_report(
"Recommend Setting yrange to include Newly Create HLine");
1302 if((fp = fopen(fname,
"r")) != NULL)
1306 st_report(
"Loading Hlines from: %s", fname);
1308 while((
string = fgets(line,
sizeof(line), fp)) != NULL)
1369 if((fp = fopen(fname,
"w")) == NULL)
1371 st_fail(
"Unable to open %s", fname);
1382 fprintf(fp,
" # \n");
1383 fprintf(fp,
" # Used Color CT TT nT ");
1386 fprintf(fp,
" X Y ");
1391 fprintf(fp,
" # \n");
1395 fprintf(fp,
"%2d %d %d %7.3f %7.3f %d ", i,
1410 fprintf(fp,
" # \n");
1427 char tbuf[512], newlabel[256];
1442 st_report(
"Creating a Fork Label based on %d Gaussian Fits", nt);
1450 sprintf(tbuf,
"%s ",
args->
tok[i]);
1451 strcat(newlabel, tbuf);
1473 strcpy(f->
label, newlabel);
1483 st_fail(
"No Gaussian Fits Yet");
1494 int i, j, k, l, n, nt, color;
1495 char tbuf[512], newlabel[256], fname[256], *string, line[256];
1496 char ttbuf[512], bbuf[256];
1549 st_fail(
"Too few arg for auto create fork: requies > 2");
1568 sprintf(tbuf,
"%s ",
args->
tok[j]);
1569 strcat(newlabel, tbuf);
1586 st_fail(
"Not Enough Tines; Must be > %d", 1);
1593 sprintf(tbuf,
"Mouse-Click plot to locate bottom of Fork Tine %d", j+1);
1617 _doTCur(
"Mouse-Click plot to locate Cross Bar Temp");
1620 _doTCur(
"Mouse-Click plot to locate Label Placement");
1627 strcpy(f->
label, newlabel);
1699 if((fp = fopen(fname,
"r")) != NULL)
1703 st_report(
"Loading Forks from: %s", fname);
1705 while((
string = fgets(line,
sizeof(line), fp)) != NULL)
1734 for(k=(6+MAX_FORK_TINES*2);k<n;k++)
1736 sprintf(ttbuf,
"%s ",
sat_tok[k]);
1737 strcat(bbuf, ttbuf);
1759 st_fail(
"Unable to open: %s", fname);
1785 char tbuf[512], dbuf[256];
1810 st_fail(
"Date not set in Header");
1829 bzero(dbuf,
sizeof(dbuf));
1833 sprintf(tbuf,
"%s ",
args->
tok[j]);
1849 sprintf(tbuf,
"Mouse-Click plot to locate Date");
1887 char tbuf[512], buf[512];
1888 double x, y, deltay;
1904 sprintf(tbuf,
"Mouse-Click plot to locate Block");
1945 sprintf(buf,
"%s ",
args->
tok[i]);
1966 sprintf(tbuf,
"rms = %.2f / %.2f mK",
env->
rms * 1e3,
env->
trms * 1e3);
2016 sprintf(tbuf,
"slope = %e",
env->
slope);
2020 sprintf(tbuf,
"slope = %.4f",
env->
slope);
2075 static double x=0.0, y=0.0;
2088 if(x == 0.0 && y == 0.0)
2096 sprintf(tbuf,
"Mouse-Click Plot to Locate Gauss Info");
2193 st_report(
"getMouseClick(): Returned %d", ret);
2210 if((fp = fopen(fname,
"w")) == NULL)
2212 st_fail(
"Unable to open %s", fname);
2216 st_report(
"Saving pStamps to %s", fname);
2224 fprintf(fp,
"# Number Used Color X-min X-max boxUx BoxUy BoxLRx BoxLRy Size Label\n");
2230 fprintf(fp,
" %2d %d %d %11.3f %11.3f %11.3f %11.3f %11.3f %11.3f %d %s\n", i, p->
used,
2253 char ttbuf[512], bbuf[256], tbuf[256], fname[256], *string, line[256];
2268 st_report(
"Erasing All Postage Stamps");
2287 st_report(
"Erasing Postage Stamp: %d", n);
2291 bzero((
char *)p,
sizeof(
struct STAMP));
2306 if((fp = fopen(fname,
"r")) != NULL)
2308 st_report(
"Clearing out all Postage Stamps");
2311 st_report(
"Loading Postage Stamps from: %s", fname);
2313 while((
string = fgets(line,
sizeof(line), fp)) != NULL)
2345 if(strstr(
sat_tok[k],
"Helvet"))
2356 sprintf(ttbuf,
"%s ",
sat_tok[k]);
2357 strcat(bbuf, ttbuf);
2364 sprintf(bbuf,
"{/Helvetica=%d ", size);
2368 sprintf(ttbuf,
"%s ",
sat_tok[k]);
2369 strcat(bbuf, ttbuf);
2394 st_fail(
"Unable to open: %s", fname);
2441 strcpy(tbuf,
"Mouse-Click plot to locate Left Edge of Line");
2449 strcpy(tbuf,
"Mouse-Click plot to locate Right Edge of Line");
2457 strcpy(tbuf,
"Mouse-Click plot to locate Upper-Left of Stamp");
2466 strcpy(tbuf,
"Mouse-Click plot to locate Lower-Right of Stamp");
2488 sprintf(bbuf,
"{/Helvetica=%d ", p->
size);
2491 sprintf(ttbuf,
"%s ",
args->
tok[k]);
2492 strcat(bbuf, ttbuf);
2498 strcpy(p->
label, bbuf);
2538 double x, y, x1, xdelta, ydelta;
2549 sprintf(tbuf,
"label delete %d /q", i);
2561 printf(
"Number Used Label_x Label_y Color Direct Size Text\n");
2567 printf(
" %2d %2d %9.3f %9.3f %2d %2d %d %s\n",
2582 strcpy(tbuf,
"Mouse-Click plot to locate");
2612 st_fail(
"No more free labels");
2615 sprintf(tbuf,
"label set %d %f %f 0 2 + /q", n, x, y);
2620 st_fail(
"No more free labels");
2623 sprintf(tbuf,
"label set %d %f %f 0 2 Temp: %.3f /q", n, x1,
env->
tcur - ydelta*1.0,
env->
tcur);
2628 st_fail(
"No more free labels");
2631 sprintf(tbuf,
"label set %d %f %f 0 2 Vel : %.3f /q", n, x1,
env->
tcur - ydelta*2.0,
env->
vcur );
2636 st_fail(
"No more free labels");
2644 st_fail(
"No more free labels");
2647 sprintf(tbuf,
"label set %d %f %f 0 2 Chan: %.1f /q", n, x1,
env->
tcur - ydelta*4.0,
env->
ccur);
struct LP_IMAGE_INFO * h0
struct STRINGS_AND_THINGS sat
char label[MAX_LABEL_LENGTH]
int sock_write(struct SOCK *s, char *message, int l)
char * strcmprs(char *str)
struct PARSE_STACK * args
int deNewLineIt(char *buf)
struct STAMP stamps[MAX_PSTAMPS]
int printH_FlagHelp(char *cmd)
struct IMAGE_LABELS labels[MAX_TBLOCK_LABELS]
int sat_get_tok(char *edit)
struct IMAGE_LABELS labels[MAX_IMAGE_LABELS]
char tok[MAX_TOKENS][MAX_TOKENS]
char peakResultsStr1[256]
int hlineList(char *fname)
int autoCreateForks(void)
struct FORK_TINE tines[MAX_FORK_TINES]
struct IMAGE_HLINE hlines[MAX_IMAGE_HLINES]
struct IMAGE_FORKS forks[MAX_IMAGE_FORKS]
struct IMAGE_MARKERS markers[MAX_IMAGE_MARKERS]
#define MAX_IMAGE_GAUSS_RESULTS
char label[MAX_LABEL_LENGTH]
char label[MAX_LABEL_LENGTH]
#define MAX_IMAGE_MARKERS
char * getcTime(int offset)
int cursor_labels[MAX_IMAGE_LABELS]
char peakResultsStr2[256]
struct GAUSSIAN_FIT fits[MAX_GAUSSIAN_FITS]
double mapFtoChan(double f)
struct IMAGE_PSTAMPS pstamp
char sat_tok[MAX_TOKENS][MAX_TOKENS]
struct IMAGE_DATE_STRING date
int markerList(char *fname)
int pstampList(char *fname)
struct GAUSS_INFO_RESULTS results[MAX_IMAGE_GAUSS_RESULTS]
int forkList(char *fname)
int findHlineExtents(double *max, double *min)
int labelList(char *fname)
int getMouseClick(char *buf, double *x, double *y)
struct TITLE_BLOCK tblock