Linuxpops  3.01.04
Spectral Anaysis Package for Single Dish Data
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
otf.c
Go to the documentation of this file.
1 /*
2 Copyright 2021 Arizona Board of Regents on behalf of the University of Arizona.
3 
4 For commercial uses, to obtain a license to sell and or sublicense copies of
5 the Software please contact the University of Arizona at Tech Launch Arizona:
6 lewish@tla.arizona.edu.
7 
8 Permission is hereby granted, free of charge, to any person obtaining a copy
9 of this software and associated documentation files (the "Software"), to deal
10 in the Software without restriction for non-commercial use educational and
11 research purposes, including without limitation the rights to use, copy,
12 modify, merge, publish, distribute, and to permit persons to whom the Software
13 is furnished to do so, subject to the following conditions:
14 
15 The entire above copyright notice and this permission notice shall be included
16 in all copies or substantial portions of the Software.
17 
18 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 SOFTWARE.
25 
26 1. Additional Required Provisions
27 
28 1.1. Arbitration. The parties agree that if a dispute arises between them
29 concerning this Agreement, the parties may be required to submit the matter to
30 arbitration pursuant to Arizona law.
31 
32 1.2. Applicable Law and Venue. This Agreement shall be interpreted pursuant
33 to the laws of the State of Arizona. Any arbitration or litigation between the
34 Parties shall be conducted in Pima County, ARIZONA, and LICENSEE hereby
35 submits to venue and jurisdiction in Pima County, ARIZONA.
36 
37 1.3. Non-Discrimination. The Parties agree to be bound by state and federal
38 laws and regulations governing equal opportunity and non-discrimination and
39 immigration.
40 
41 1.4. Appropriation of Funds. The Parties recognize that performance by
42 ARIZONA may depend upon appropriation of funds by the State Legislature of
43 ARIZONA. If the Legislature fails to appropriate the necessary funds, or if
44 ARIZONA’S appropriation is reduced during the fiscal year, ARIZONA may cancel
45 this Agreement without further duty or obligation. ARIZONA will notify
46 LICENSEE as soon as reasonably possible after it knows of the loss of funds.
47 
48 1.5. Conflict of Interest. This Agreement is subject to the provisions of
49 A.R.S. 38-511 and other conflict of interest regulations. Within three years
50 of the EFFECTIVE DATE, ARIZONA may cancel this Agreement if any person
51 significantly involved in initiating, negotiating, drafting, securing, or
52 creating this Agreement for or on behalf of ARIZONA becomes an employee or
53 consultant in any capacity of LICENSEE with respect to the subject matter of
54 this Agreement.
55 
56  */
57 
58 
59 #include "extern.h"
60 
61 #define MAX_DATA_CHANNELS 8192
62 #include "ds_image_info.h"
63 
64 int doingOTF = 0;
65 
66 char *loadChoiceStrings[] = { "preview", /* 0 */
67  "fast", /* 1 */
68  "step", /* 2 */
69  NULL};
70 
71 char *otfColorChoice[] = { "gray", /* 0 */
72  "pseudo", /* 1 */
73  "flame1", /* 2 */
74  "flame2", /* 3 */
75  "flame3", /* 4 */
76  "flame4", /* 5 */
77  "flame5", /* 6 */
78  "flame6", /* 7 */
79  NULL };
80 
81 
82 int to_dataserv(buf)
83 char *buf;
84 {
85  int ret;
86 
87  if(buf && strlen(buf) > 1)
88  {
89  if(doingOTF)
90  {
91  st_report("To DATASERV: %s", buf);
92 
93  if(dataserv == 0)
94  {
95  dataserv = sock_connect("LINUXPOPS_DATASERV");
96  }
97 
98  ret = sock_send(dataserv, buf);
99 
100  if(!ret)
101  {
102  st_fail("No connection to OTF client present");
103 
104  doingOTF = 0;
105 
106  return(1);
107  }
108  }
109  else
110  {
111  st_fail("No viable OTF client present");
112 
113  return(1);
114  }
115  }
116  else
117  {
118  st_fail("to_dataserv() called with no buffer");
119 
120  return(1);
121  }
122 
123  return(0);
124 }
125 
126 
128 {
129  char tbuf[256];
130 
131  sprintf(tbuf, "help");
132 
133  to_dataserv(tbuf);
134 
135  return(0);
136 }
137 
138 
140 {
141  double dish;
142 
143  if(h0->head.scan != 0.0)
144  {
145  if(strncmp(h0->head.obsmode, "LINEOTF ", 8))
146  {
147  st_fail("No OTF Scan Loaded");
148  return(1);
149  }
150  }
151  else
152  {
153  st_fail("No Scan Loaded");
154  return(1);
155  }
156 
157  st_report("Configuring OTF map from Header");
158 
159  env->otf_if_choice = getFeed(h0->head.scan) - 1;
160 
161  strncpy(env->source, h0->head.object, 16);
162  env->source[16] = '\0';
163  strcmprs(env->source);
164 
165  if(env->issmt)
166  {
167  dish = 10.0;
168  }
169  else
170  {
171  dish = 12.0;
172  }
173 
174  if(env->dish_size)
175  {
176  dish = env->dish_size;
177  st_report("fwhm(): Using Non Standard Dish Size: %.2f M", dish);
178  }
179  else
180  {
181  st_report("fwhm(): Using Dish Size: %.2f M", dish);
182  }
183 
184  env->otf_nyquistra = (2.997925e8 / (2.0 * dish * h0->head.restfreq)) * 0.2062648;
185  env->otf_nyquistdec = env->otf_nyquistra * 0.90;
186 
189 
190  env->otf_cols = h0->head.noxpts;
191  env->otf_rows = h0->head.noypts;
192 
195 
196  env->otf_map_xsize = (env->otf_cols * env->otf_nyquistra) / 3600.0;
197  env->otf_map_ysize = (env->otf_rows * env->otf_nyquistdec) / 3600.0;
198 
199  if(env->otf_size_factor == 0.0)
200  {
201  env->otf_size_factor = 1.0;
202  }
203 
204  if(env->otf_size_factor > 0.0) /* User supplied ?? */
205  {
206  st_report("Scaling created map by: %.2f", env->otf_size_factor);
207 
210  }
211 
212  env->otf_bint_chan = (int)(h0->head.noint / 2.0 - 2.0);
213  env->otf_eint_chan = (int)(h0->head.noint / 2.0 + 2.0);
214 
215  env->otf_3d_bchan = (int)(h0->head.noint / 2.0 - 25.0);
216  env->otf_3d_echan = (int)(h0->head.noint / 2.0 + 25.0);
217  env->otf_3d_interp = 8;
218 
219  env->otf_movie_bchan = (int)(h0->head.noint / 2.0 - 40.0);
220  env->otf_movie_echan = (int)(h0->head.noint / 2.0 + 40.0);
221  env->otf_movie_nchan = 2;
222  env->otf_delay = 0.0;
223 
224  env->otf_baselines = 1; /* True */
225  env->otf_color = 1; /* Pseudo */
226  env->otf_ignore_color = 1; /* Ignore for now */
227  env->otf_ephem_obj = 0; /* Not an Ephem Obj */
228  env->otf_chan_map_cent = (int)(h0->head.noint / 2.0);
229  env->otf_chan_map_cols = 3;
230  env->otf_chan_map_rows = 3;
231  env->otf_chan_map_avg = 2;
232  env->otf_single_spec = (int)(h0->head.noint / 2.0);
233  env->otf_noint = (int)(h0->head.noint);
234 
238 
239  if(env->otf_single_bin == 0)
240  {
241  env->otf_single_bin = 2;
242  }
243 
244  if(env->otf_gamma == 0.0)
245  {
246  env->otf_gamma = 1.0;
247  }
248 
249  if(env->otf_grid_scale == 0.0)
250  {
251  env->otf_grid_scale = 1.0;
252  }
253 
254  return(0);
255 }
256 
257 
258 
260 {
261  char tbuf[512];
262 
263  if(doingOTF)
264  {
265  sprintf(tbuf, "filename %s", env->filename);
266  to_dataserv(tbuf);
267 
268  sprintf(tbuf, "gfilename %s", env->gfilename);
269  to_dataserv(tbuf);
270  }
271 
272  return(0);
273 }
274 
275 
277 {
278  int i;
279  char bbuf[1024], tbuf[256];
280 
281  sprintf(bbuf, "baselines ");
282 
283  for(i=0;i<4;i++)
284  {
285  if(env->baselines[i][0] > 0 && env->baselines[i][1] > 0)
286  {
287  sprintf(tbuf, "%d %d ", env->baselines[i][0], env->baselines[i][1]);
288  }
289  else
290  {
291  sprintf(tbuf, "-1 -1 ");
292  }
293 
294  strcat(bbuf, tbuf);
295  }
296 
297  to_dataserv(bbuf);
298 
299  sprintf(tbuf, "otfbaseline %d", env->otf_baselines);
300  to_dataserv(tbuf);
301 
302  return(0);
303 }
304 
305 
307 {
308  char tbuf[256], execBuf[256];
309 
310  if(doingOTF)
311  {
312  if(notSet(PF_K_FLAG)) /* Quick Flag */
313  {
314  sendFilenames();
315 
316  sendBaselines();
317  }
318 
319  sprintf(tbuf, "otfcutoff %d", env->otf_cutoff);
320  to_dataserv(tbuf);
321 
322  sprintf(tbuf, "ig_repaints %d", env->otf_ignore_repaint);
323  to_dataserv(tbuf);
324 
325  sprintf(tbuf, "otfbeamsize %d %f %f", env->otf_show_beam_size, env->otf_beam_ra * 15.0, env->otf_beam_dec);
326  to_dataserv(tbuf);
327 
328  sprintf(tbuf, "otfifchoice %d", env->otf_if_choice);
329  to_dataserv(tbuf);
330 
331  sprintf(tbuf, "otfchans %d %d", env->otf_bint_chan, env->otf_eint_chan);
332  to_dataserv(tbuf);
333 
334  sprintf(tbuf, "otfsinglechan %d", env->otf_single_spec);
335  to_dataserv(tbuf);
336 
337  sprintf(tbuf, "otfsinglebin %d", env->otf_single_bin);
338  to_dataserv(tbuf);
339 
340  sprintf(tbuf, "otfgridscale %f", env->otf_grid_scale);
341  to_dataserv(tbuf);
342 
343  sprintf(tbuf, "otfgamma %f", env->otf_gamma);
344  to_dataserv(tbuf);
345 
346 
347  if(env->otf_map_velocity == 0.0)
348  {
349  st_warn("otf_map_velocity is Zero!");
350  }
351 
352  sprintf(tbuf, "otfgridvelocity %f", env->otf_map_velocity);
353  to_dataserv(tbuf);
354 
355 
356  if(env->otf_map_freqres == 0.0)
357  {
358  st_fail("otf_map_freqres is Zero!");
359  return(1);
360  }
361  sprintf(tbuf, "otfgridfreqres %f", env->otf_map_freqres);
362  to_dataserv(tbuf);
363 
364 
365  if(env->otf_map_restfreq == 0.0)
366  {
367  st_fail("otf_map_restfreq is Zero!");
368  return(1);
369  }
370  sprintf(tbuf, "otfgridrestfreq %f", env->otf_map_restfreq);
371  to_dataserv(tbuf);
372 
373 
374  if(env->otf_load_choice >= 0 && env->otf_load_choice < 3)
375  {
376  sprintf(tbuf, "otfloadchoice %s", loadChoiceStrings[env->otf_load_choice]);
377  to_dataserv(tbuf);
378  }
379  else
380  {
381  st_fail("otf_load_choice of %d, out of range: 0-2", env->otf_load_choice);
382  return(1);
383  }
384 
385  if(notSet(PF_K_FLAG)) /* Quick Flag */
386  {
387  /* Do color last as it takes a few seconds over network */
388  if(env->otf_color >= 0 && env->otf_color < 7)
389  {
390  if(!env->otf_ignore_color)
391  {
392  sprintf(tbuf, "otfcolorchoice %s", otfColorChoice[env->otf_color]);
393  to_dataserv(tbuf);
394 
395  /* Because changing colors can take a long time over the net, wait till done */
396  sprintf(execBuf, "helperwait done 30");
397  parseCmd(execBuf);
398  }
399  else
400  {
401  st_report("Skipping OTF Color Selection; 'otf_ignore_color' Non-Zero");
402  }
403  }
404  else
405  {
406  st_fail("otf_color of %d, out of range: 0-7", env->otf_color);
407 
408  return(1);
409  }
410  }
411  }
412  else
413  {
414  st_fail("You must start the OTF sub-system first");
415 
416  return(1);
417  }
418 
419  return(0);
420 }
421 
422 
423 int otfInit(init)
424 int init;
425 {
426  char tbuf[1024];
427 
428  st_report("Initializing OTF Dataserv");
429 
430  if(doingOTF)
431  {
432  to_dataserv("otflockgrid 0"); /* Onlock the gridder */
433 
434  if(init)
435  {
436  to_dataserv("otfgridinit"); /* Initialize it */
437  }
438 
439  if(sendParams())
440  {
441  return(1);
442  }
443 
444  sprintf(tbuf, "otfautoconfig 1");
445  to_dataserv(tbuf);
446 
447  sprintf(tbuf, "otfgridra %f", env->otf_map_ra);
448  to_dataserv(tbuf);
449 
450  sprintf(tbuf, "otfgriddec %f", env->otf_map_dec);
451  to_dataserv(tbuf);
452 
453  sprintf(tbuf, "otfgridsizera %f", env->otf_map_xsize);
454  to_dataserv(tbuf);
455 
456  sprintf(tbuf, "otfgridsizedec %f", env->otf_map_ysize);
457  to_dataserv(tbuf);
458 
459  sprintf(tbuf, "otfgridcellsizera %f", env->otf_nyquistra);
460  to_dataserv(tbuf);
461 
462  sprintf(tbuf, "otfgridcellsizedec %f", env->otf_nyquistdec);
463  to_dataserv(tbuf);
464 
465 
466  env->otf_cols = env->otf_map_xsize * 3600.0 / env->otf_nyquistra;
468 
469  if(env->otf_size_factor == 0.0)
470  {
471  env->otf_size_factor = 1.0;
472  }
473 
474  env->otf_cols = (int)((float)env->otf_cols * env->otf_size_factor);
475  env->otf_rows = (int)((float)env->otf_rows * env->otf_size_factor);
476 
477  if(env->otf_cols > 0 && env->otf_rows > 0 && env->otf_noint > 0)
478  {
479  sprintf(tbuf, "otfgridcols %d", env->otf_cols);
480  to_dataserv(tbuf);
481 
482  sprintf(tbuf, "otfgridrows %d", env->otf_rows);
483  to_dataserv(tbuf);
484 
485  sprintf(tbuf, "otfgridnoint %d", env->otf_noint);
486  to_dataserv(tbuf);
487  }
488  else
489  {
490  st_fail("Bad config:\n cols = %d or row = %d or noint = %d", env->otf_cols, env->otf_rows, env->otf_noint);
491  return(1);
492  }
493 
494  to_dataserv("otfgridinit"); /* Init grid based on passed values */
495 
496  to_dataserv("otflockgrid 0"); /* Lock the gridder */
497 
498  }
499  else
500  {
501  st_fail("You must start the OTF sub-system first");
502 
503  return(1);
504  }
505 
506  return(0);
507 }
508 
509 
510 
512 {
513  char tbuf[256];
514 
515  sprintf(tbuf, "dl /k otf");
516 
517  parseCmd(tbuf);
518 
519  return(0);
520 }
521 
522 
523 int otfLoad(norepaint)
524 int norepaint;
525 {
526  char tbuf[256];
527 
528  if(norepaint)
529  {
530  sprintf(tbuf, "otfgridload %.0f %.0f -1.0", env->bscan, env->escan);
531  }
532  else
533  {
534  sprintf(tbuf, "otfgridload %.0f %.0f", env->bscan, env->escan);
535  }
536 
537  to_dataserv(tbuf);
538 
539  return(0);
540 }
541 
542 
543 int otfMovie(rec, interp)
544 int rec, interp;
545 {
546  char tbuf[256], dir[256], *cp1, *cp2;
547 
548  if(args->ntokens > 1)
549  {
550  strcpy(dir, args->secondArg);
551  }
552  else
553  {
554  strcpy(dir, "Forw");
555  }
556 
557  if(env->otf_movie_bchan == 0 || env->otf_movie_echan == 0 || env->otf_movie_nchan == 0)
558  {
559  st_fail("otfMovie(): otf_movie_* must not be 0");
560 
561  otfParamList();
562 
563  return(1);
564  }
565 
566  if((env->otf_movie_bchan >= env->otf_movie_echan) /* || env->otf_movie_echan >= h0->head.noint */)
567  {
568  st_fail("otfMovie(): otf_movie_bchan must be less that otf_movie_echan");
569 
570  otfParamList();
571 
572  return(1);
573  }
574 
575  if(rec)
576  {
577  cp1 = "record";
578  }
579  else
580  {
581  cp1 = " ";
582  }
583 
584  if(interp)
585  {
586  cp2 = "interp";
587  }
588  else
589  {
590  cp2 = " ";
591  }
592 
593  sprintf(tbuf, "otfvelrun %d %d %d %s %f %s %s",
597  dir,
598  env->otf_delay, cp1, cp2);
599 
600  to_dataserv(tbuf);
601 
602  return(0);
603 }
604 
605 
607 {
608  char tbuf[256];
609 
610  if(env->otf_chan_map_cent == 0 ||
611  env->otf_chan_map_rows == 0 ||
612  env->otf_chan_map_cols == 0 ||
613  env->otf_chan_map_avg == 0)
614  {
615  st_fail("otfChanMap(): otf_chan_map_* must not be 0");
616 
617  otfParamList();
618 
619  return(1);
620  }
621 
622  sprintf(tbuf, "otfchannelmap %d %d %d %d", env->otf_chan_map_cent,
626 
627  to_dataserv(tbuf);
628 
629  return(0);
630 }
631 
632 
634 {
635  double cutoff;
636  char tbuf[256];
637 
638  st_report("Performing 3d Cube");
639 
640  if(env->otf_3d_vrange == 0.0)
641  {
642  env->otf_3d_vrange = 1.0;
643  }
644 
645  if(env->otf_3d_urms == 0.0)
646  {
647  env->otf_3d_urms = 100.0;
648  }
649 
650  cutoff = (double)env->otf_cutoff / 100.0;
651 
652  sprintf(tbuf, "otf3dcube %d %d %d %.3f %.2f %.2f %.3f",
655  cutoff, env->otf_3d_urms, env->otf_zrange_factor);
656 
657  to_dataserv(tbuf);
658 
659  return(0);
660 }
661 
662 
663 
665 {
666  int interp = 0;
667  char tbuf[256];
668 
669  if(isSet(PF_2_FLAG)) /* Interpolate level ?? */
670  {
671  interp = 2;
672  }
673  else
674  if(isSet(PF_3_FLAG))
675  {
676  interp = 3;
677  }
678  else
679  if(isSet(PF_4_FLAG))
680  {
681  interp = 4;
682  }
683  else
684  if(isSet(PF_5_FLAG))
685  {
686  interp = 5;
687  }
688 
689  st_report("Performing 3d Plot");
690 
691  sprintf(tbuf, "otf3dplot %s %d", session, interp);
692 
693  to_dataserv(tbuf);
694 
695  return(0);
696 }
697 
698 
699 
700 
702 {
703  int i, b = 0, e = 0, first = 1;
704  struct HEADER *p;
705 
706  st_report("autoSetEBscan(): Locating LINEOTF scans for source: %s", env->source);
707 
708  p = &sa[0];
709  for(i=0;i<env->numofscans;i++,p++)
710  {
711  if(!strncmp(p->obsmode, "LINEOTF", 7) && !strncmp(p->object, env->source, strlen(env->source)))
712  {
713  if(first)
714  {
715  b = (int)p->scan;
716  first = 0;
717  }
718 
719  e = (int)p->scan;
720  }
721  }
722 
723  if( b && e)
724  {
725  env->bscan = (double)b;
726  env->escan = (double)e;
727 
728  st_report("autoSetEBscan(): Setting bscan: %.0f, escan: %.0f", env->bscan, env->escan);
729  }
730  else
731  {
732  st_report("autoSetEBscan(): No OTF scans found for %s", env->source);
733  }
734 
735  return(0);
736 }
737 
738 
740 char *buf;
741 {
742  int i, n;
743  char dbuf[1024], tbuf[512];
744 
745  n = args->ntokens;
746 
747  bzero(dbuf, sizeof(dbuf));
748 
749  for(i=1;i<n;i++)
750  {
751  sprintf(tbuf, "%s ", args->tok[i]);
752  strcat(dbuf, tbuf);
753  }
754 
755  strcpy(buf, dbuf);
756 
757  return(0);
758 }
759 
760 
761 int doOTFcmd()
762 {
763  char dbuf[1024];
764 
765  reassembleArgs(dbuf); /* Reassemble the args into a command */
766 
767  to_dataserv(dbuf);
768 
769  return(0);
770 }
771 
772 
774 {
775  int i, n, ret=0;
776  char tbuf[256], dbuf[1024];
777  struct LP_IMAGE_INFO *im = &H0;
778  struct DS_IMAGE_INFO *ds;
779  extern struct DS_IMAGE_INFO ds_image_info;
780 
781  ds = &ds_image_info;
782 
783  reassembleArgs(tbuf);
784 
785  if(strlen(tbuf) > 1)
786  {
787  sprintf(dbuf, "otfgridsum %s", tbuf);
788  }
789  else
790  {
791  strcpy(dbuf, "otfgridsum");
792  }
793 
794  to_dataserv(dbuf);
795 
796  subArgs(2, "5"); /* Wait 5 seconds */
797  args->ntokens = 2;
798 
799  ret = helperBinaryWait();
800 
801  st_report("helperBinaryWait() returned %d", ret);
802 
803  if(!ret)
804  {
805  if(ds->noint == 0)
806  {
807  st_report("Dataserv Image Empty");
808  return(1);
809  }
810 
811  subArgs(2, "H0"); /* Clear out the H0 image */
812  args->ntokens = 2;
813  zeroImage();
814 
815  copyEnv2Image(im); /* Copy in most items */
816 
817  im->ainfo.scanct = ds->scanct;
818  im->ainfo.bscan = ds->bscan;
819  im->ainfo.escan = ds->escan;
820 
821  im->binfo.a = ds->a;
822  im->binfo.b = ds->b;
823  im->binfo.rms = ds->rms;
824 
825  bcopy((char *)&ds->head, (char *)&im->head, sizeof(struct HEADER));
826 
827  strncpy(im->head.object, ds->source, 16);
828  im->head.object[15] = '\0';
829  strncpy(im->head.coordcd, ds->coordcd, 8);
830  im->head.coordcd[7] = '\0';
831 
832  im->head.noint = (double)ds->noint;
833  im->head.datalen = im->head.noint * sizeof(float);
834  im->head.stsys = ds->tsys;
835 
836  n = ds->noint;
837 
838  for(i=0;i<n;i++)
839  {
840  im->yplot1[i] = ds->ydata[i];
841  }
842 
843  im->narray = 1;
844  im->nsize = n * sizeof(float);
845 
846  sendImageStruct(im, env->mode);
847  }
848 
849  validate(PS);
850 
851  return(ret);
852 }
853 
854 
856 {
857  int i, n, ret=0, dir = 0;
858  char dbuf[1024], dirStr[256];
859  struct LP_IMAGE_INFO *im;
860  struct DS_IMAGE_INFO *ds;
861  extern struct DS_IMAGE_INFO ds_image_info;
862 
863  im = &H0;
864  ds = &ds_image_info;
865 
866  if(args->ntokens < 2)
867  {
868  st_print("Missing number arg\n");
869 
871 
872  return(1);
873  }
874 
875  if(isSet(PF_R_FLAG))
876  {
877  strcpy(dirStr, "row");
878  dir = 1;
879  }
880  else
881  if(isSet(PF_C_FLAG))
882  {
883  strcpy(dirStr, "col");
884  dir = 2;
885  }
886  else
887  {
888  st_print("Missing direction flag\n");
889 
891 
892  return(1);
893  }
894 
895  sprintf(dbuf, "otfslice %s %d", dirStr, atoi(args->secondArg));
896 
897  to_dataserv(dbuf);
898 
899  subArgs(2, "5");
900  args->ntokens = 2;
901 
902  ret = helperBinaryWait();
903 
904  st_report("helperBinaryWait() returned %d", ret);
905 
906  if(!ret)
907  {
908  if(ds->noint == 0)
909  {
910  st_report("Dataserv Image Empty");
911  return(1);
912  }
913 
914  doCV(); /* Set the plot axis */
915 
916  subArgs(2, "H0"); /* Clear out the H0 image */
917  args->ntokens = 2;
918  zeroImage();
919 
920  copyEnv2Image(im); /* Copy in most items */
921 
922  im->ainfo.scanct = ds->scanct;
923  im->ainfo.bscan = ds->bscan;
924  im->ainfo.escan = ds->escan;
925 
926  im->binfo.a = ds->a;
927  im->binfo.b = ds->b;
928  im->binfo.rms = ds->rms;
929 
930  bcopy((char *)&ds->head, (char *)&im->head, sizeof(struct HEADER));
931 
932  strncpy(im->head.object, ds->source, 16);
933  im->head.object[15] = '\0';
934  strncpy(im->head.coordcd, ds->coordcd, 8);
935  im->head.coordcd[7] = '\0';
936 
937  im->head.noint = (double)ds->noint;
938  im->head.datalen = im->head.noint * sizeof(float);
939  im->head.stsys = ds->tsys;
940 
941  n = ds->noint;
942 
943  for(i=0;i<n;i++)
944  {
945  im->yplot1[i] = ds->ydata[i];
946  }
947 
948  im->narray = 1;
949  im->nsize = n * sizeof(float);
950 
951  im->xaxisotfoff = dir;
952 
953  computeXaxis(im, 1);
954 
955  sendImageStruct(im, env->mode);
956 
958  }
959 
960  validate(PS);
961 
962  return(ret);
963 }
964 
965 
967 {
968  int i, n, ret=0;
969  char tbuf[256], dbuf[1024];
970  struct LP_IMAGE_INFO *im;
971  struct DS_IMAGE_INFO *ds;
972  extern struct DS_IMAGE_INFO ds_image_info;
973 
974  im = &H0;
975  ds = &ds_image_info;
976 
977  reassembleArgs(tbuf);
978 
979  if(strlen(tbuf) > 1)
980  {
981  sprintf(dbuf, "otfsendplot %s", tbuf);
982  }
983  else
984  {
985  strcpy(dbuf, "otfsendplot");
986  }
987 
988  to_dataserv(dbuf);
989 
990  subArgs(2, "5");
991  args->ntokens = 2;
992 
993  ret = helperBinaryWait();
994 
995  st_report("helperBinaryWait() returned %d", ret);
996 
997  if(!ret)
998  {
999  if(ds->noint == 0)
1000  {
1001  st_report("Dataserv Image Empty");
1002  return(1);
1003  }
1004 
1005  subArgs(2, "H0"); /* Clear out the H0 image */
1006  args->ntokens = 2;
1007  zeroImage();
1008 
1009  copyEnv2Image(im); /* Copy in most items */
1010 
1011  im->ainfo.scanct = ds->scanct;
1012  im->ainfo.bscan = ds->bscan;
1013  im->ainfo.escan = ds->escan;
1014 
1015  im->binfo.a = ds->a;
1016  im->binfo.b = ds->b;
1017  im->binfo.rms = ds->rms;
1018 
1019  bcopy((char *)&ds->head, (char *)&im->head, sizeof(struct HEADER));
1020 
1021  strncpy(im->head.object, ds->source, 16);
1022  im->head.object[15] = '\0';
1023  strncpy(im->head.coordcd, ds->coordcd, 8);
1024  im->head.coordcd[7] = '\0';
1025 
1026  im->head.noint = (double)ds->noint;
1027  im->head.datalen = im->head.noint * sizeof(float);
1028  im->head.stsys = ds->tsys;
1029 
1030  n = ds->noint;
1031 
1032  for(i=0;i<n;i++)
1033  {
1034  im->yplot1[i] = ds->ydata[i];
1035  }
1036 
1037  im->narray = 1;
1038  im->nsize = n * sizeof(float);
1039 
1040  sendImageStruct(im, env->mode);
1041  }
1042 
1043  validate(PS);
1044 
1045  return(ret);
1046 }
1047 
1048 
1049 
1050 int setImage(i)
1051 int i;
1052 {
1053  switch(i)
1054  {
1055  case 0: _h0(); break;
1056  case 1: _h1(); break;
1057  case 2: _h2(); break;
1058  case 3: _h3(); break;
1059  case 4: _h4(); break;
1060  case 5: _h5(); break;
1061  case 6: _h6(); break;
1062  case 7: _h7(); break;
1063  case 8: _h8(); break;
1064  case 9: _h9(); break;
1065 
1066  default: st_fail("Unknown H value %d", i); return(1); break;
1067  }
1068 
1069  return(0);
1070 }
1071 
1072 
1074 {
1075  int i, j, noint, ret, old, snum, navg, numSpec;
1076  float *w, *o, *s, *g;
1077  double gscan, oscan, scan;
1078  extern float *otfData;
1079 
1080  old = atoi(h0->name+1);
1081 
1082  if(args->ntokens > 1)
1083  {
1084  scan = atof(args->secondArg);
1085  }
1086  else
1087  {
1089 
1090  return(0);
1091  }
1092 
1093  /* Read OTF into H7 */
1094  _h7();
1095 
1096  ret = read_scan(scan, env->filename, h0->yplot1, &h0->head, 0);
1097 
1098  if(ret == -1)
1099  {
1100  st_fail("OTF scan: %.2f found in %s", scan, env->filename);
1101 
1102  setImage(old); /* Point back to the original image */
1103 
1104  return(0);
1105  }
1106 
1107  if(strncmp(h0->head.obsmode, "LINEOTF", 7))
1108  {
1109  st_fail("Scan: %.2f, Not OTF; it's %8.8s", scan, h0->head.obsmode);
1110 
1111  return(0);
1112  }
1113 
1114  gscan = h0->head.gains;
1115  oscan = h0->head.offscan;
1116  noint = (int)h0->head.noint;
1117  numSpec = (int)h0->head.datalen / (sizeof(float) * (noint+5));
1118 
1119  st_report("OTF Scan: %.2f has %d channels & %d Spectra", h0->head.scan, noint, numSpec);
1120 
1121  /* Read gains into H8 */
1122  _h8();
1123 
1124  ret = read_scan(gscan, env->gfilename, h0->yplot1, &h0->head, 0);
1125 
1126  if(ret == -1)
1127  {
1128  st_fail("Gain scan: %.2f found in %s", gscan, env->gfilename);
1129 
1130  setImage(old); /* Point back to the original image */
1131 
1132  return(0);
1133  }
1134 
1135  /* read Offscan into H9 */
1136  _h9();
1137 
1138  ret = read_scan(oscan, env->filename, h0->yplot1, &h0->head, 0);
1139 
1140  if(ret == -1)
1141  {
1142  st_fail("Off scan: %.2f found in %s", oscan, env->gfilename);
1143 
1144  setImage(old); /* Point back to the original image */
1145 
1146  return(0);
1147  }
1148 
1149  /* Check for requested spectra */
1150  if(args->ntokens > 2)
1151  {
1152  snum = atoi(args->thirdArg);
1153 
1154  if(snum < 0 || snum >= numSpec)
1155  {
1156  st_fail("Requected spectra: %d, < 0 or > %d", snum, numSpec);
1157  setImage(old);
1158 
1159  return(1);
1160  }
1161  }
1162  else /* Else just show first one */
1163  {
1164  snum = 0;
1165  }
1166 
1167  /* Check for requested average */
1168  if(args->ntokens > 3)
1169  {
1170  navg = atoi(args->fourthArg);
1171 
1172  if(navg < 1 || (snum+navg) >= numSpec)
1173  {
1174  st_fail("Requected average or start+average, %d, < 1 or > %d", snum+navg, numSpec);
1175  setImage(old);
1176 
1177  return(1);
1178  }
1179 
1180  st_report("Averaging %d samples", navg);
1181  }
1182  else /* Else no averaging */
1183  {
1184  navg = 1;
1185  }
1186 
1187  /* Do our work in H0 */
1188  _h0();
1189 
1190  hzero(h0);
1191 
1192  _copyImage(&H7, h0); /* Copy header back to H0 */
1193 
1194  /* Doctor up the header */
1195  h0->head.datalen = h0->head.noint * sizeof(float);
1196  h0->head.inttime = h0->head.samprat * (double)navg;
1197 
1198  /* We need to correct the RA & Dec here */
1199 
1200  for(j=0;j<navg;j++)
1201  {
1202  o = &H9.yplot1[0]; /* Off Scan */
1203  g = &H8.yplot1[0]; /* Gains */
1204  w = &h0->yplot1[0]; /* Destination */
1205 
1206  /* set the ON pointer to the start of the requested data */
1207  s = &otfData[(snum+j)*noint]; /* Raw OTF data */
1208 
1209  /* ( Sig - Ref )
1210  --------- * Gains
1211  Ref
1212  */
1213 
1214  for(i=0;i<noint;i++, w++, s++, o++, g++)
1215  {
1216  *w += ( *s - *o) / *o * *g;
1217  }
1218  }
1219 
1220  /* Scale it back by navg */
1221  w = &h0->yplot1[0]; /* Destination */
1222  for(i=0;i<noint;i++, w++)
1223  {
1224  *w /= (float)navg;
1225  }
1226 
1227  showScan();
1228 
1229  /* Change my mind; must stay in H0 otherwise
1230  any further analysis on the data isn't possible
1231  if the user dosn't do a h0 */
1232 // setImage(old); /* where ever that may have been */
1233 
1234  return(0);
1235 }
1236 
1237 
1238 int doOTF()
1239 {
1240  int old_preview = 0, record = 0, interp = 0, norepaint = 0;
1241  char sysBuf[256], tbuf[256];
1242 
1243  if(isSet(PF_S_FLAG)) /* Start dataserv */
1244  {
1245  if(doingOTF)
1246  {
1247  st_fail("OTF Session Already Running");
1248 
1249  return(1);
1250  }
1251 
1252  st_report("Starting Dataserv OTF Process");
1253 
1254  sprintf(sysBuf, "dataserv -sock &");
1255  system(sysBuf);
1256 
1257  doingOTF = 1;
1258 
1259  return(0);
1260  }
1261 
1262  /* None of the following commands can be used unless
1263  * the gridder is running */
1264  if(!doingOTF)
1265  {
1266  st_fail("OTF Gridder Not Running; type 'otf /s' to start");
1267 
1268  printH_FlagHelp("otf");
1269 
1270  return(0);
1271  }
1272 
1273  if(isSet(PF_B_FLAG)) /* Send Baseline info to dataserv */
1274  {
1275  sendBaselines();
1276 
1277  return(0);
1278  }
1279 
1280  if(isSet(PF_C_FLAG)) /* Send Command */
1281  {
1282  doOTFcmd();
1283 
1284  return(0);
1285  }
1286 
1287  if(isSet(PF_D_FLAG)) /* Display a spectral plot from OTF scan */
1288  {
1289  doOTFdisplay();
1290 
1291  return(0);
1292  }
1293 
1294  if(isSet(PF_O_FLAG)) /* Orthganol <sp> */
1295  {
1296  doOTF3Dplot();
1297 
1298  return(0);
1299  }
1300 
1301  if(isSet(PF_V_FLAG)) /* (V)elocity Movie */
1302  {
1303  record = isSet(PF_R_FLAG);
1304  interp = isSet(PF_I_FLAG);
1305 
1306  otfMovie(record, interp);
1307 
1308  return(0);
1309  }
1310 
1311  if(isSet(PF_R_FLAG)) /* Regular */
1312  {
1313  to_dataserv("otfregular");
1314 
1315  return(0);
1316  }
1317 
1318  if(isSet(PF_T_FLAG))
1319  {
1320  if(isSet(PF_T_FLAG) == 4)
1321  {
1322  to_dataserv("otfregular");
1323  to_dataserv("otfinterp");
1324  }
1325  else
1326  if(isSet(PF_T_FLAG) == 3)
1327  {
1328  to_dataserv("otftime");
1329  }
1330  else
1331  if(isSet(PF_T_FLAG) == 2)
1332  {
1333  to_dataserv("otfrms");
1334  }
1335  else
1336  {
1337  to_dataserv("otftsys");
1338  }
1339 
1340  return(0);
1341  }
1342 
1343  if(isSet(PF_I_FLAG)) /* Init */
1344  {
1345  if(isSet(PF_Y_FLAG)) /* Force */
1346  {
1347  otfInit(1);
1348  }
1349  else
1350  {
1351  if(getYesNoQuit("Initialize OTF Gridder: y/N ?"))
1352  {
1353  otfInit(1);
1354  }
1355  }
1356 
1357 
1358  return(0);
1359  }
1360 
1361  if(isSet(PF_F_FLAG)) /* Load datafile */
1362  {
1363  if(isSet(PF_F_FLAG) == 2) /* we want 'fast' load choice */
1364  {
1365  norepaint = 1;
1366  }
1367 
1368  if(isSet(PF_A_FLAG))
1369  {
1370  autoSetEBscan();
1371  }
1372 
1373  if(env->bscan == 0 || env->escan == 50000)
1374  {
1375  st_fail("Scan range %.2f %.2f kind of silly", env->bscan, env->escan);
1376 
1377  if(isSet(PF_P_FLAG))
1378  {
1379  sprintf(tbuf, "otfloadchoice %s", loadChoiceStrings[old_preview]);
1380  to_dataserv(tbuf);
1381  }
1382  else
1383  if(isSet(PF_F_FLAG) == 2)
1384  {
1385  sprintf(tbuf, "otfloadchoice %s", loadChoiceStrings[old_preview]);
1386  to_dataserv(tbuf);
1387  }
1388 
1389  return(0);
1390  }
1391 
1392  otfLoad(norepaint);
1393 
1394  if(isSet(PF_L_FLAG))
1395  {
1396  to_dataserv("otflockgrid 1");
1397  }
1398 
1399  if(isSet(PF_A_FLAG)) /* Put these back */
1400  {
1401  env->bscan = 0;
1402  env->escan = 50000;
1403  }
1404 
1405  return(0);
1406  }
1407 
1408  if(isSet(PF_P_FLAG)) /* Push the parameters to dataserv */
1409  {
1410  return(sendParams());
1411  }
1412 
1413  if(isSet(PF_M_FLAG)) /* (M)osaic */
1414  {
1415  otfChanMap();
1416 
1417  return(0);
1418  }
1419 
1420  if(isSet(PF_3_FLAG)) /* Write 2D data cube to file */
1421  {
1422  doOTF3Dcube();
1423 
1424  return(0);
1425  }
1426 
1427  /* Make this last because /a is used in other functions above */
1428  if(isSet(PF_A_FLAG)) /* Auto Configure internals */
1429  {
1430  configFromHeader();
1431  autoSetEBscan();
1432 
1433  return(0);
1434  }
1435 
1436  if(isSet(PF_L_FLAG)) /* List OTF internals */
1437  {
1438  otfParamList();
1439 
1440  return(0);
1441  }
1442 
1443  if(isSet(PF_G_FLAG) == 1) /* Grab the dataserv spec plot and display in LinuxPops */
1444  {
1446 
1447  return(0);
1448  }
1449 
1450  if(isSet(PF_G_FLAG) == 2) /* Grab the dataserv spec plot and display in LinuxPops */
1451  {
1453 
1454  return(0);
1455  }
1456 
1457  if(isSet(PF_W_FLAG)) /* Whoa! Stop a movie */
1458  {
1459  to_dataserv("done");
1460 
1461  return(0);
1462  }
1463 
1464  if(isSet(PF_E_FLAG)) /* End flag */
1465  {
1466  if(isSet(PF_Y_FLAG)) /* Force */
1467  {
1468  to_dataserv("quit");
1469 
1470  doingOTF = 0;
1471  dataserv = 0;
1472  }
1473  else
1474  {
1475  if(getYesNoQuit("Exit OTF Gridder: y/N ?"))
1476  {
1477  to_dataserv("quit");
1478 
1479  doingOTF = 0;
1480  dataserv = 0;
1481  }
1482  }
1483 
1484  return(0);
1485  }
1486 
1487  /* Nothing, just print out help */
1488  printH_FlagHelp("otf");
1489 
1490  return(0);
1491 }
1492 
1493 
1495 {
1496  char tbuf[256], *interp;
1497 
1498 
1499  if(isSet(PF_I_FLAG))
1500  {
1501  interp = "interp";
1502  }
1503  else
1504  {
1505  interp = " ";
1506  }
1507 
1508  sprintf(tbuf, "otffixbadcells %s", interp);
1509 
1510  to_dataserv(tbuf);
1511 
1512  return(0);
1513 }
1514 
1515 
1517 {
1518  double dish;
1519  double nyquist;
1520 
1521  if(env->freq != 0.0)
1522  {
1523  if(env->issmt)
1524  {
1525  dish = 10.0;
1526  }
1527  else
1528  {
1529  dish = 12.0;
1530  }
1531 
1532  if(env->dish_size)
1533  {
1534  dish = env->dish_size;
1535  st_report("fwhm(): Using Non Standard Dish Size: %.2f M", dish);
1536  }
1537  else
1538  {
1539  st_report("fwhm(): Using Dish Size: %.2f M", dish);
1540  }
1541 
1542  nyquist = (2.997925e8 / (2.0 * dish * (env->freq * 1e3))) * 0.2062648;
1543 
1544  st_report("Nyquist: %f", nyquist);
1545 
1546  env->nyquist = nyquist;
1547  }
1548  else
1549  {
1550  st_fail("Env: Frequency not set");
1551  }
1552 
1553  return(0);
1554 }
struct SOCK * dataserv
Definition: linuxpops.c:75
double otf_nyquistra
Definition: env.h:234
float yplot1[MAX_CHANS]
Definition: image.h:110
struct LP_IMAGE_INFO * h0
Definition: image.c:74
struct HEADER head
Definition: ds_image_info.h:37
int getFeed()
double scan
Definition: header.h:35
int hzero(struct LP_IMAGE_INFO *image)
Definition: image.c:616
struct LP_IMAGE_INFO H7
Definition: image.c:70
char * strcmprs(char *str)
int _copyImage(struct LP_IMAGE_INFO *i1, struct LP_IMAGE_INFO *i2)
Definition: image.c:329
int otfChanMap()
Definition: otf.c:606
int first
Definition: dbase.c:106
int _h0()
Definition: image.c:93
struct PARSE_STACK * args
Definition: parse.h:196
int interp(double *array, int nx, int ny, double *parray, int npx, int npy)
Definition: interp.c:102
int otf_single_bin
Definition: env.h:108
double noint
Definition: header.h:211
double datalen
Definition: header.h:34
char * loadChoiceStrings[]
Definition: otf.c:66
int _h4()
Definition: image.c:137
Definition: parse.h:8
double otf_3d_urms
Definition: env.h:245
float * otfData
Definition: sdd.c:53
double nyquist
Definition: env.h:310
struct LP_IMAGE_INFO H0
Definition: image.c:63
int scan
double noxpts
Definition: header.h:106
int sendFilenames()
Definition: otf.c:259
struct BASELINE_INFO binfo
Definition: image.h:101
double samprat
Definition: header.h:68
int otf_chan_map_cent
Definition: env.h:113
int otf_map_ycell
Definition: env.h:92
double otf_map_ysize
Definition: env.h:239
int nsize
Definition: image.h:80
float escan
Definition: image.h:53
int otf_chan_map_cols
Definition: env.h:114
int otf_noint
Definition: env.h:120
int read_scan()
int helperBinaryWait()
Definition: linuxpops.c:3020
char name[32]
Definition: image.h:73
int doOTFFix()
Definition: otf.c:1494
struct DS_IMAGE_INFO ds_image_info
Definition: linuxpops.c:64
double offscan
Definition: header.h:115
Definition: header.h:13
int printH_FlagHelp(char *cmd)
Definition: help.c:430
double xsource
Definition: header.h:74
double ysource
Definition: header.h:75
char coordcd[8]
Definition: header.h:87
char gfilename[256]
Definition: env.h:10
int _h9()
Definition: image.c:192
int doCV()
Definition: paxis.c:359
double dish_size
Definition: env.h:299
struct LP_IMAGE_INFO H9
Definition: image.c:72
int otf_ignore_repaint
Definition: env.h:110
int sendParams()
Definition: otf.c:306
int otf_load_choice
Definition: env.h:107
int _h5()
Definition: image.c:148
struct HEADER * sa
Definition: linuxpops.c:72
int _h3()
Definition: image.c:126
int doOTF3Dcube()
Definition: otf.c:633
int issmt
Definition: env.h:63
float bscan
Definition: image.h:52
int doOTF()
Definition: otf.c:1238
int otf_3d_bchan
Definition: env.h:95
double otf_gamma
Definition: env.h:241
double otf_map_freqres
Definition: env.h:248
#define LAST_PLOT_OTF_CUT
Definition: defines.h:168
int _h8()
Definition: image.c:181
char tok[MAX_TOKENS][MAX_TOKENS]
Definition: parse.h:176
double gains
Definition: header.h:145
double otf_map_velocity
Definition: env.h:246
int otfLoad(int norepaint)
Definition: otf.c:523
int _h2()
Definition: image.c:115
int otf_eint_chan
Definition: env.h:94
int otf_single_spec
Definition: env.h:105
int doOTFdisplay()
Definition: otf.c:1073
int notSet(int flag)
Definition: parse.c:669
int zeroImage()
Definition: image.c:880
float rms
Definition: image.h:13
int getYesNoQuit()
struct ENVIRONMENT * env
Definition: linuxpops.c:71
int otfParamList()
Definition: otf.c:511
char * thirdArg
Definition: parse.h:182
char source[64]
Definition: env.h:11
double otf_beam_dec
Definition: env.h:252
int otf_chan_map_rows
Definition: env.h:115
int otfMovie(int rec, int interp)
Definition: otf.c:543
int copyEnv2Image(struct LP_IMAGE_INFO *image)
Definition: image.c:784
int isSet(int flag)
Definition: parse.c:646
int otf_cols
Definition: env.h:89
struct HEADER head
Definition: image.h:104
int otf_rows
Definition: env.h:90
int sock_send(struct SOCK *s, char *message)
double otf_grid_scale
Definition: env.h:240
int doNyquist()
Definition: otf.c:1516
int otf_cutoff
Definition: env.h:101
int otf_3d_interp
Definition: env.h:97
int otfGrabSpectralSum()
Definition: otf.c:773
int otf_ephem_obj
Definition: env.h:104
int otfGrabSpectralPlot()
Definition: otf.c:966
void st_warn()
#define PS
Definition: observing_par.h:27
char obsmode[8]
Definition: header.h:41
int sendBaselines()
Definition: otf.c:276
int reassembleArgs(char *buf)
Definition: otf.c:739
int configFromHeader()
Definition: otf.c:139
int otf_3d_echan
Definition: env.h:96
int otfInit(int init)
Definition: otf.c:423
void st_fail()
double otf_zrange_factor
Definition: env.h:249
int doOTFcmd()
Definition: otf.c:761
double velocity
Definition: header.h:118
struct ACCUM_INFO ainfo
Definition: image.h:100
double otf_map_xsize
Definition: env.h:238
int otf_baselines
Definition: env.h:102
double otf_nyquistdec
Definition: env.h:235
int otf_color
Definition: env.h:103
int otf_if_choice
Definition: env.h:106
double stsys
Definition: header.h:203
int setImage(int i)
Definition: otf.c:1050
char session[80]
Definition: strings.c:67
char source[16]
Definition: ds_image_info.h:3
double otf_beam_ra
Definition: env.h:251
int mode
Definition: env.h:75
char * otfColorChoice[]
Definition: otf.c:71
double otf_delay
Definition: env.h:243
double otf_map_ra
Definition: env.h:236
void st_report()
int otf_show_beam_size
Definition: env.h:111
int last_plot
Definition: env.c:93
int doOTF3Dplot()
Definition: otf.c:664
Definition: parse.h:9
int otf_chan_map_avg
Definition: env.h:116
int showScan()
Definition: observe.c:1205
int computeXaxis(struct LP_IMAGE_INFO *image, int logit)
Definition: xaxis.c:70
double otf_3d_vrange
Definition: env.h:244
int numofscans
Definition: env.h:85
char * fourthArg
Definition: parse.h:183
int otf_bint_chan
Definition: env.h:93
int otf_map_xcell
Definition: env.h:91
double otf_size_factor
Definition: env.h:242
double otf_map_dec
Definition: env.h:237
double bscan
Definition: env.h:173
int doOTFSlice()
Definition: otf.c:855
float a
Definition: image.h:11
int _h6()
Definition: image.c:159
double freq
Definition: env.h:197
int doOTFHelp()
Definition: otf.c:127
void subArgs(int wt, const char *fmt,...)
Definition: parse.c:430
double inttime
Definition: header.h:210
int scanct
Definition: image.h:51
struct SOCK * sock_connect(char *mbname)
int narray
Definition: image.h:79
double otf_map_restfreq
Definition: env.h:247
double deltaxr
Definition: header.h:103
double deltayr
Definition: header.h:104
int validate(int which)
Definition: linuxpops.c:164
int sendImageStruct(struct LP_IMAGE_INFO *image, int mode)
Definition: image.c:820
char * secondArg
Definition: parse.h:181
void st_print()
int baselines[MAX_BASELINES][2]
Definition: env.h:30
int ntokens
Definition: parse.h:173
double escan
Definition: env.h:186
int autoSetEBscan()
Definition: otf.c:701
float b
Definition: image.h:12
int otf_movie_bchan
Definition: env.h:98
char object[16]
Definition: header.h:40
char * firstArg
Definition: parse.h:180
double noypts
Definition: header.h:107
double restfreq
Definition: header.h:198
int parseCmd(char *buf)
Definition: parse.c:2090
double freqres
Definition: header.h:199
int _h7()
Definition: image.c:170
int otf_movie_nchan
Definition: env.h:100
int _h1()
Definition: image.c:104
char filename[256]
Definition: env.h:9
int doingOTF
Definition: otf.c:64
struct LP_IMAGE_INFO H8
Definition: image.c:71
float ydata[MAX_DATA_CHANNELS]
Definition: ds_image_info.h:39
int to_dataserv(char *buf)
Definition: otf.c:82
char coordcd[8]
Definition: ds_image_info.h:4
int otf_ignore_color
Definition: env.h:109
int otf_movie_echan
Definition: env.h:99