116 int i, dlen, oldzline;
118 dlen = (int)h->
noint;
124 st_fail(
"Too many Continuum Samples: %d", dlen);
193 int row, col,
count=0;
195 double x, y, z, x1, x2, y1, y2;
198 sprintf(fname,
"/tmp/%s/opt-3d-plot.dem",
session);
200 if( (fp = fopen(fname,
"w") ) <= (FILE *)0)
202 st_fail(
"display_3d_optical(): Unable to open '%s'", fname);
206 fprintf(fp,
"reset\n");
207 fprintf(fp,
"set title \"%16.16s\"\n", image->head.object);
209 fprintf(fp,
"set xlabel \"Az Offset\"\n");
210 fprintf(fp,
"set ylabel \"El. Offset\"\n");
211 fprintf(fp,
"set zlabel \"Intensity\"\n");
214 fprintf(fp,
"set border 4095\n");
215 fprintf(fp,
"set hidden3d\n");
218 x1 = -(image->head.noxpts / 2.0) * 1.5;
219 x2 = (image->head.noxpts / 2.0) * 1.5;
220 y1 = -(image->head.noypts / 2.0) * 1.5;
221 y2 = (image->head.noypts / 2.0) * 1.5;
223 fprintf(fp,
"set xrange [%f:%f]\n", x1, x2);
224 fprintf(fp,
"set yrange [%f:%f]\n", y1, y2);
228 fprintf(fp,
"set samples %d*%d\n", (
int)image->head.noxpts, (
int)image->head.noypts);
229 fprintf(fp,
"set isosamples 60\n");
230 fprintf(fp,
"set ticslevel 0.1\n");
231 fprintf(fp,
"set pm3d\n");
232 fprintf(fp,
"set palette color\n");
233 fprintf(fp,
"set palette model RGB\n");
234 fprintf(fp,
"set palette defined ( 0 \"blue\", 1 \"green\", 2 \"yellow\", 3 \"red\" )\n");
235 fprintf(fp,
"set palette gamma 1.0\n");
238 fprintf(fp,
"set view 60.0, 30.0, 1.0, 1.0\n");
239 fprintf(fp,
"set terminal x11 background rgb \"black\" enhanced 1 size 1200, 850 position 800, 500\n");
240 fprintf(fp,
"set contour both\n");
242 fprintf(fp,
"splot \"/tmp/%s/opt-3d-plot.dat\" every 1::0::1024 with lines\n",
session);
247 sprintf(fname,
"/tmp/%s/opt-3d-plot.dat",
session);
249 if( (fp = fopen(fname,
"w") ) <= (FILE *)0)
251 log_msg(
"display_3d_optical(): Unable to open '%s'", fname);
256 for(row=0;row<(int)image->head.noypts;row++)
258 for(col=0;col<(int)image->head.noxpts;col++)
260 x = (-image->head.noxpts / 2.0 * 1.5) + (double)col * 1.5;
261 y = (-image->head.noypts / 2.0 * 1.5) + (double)row * 1.5;
262 z = image->yplot1[
count];
264 fprintf(fp,
"%8.2f %8.2f %8.2f\n", x, y, z);
274 st_report(
"display_3d_optical(); Wrote %d cells to %s", count, fname);
276 sprintf(fname,
"xgraphic load \"/tmp/%s/opt-3d-plot.dem\"",
session);
297 yp = &image->yplot1[0];
298 for(i=0;i<dlen;i++,yp++)
334 for(i=0;i<dlen;i++,yp++)
338 printf(
"\n%4d: ", i);
341 printf(
"%10.6f ", *yp);
int clearFillContStruct(struct HEADER *h, int dlen, char *xl, char *yl)
int optical_determine_min_max(float *ydata, int dl, float scan)
int display_optical_table(float *data, struct HEADER *h)
int optical_show_phases(float *data, struct HEADER *h, int plot)
float xdata[MAX_CONT_SAMPLES]
float ydata[MAX_CONT_SAMPLES]
int zero_check(char *who, int dl, float *data)
int cont_display_optical(struct LP_IMAGE_INFO *image, int plot)
int cont_determine_min_max(float *ydata, int dl, float scan)
int log_msg(const char *fmt,...)
int sock_send(struct SOCK *s, char *message)
int kp_bin_and_cal_data(float *ydata, int dl, int avg, float *data, struct HEADER *h)
int smt_bin_and_cal_data(float *ydata, int dl, int avg, float *data, struct HEADER *h)
struct CONTINUUM_PLAIN cont_plain_send
float ydata[MAX_ATM_ELEMENTS]
int display_3d_optical(struct LP_IMAGE_INFO *image)