Linuxpops  3.01.04
Spectral Anaysis Package for Single Dish Data
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
beam.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_BKNDS 128
62 #define H 6.626e-34 /* Planck's constant */
63 #define K 1.381e-23 /* Boltzmann's constant */
64 #define C 0.299792458 /* speed of light (m/ns) */
65 #define LN2 0.693147181 /* ln(2.0) */
66 #define CMB 2.725 /* Cosmic Microwave Bkgd */
67 #define R0 1.524 /* Mars mean heliocentric distance */
68 #define T_R0 206.8 /* Mars temp at R0 */
69 #define P 29.530589 /* Period of Moon */
70 
71 
72 struct RESULTS {
73  double avg;
74  double rms;
75  double eta_mb;
76  double err;
77  double rej;
78  struct HEADER head;
79 };
80 
83 double tmpBeamEff[4];
84 
85 char *months[12] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun",
86  "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
87 
88 char *planet_names[MAX_PLANETS] = {"Mercury", "Venus", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune", "Moon"};
89 
90 double parseBeamEff(buf)
91 char *buf;
92 {
93  double val;
94 
95  val = atof(buf);
96 
97  if(val < 0.01)
98  {
99  st_warn("Beam Eff %f out of range: 0.0 - 1.0, or 1.0 - 100.0", val);
100  return(1.0);
101  }
102 
103  if(val> 1.0)
104  {
105  val /= 100.0;
106  }
107 
108  if(val < 0.01 || val > 1.00)
109  {
110  return(1.0);
111  }
112 
113  return(val);
114 }
115 
116 
118 {
119  int i;
120 
121  if(strlen(args->secondArg))
122  {
123  if(strncmp(args->secondArg, "-", 1))
124  {
126  }
127  }
128  else
129  {
130  st_print("\nCurrent Beam Eff Values: ");
131 
132  for(i=0;i<4;i++)
133  {
134  st_print("%.2f ", env->bm_eff[i]);
135  }
136 
137  st_warn("");
138 
139  return(1);
140  }
141 
142  if(strlen(args->thirdArg))
143  {
144  if(strncmp(args->thirdArg, "-", 1))
145  {
147  }
148  }
149 
150  if(strlen(args->fourthArg))
151  {
152  if(strncmp(args->fourthArg, "-", 1))
153  {
155  }
156  }
157 
158  if(strlen(args->fifthArg))
159  {
160  if(strncmp(args->fifthArg, "-", 1))
161  {
163  }
164  }
165 
166  return(0);
167 }
168 
169 
171 {
172  int i;
173 
174  if(strlen(args->secondArg))
175  {
176  if(strncmp(args->secondArg, "-", 1))
177  {
178  env->rejections[0] = atoi(args->secondArg);
179  }
180  }
181  else
182  {
183  st_print("Current Rejection Values: ");
184 
185  for(i=0;i<MAX_BEAMS;i++)
186  {
187  st_print("%.2f ", env->rejections[i]);
188  }
189 
190  st_print("\n");
191 
192  return(1);
193  }
194 
195  if(strlen(args->thirdArg))
196  {
197  if(strncmp(args->thirdArg, "-", 1))
198  {
199  env->rejections[1] = atoi(args->thirdArg);
200  }
201  }
202 
203  if(strlen(args->fourthArg))
204  {
205  if(strncmp(args->fourthArg, "-", 1))
206  {
207  env->rejections[2] = atoi(args->fourthArg);
208  }
209  }
210 
211  if(strlen(args->fifthArg))
212  {
213  if(strncmp(args->fifthArg, "-", 1))
214  {
215  env->rejections[3] = atoi(args->fifthArg);
216  }
217  }
218 
219  return(0);
220 }
221 
222 
224 {
225  int i, tot=0;
226 
227  for(i=0;i<4;i++)
228  {
229  if(tmpBeamEff[i] > 0.0)
230  {
231  st_print("Accepting Beam Eff Value %.1f%% for Chan #%d\n", tmpBeamEff[i], i+1);
232  env->bm_eff[i] = tmpBeamEff[i] / 100.0;
233  tot++;
234  }
235  }
236 
237  if(!tot)
238  {
239  st_warn("No Saved Beam Eff Values to Accept");
240  }
241 
242  return(0);
243 }
244 
245 
246 struct tm *breakTime(burnT)
247 double burnT;
248 {
249  static struct tm *tmn1;
250  long sec;
251 
252  sec = (long)burnT + 7 * 3600;
253  tmn1 = localtime(&sec);
254 
255  return(tmn1);
256 }
257 
258 
260 double scan;
261 {
262  int indx = -1;
263  double fscan;
264 
265  fscan = scan - (int)scan;
266 
267  fscan *= 100.0;
268 
269  if(fabs(fscan-1.0) < 0.001)
270  {
271  indx = 0;
272  }
273  else
274  if(fabs(fscan-2.0) < 0.001)
275  {
276  indx = 1;
277  }
278  else
279  if(fabs(fscan-3.0) < 0.001)
280  {
281  indx = 2;
282  }
283  else
284  if(fabs(fscan-4.0) < 0.001)
285  {
286  indx = 3;
287  }
288 
289  return(indx);
290 }
291 
293 int first;
294 {
295  int planet;
296  double f_sky, rej, T_ant, ta_s, Tmb;
297  double T_src, f_rej, theta_p, R_mars, incl;
298  double lambda, eta_mb, eta_hi, eta_lo, theta_mb;
299  double T0, chi, xi, ts_s, denom, err, diameter;
300  STATE state, *st;
301  EPH eph;
302 
303  eph = global.eph;
304  state = global.state;
305  st = &global.state;
306  planet = state.planet; /* Planet indx */
307  f_sky = state.f_sky; /* Observed freq in GHz */
308  rej = state.rej; /* Sideband rejection in dB */
309  T_ant = state.T_ant; /* AVG temp of observations */
310  ta_s = state.ta_s; /* RMS temp of observation */
311 
312  /* compute T_src and set theta_p depending on planet */
313  switch (planet)
314  {
315  case JUPITER:
316 
317  /* from Shirley: best linear fit to Mangum Table 1 */
318  /* with additional data points from WMAP & MASM1 */
319  T_src = 178.309 - 0.036 * f_sky;
320  ts_s = 10.0;
321  theta_p = eph.JupDiam;
322  break;
323 
324  case VENUS:
325 
326  /* from Shirley: logistic fit to brightness temperature data */
327  T_src = 266.4 + (245.1 / (1.0 + (f_sky*f_sky / (64.7*64.7))));
328  ts_s = 10.0;
329  theta_p = eph.VenDiam;
330  break;
331 
332  case MARS:
333 
334  /* from Ulich (1981) as discussed by Mangum */
335  R_mars = eph.MarDist;
336  T_src = T_R0 * sqrt(R0 / R_mars);
337  ts_s = 6.0;
338  theta_p = eph.MarDiam;
339  break;
340 
341  case SATURN:
342 
343  /* from Shirley: interpolated planetary flux densities */
344  /* (Table 6.2 posted in 12-meter control room */
345  incl = eph.SatIncl;
346  T_src = (f_sky - 90.0) * (149.0 - 140.0) / (90.0 - 227.0);
347  T_src += 149.0;
348  ts_s = 10.0;
349  theta_p = eph.SatDiam;
350  break;
351 
352  case MOON:
353 
354  /* from Krotikov and Troitskii (1964) and Linsky (1966,1973) */
355  /* as discussed by Mangum */
356 
357  st_print("*** CAUTION: Moon option for test purposes only! ***\n");
358 
359  lambda = 1000.0 * C / f_sky;
360 
361  chi = (eph.MoonAge / P) * 360.0 - 180.0;
362  chi *= PI / 180.0;
363 
364  xi = atan(0.24 * lambda / (1.0 + 0.24 * lambda));
365  xi *= PI / 180.0;
366 
367  /* from Begam: linear fit to Table 2 data */
368 
369  T0 = 220.02682849 - 0.000348260 * f_sky;
370 
371  /* Mangum eqn (2) */
372 
373  T_src = T0 + 0.77 * T0 / sqrt(1.0 + 0.48*lambda + 0.11*lambda*lambda);
374  T_src *= cos(chi - xi);
375 
376  /* token value for ts_s -- not actually determined! */
377 
378  ts_s = 20.0;
379  break;
380 
381  default:
382 
383  st_fail("invalid planet selection");
384  return(0);
385  }
386 
387 
388  /* telescope main-beam FWHM -- assumes 10 dB edge taper */
389 
390  lambda = C / f_sky;
391 
392  if(!strncmp(h0->head.telescop, "ARO-HHT", 7))
393  {
394  diameter = MG_DIAMETER;
395  }
396  else
397  {
398  diameter = KP_DIAMETER;
399  }
400 
401  if(first)
402  {
403  st_report("Using a Telescope Diameter of %.1f Meters", diameter);
404  }
405 
406  theta_mb = 1.17 * (lambda / diameter) * (180.0 / PI) * 3600.0;
407 
408  /* "rejection factor" per Schlingman et al 2011,ApJS,195,14 */
409  /* replaces factor of 1/2 (for dual SB) in Mangum eqn (1) */
410 
411  f_rej = 1.0 / (1.0 + pow(10.0, (-rej/10.0)));
412 
413  /* Scale at the 12-meter is actually T*_R. Multiply this */
414  /* by Eta_fss to convert back to T*_A */
415  /* */
416  /* T_ant *= 0.68; */
417  /* */
418  /* No longer the case as of 2014 */
419  /* */
420 
421  /* main-beam efficiency from Mangum eqn (1) */
422 
423  eta_mb = f_rej * T_ant / (planck(f_sky, T_src) - planck(f_sky, CMB));
424  eta_hi = f_rej * (T_ant + ta_s) / (planck(f_sky, T_src - ts_s) - planck(f_sky, CMB));
425  eta_lo = f_rej * (T_ant - ta_s) / (planck(f_sky, T_src + ts_s) - planck(f_sky, CMB));
426 
427  /* convolve with source disk except in the case of the Moon */
428 
429  denom = (1.0 - exp((-LN2 * theta_p * theta_p) / (theta_mb * theta_mb)));
430 
431  Tmb = T_src * denom;
432 
433  if(planet != MOON)
434  {
435  eta_mb /= denom;
436  eta_hi /= denom;
437  eta_lo /= denom;
438  }
439 
440  st->eta_mb = eta_mb;
441 
442  /* compute the uncertainty */
443 
444  err = (eta_hi - eta_lo) / 2.0;
445  st->err = err;
446 
447  /* outputs */
448 
449  if(first)
450  {
451  st_report("Brightness Temperature for %s = %6.2lf K", planet_names[planet], T_src);
452  }
453 
454  if(planet == MOON)
455  {
456  st_report("Days Since New Moon = %6.2lf", eph.MoonAge);
457  }
458  else
459  {
460  if(first)
461  {
462  st_report("Projected Diameter for %s = %6.2lf arcsecs", planet_names[planet], theta_p);
463  }
464  }
465 
466  if(planet == MARS)
467  {
468  if(first)
469  {
470  st_report("Heliocentric Distance for Mars = %5.3lf a.u.", R_mars);
471  }
472  }
473 
474  if(planet == SATURN)
475  {
476  if(first)
477  {
478  st_report("Inclination of Rings = %4.1lf degs", incl);
479  }
480  }
481 
482  if(first)
483  {
484  st_report("Telescope Main-Beam Temp = %4.1lf K", Tmb);
485  st_report("Telescope Main-Beam FWHM = %4.1lf arcsecs", theta_mb);
486  }
487 
488  st_report("Rejection Factor = %7.5lf", f_rej);
489 
490  st_report("Main-Beam Efficiency = %5.2lf +/- %.2lf%%",
491  (st->eta_mb * 100.0), (st->err * 100.0));
492 
493  return(0);
494 }
495 
496 
497 /* Planck Function */
498 
499 double planck(double freq, double T_bright)
500 {
501  double p;
502 
503  p = (H * freq / K) / (exp((H * freq) / (K * T_bright)) - 1.0);
504 
505 // printf("Planck(): %f, %f, %f\n", freq, T_bright, p);
506  return p;
507 }
508 
509 
510 
511 int processResults(n, indx, fp)
512 int n, indx;
513 FILE *fp;
514 {
515  int i, nif;
516  struct RESULTS *a, *p;
517  static struct tm *tmn3;
518 
519  if(n)
520  {
521  bzero((char *)&averages, sizeof(averages));
522 
523  a = &averages[0];
524 
525  for(i=0;i<n;i++,p++)
526  {
527  p = &results[indx][i];
528 
529  switch(n) /* Copy the appropriate header */
530  {
531  case 3:
532  if(i == 1)
533  {
534  bcopy((char *)&p->head, (char *)&a->head, sizeof(struct HEADER));
535  a->rej = p->rej;
536  }
537  break;
538 
539  case 2:
540  if(i == 0)
541  {
542  bcopy((char *)&p->head, (char *)&a->head, sizeof(struct HEADER));
543  a->rej = p->rej;
544  }
545  break;
546 
547  default:
548  bcopy((char *)&p->head, (char *)&a->head, sizeof(struct HEADER));
549  a->rej = p->rej;
550  break;
551  }
552  a->avg += p->avg;
553  a->rms += p->rms;
554  a->eta_mb += p->eta_mb;
555  a->err += p->err;
556  }
557 
558  a->avg /= n;
559  a->rms /= n;
560  a->eta_mb /= n;
561  a->err /= n;
562 
563  nif = getFeed(a->head.scan);
564 
565  tmn3 = breakTime(a->head.burn_time);
566 
567 /* Write out the log file beam_eff.dat */
568  fprintf(fp, "%02d %3s %4d %02d:%02d (%d) %7.2f %3.3s %7.7s %10.6lf %02d %6.2lf %4.1lf %.1f %.0f\n",
569 
570  tmn3->tm_mday, months[tmn3->tm_mon], tmn3->tm_year+1900,
571  tmn3->tm_hour, tmn3->tm_min, n, a->head.scan,
572  a->head.obsid, a->head.object,
573  restFreq(&a->head) / 1000.0, nif,
574  a->eta_mb*100.0, a->err*100.0,
575  a->head.el, a->rej);
576 
577  st_report("IF%2d: Avg = %.2f, RMS = %.3f, Eff = %.2f, Err = %.2f",
578  nif, a->avg, a->rms, a->eta_mb*100.0, a->err*100.0);
579 
580  tmpBeamEff[nif-1] = a->eta_mb*100.0;
581  }
582 
583  return(0);
584 }
585 
586 
587 
588 int writeResults(indx)
589 int indx[4];
590 {
591  FILE *fp;
592  int i;
593 
594  st_report(" ");
595  st_report("Averages: %d %d %d %d", indx[0], indx[1], indx[2], indx[3]);
596  st_report(" ");
597 
598  if((fp = fopen("beam_eff.dat", "a")) == NULL)
599  {
600  printf("BEAM_EFF: Unable to open beam_eff.dat file\n");
601  exit(1);
602  }
603 
604  fprintf(fp, "#\n");
605  fprintf(fp, "Analysed: %s\n", getcTime(0));
606  fprintf(fp, "#\n");
607 
608  for(i=0;i<4;i++)
609  {
610  processResults(indx[i], i, fp);
611  }
612 
613  fclose(fp);
614 
615  return(0);
616 }
617 
618 
620 {
621  int first = 1, i, n, bknd, bkindx[MAX_BKNDS], found = 0, saveCalMode;
622  double ret;
623  struct HEADER *p;
624  struct RESULTS *p2;
625  static struct tm *tmn2;
626  struct ACCUM_RESULTS *ar;
627 
628  bzero((char *)&tmpBeamEff[0], sizeof(tmpBeamEff));
629  bzero((char *)&bkindx, sizeof(bkindx));
630  bzero((char *)&accum_results, sizeof(accum_results));
631 
632  saveCalMode = env->calmode;
633 
634  if(env->issmt)
635  {
636  if(env->rejections[0] == 0.0 || env->rejections[1] == 0.0 ||
637  env->rejections[2] == 0.0 || env->rejections[3] == 0.0)
638  {
639  st_fail("One or More Rejections are not set");
640  setRejections();
641 
642  return(1);
643  }
644  }
645  else
646  if(env->rejections[0] == 0.0 || env->rejections[1] == 0.0)
647  {
648  st_fail("One or More Rejections are not set");
649  setRejections();
650 
651  return(1);
652  }
653 
654  p = &sa[0];
655  for(i=0;i<env->numofscans;i++,p++)
656  {
657  if(meetsCritiria(p, CHECK_ALL))
658  {
659  if(strncmp(p->obsmode, "CONTSEQ", 7)) /* We only process Seq */
660  {
661  continue; /* No good */
662  }
663 
664  if(isScanIgnored(p->scan))
665  {
666  continue;
667  }
668 
669  ret = read_scan(p->scan, env->filename, h0->yplot1, &h0->head, 0);
670  env->curScan = p->scan;
671 
672  if(ret > 0.0)
673  {
674  found++;
675 
676  tmn2 = breakTime(h0->head.burn_time);
677 
678  global.time.year = tmn2->tm_year+1900;
679  global.time.mon = tmn2->tm_mon+1;
680  global.time.day = tmn2->tm_mday;
681  global.time.hour = tmn2->tm_hour;
682  global.time.min = tmn2->tm_min;
683  global.time.UseCurrent = 0; /* Use these values */
684 
685  if(first)
686  {
687  st_report("Obs-Time: Mon %d, Day %d, Year %d, Hour %d, Min %d",
688  tmn2->tm_mon+1,
689  tmn2->tm_mday,
690  tmn2->tm_year+1900,
691  tmn2->tm_hour,
692  tmn2->tm_min);
693 
694 /* Note to self: Remember *tmnow is a pointer to a static structure
695  inside time(), and localtime(); Once you call them
696  you must use them imediately befor calling other
697  functions that may or not use time() and localtime(),
698  thus resetting their internal static structure.
699  */
700  }
701 
702  getephem(first);
703 
704  if(!strncmp(h0->head.object, "Jupiter", 7))
705  {
707  }
708  else
709  if(!strncmp(h0->head.object, "Venus", 5))
710  {
712  }
713  else
714  if(!strncmp(h0->head.object, "Mars", 4))
715  {
717  }
718  else
719  if(!strncmp(h0->head.object, "Saturn", 6))
720  {
722  }
723  else
724  if(!strncmp(h0->head.object, "Moon", 4))
725  {
727  }
728  else
729  {
730  st_fail("Unknown Object %s", h0->head.object);
731  continue;
732  }
733 
734  n = h0->head.datalen / sizeof(float);
735 
736  env->calmode = 0;
737  env->accum = 0;
738 
739  bknd = findBackend(h0->head.scan);
740 
741  if(bknd == -1)
742  {
743  st_fail("Unable to determine backend %8.8s", h0->head.backend);
744  env->calmode = saveCalMode;
745 
746  return(1);
747  }
748 
749  ar = &accum_results[bknd];
750 
751  accum_v1(h0->yplot1, &h0->head, env->invert, ar);
752 
753  avg = env->accumtr;
754  rms = 0.0;
755 
756  st_report("Nchan = %d, AVG = %f, RMS = %f", n, avg, rms);
757 
758  st_report("Backend %8.8s = %d, Rej = %.1f",
759  h0->head.backend, bknd, env->rejections[bknd]);
760 
761  global.state.f_sky = restFreq(&h0->head) / 1000.0;
762  global.state.rej = env->rejections[bknd];
763  global.state.T_ant = avg;
764  global.state.ta_s = rms;
765  strncpy(global.state.obs, h0->head.obsid, 3);
766  global.state.obs[3] = '\0';
767 
768  beam_eff(first);
769 
770  /* Save the results */
771  if(bknd < MAX_BKNDS)
772  {
773  if(bkindx[bknd] < MAX_BKNDS)
774  {
775  p2 = &results[bknd][bkindx[bknd]];
776 
777  bcopy((char *)&h0->head, (char *)&p2->head, sizeof(struct HEADER));
778  p2->avg = avg;
779  p2->rms = rms;
780  p2->rej = env->rejections[bknd];
781  p2->eta_mb = global.state.eta_mb;
782  p2->err = global.state.err;
783  }
784  else
785  {
786  printf("Number of Scans %d Out Of Range\n", bkindx[bknd]);
787  env->calmode = saveCalMode;
788 
789  return(1);
790  }
791 
792  bkindx[bknd]++;
793  }
794  else
795  {
796  printf("Backend Indx %d Out Of Range\n", bknd);
797  env->calmode = saveCalMode;
798 
799  return(1);
800  }
801 
802  st_report(" ");
803  first = 0;
804  }
805  }
806  }
807 
808 
809  if(found)
810  {
811  writeResults(bkindx);
812  st_report("Results written to beam_eff.dat");
813  }
814 
815  st_report(" ");
816  st_report("Found %d scans matching your criteria", found);
817 
818  if(found)
819  {
820  st_report("\n");
821 
822  if(getYesNoQuit("Use beam eff value of %.3f %.3f. %.3f %.3f: y/N ?",
823  tmpBeamEff[0], tmpBeamEff[1],
824  tmpBeamEff[2], tmpBeamEff[3]))
825  {
826  doAcceptEff();
827  }
828  }
829 
830  env->calmode = saveCalMode;
831 
832  return(0);
833 }
834 
835 
float yplot1[MAX_CHANS]
Definition: image.h:110
struct LP_IMAGE_INFO * h0
Definition: image.c:74
#define P
Definition: beam.c:69
int getFeed()
double scan
Definition: header.h:35
EPH eph
Definition: beam.h:49
double curScan
Definition: env.h:178
double rej
Definition: beam.c:77
Definition: beam.h:32
#define C
Definition: beam.c:64
Definition: beam.h:7
int first
Definition: dbase.c:106
struct RESULTS results[MAX_BKNDS][MAX_BKNDS]
Definition: beam.c:81
struct PARSE_STACK * args
Definition: parse.h:196
#define MAX_PLANETS
Definition: planets.h:13
double datalen
Definition: header.h:34
double rejections[MAX_BEAMS]
Definition: env.h:261
char obsid[8]
Definition: header.h:36
#define MARS
Definition: planets.h:7
double eta_mb
Definition: beam.c:75
int scan
int accum_v1(float *data, struct HEADER *h, int invert, struct ACCUM_RESULTS *ar)
Definition: cont.c:94
int read_scan()
struct tm * breakTime(double burnT)
Definition: beam.c:246
#define T_R0
Definition: beam.c:68
int invert
Definition: env.h:62
FILE * fp
Definition: linuxpops.c:70
Definition: header.h:13
char * fifthArg
Definition: parse.h:184
double ta_s
Definition: beam.h:12
double T_ant
Definition: beam.h:11
double VenDiam
Definition: beam.h:34
struct ACCUM_RESULTS accum_results[4]
Definition: cont.c:61
double err
Definition: beam.c:76
double parseBeamEff(char *buf)
Definition: beam.c:90
int min
Definition: beam.h:28
#define CMB
Definition: beam.c:66
struct HEADER * sa
Definition: linuxpops.c:72
struct HEADER head
Definition: beam.c:78
int issmt
Definition: env.h:63
char telescop[8]
Definition: header.h:38
#define MAX_BKNDS
Definition: beam.c:61
int doAcceptEff()
Definition: beam.c:223
int day
Definition: beam.h:26
double MarDist
Definition: beam.h:36
int doBeamEff()
Definition: beam.c:619
double restFreq(struct HEADER *h)
Definition: linuxpops.c:2837
double SatIncl
Definition: beam.h:39
#define H
Definition: beam.c:62
char obs[4]
Definition: beam.h:19
int getephem(int first)
Definition: getephem.c:130
double MarDiam
Definition: beam.h:35
int getYesNoQuit()
struct ENVIRONMENT * env
Definition: linuxpops.c:71
char * months[12]
Definition: beam.c:85
char * thirdArg
Definition: parse.h:182
STATE state
Definition: beam.h:47
struct HEADER head
Definition: image.h:104
double eta_mb
Definition: beam.h:15
char * planet_names[MAX_PLANETS]
Definition: beam.c:88
double rms
Definition: beam.c:74
int year
Definition: beam.h:24
void st_warn()
char obsmode[8]
Definition: header.h:41
int beam_eff(int first)
Definition: beam.c:292
int mon
Definition: beam.h:25
char backend[8]
Definition: header.h:43
void st_fail()
double f_sky
Definition: beam.h:9
#define SATURN
Definition: planets.h:9
double avg
Definition: beam.c:73
int meetsCritiria(struct HEADER *p, int mask)
Definition: observe.c:90
int i
Definition: convol.c:79
#define JUPITER
Definition: planets.h:8
int findBackend(double scan)
Definition: beam.c:259
#define MG_DIAMETER
Definition: defines.h:5
char * getcTime(int offset)
double planck(double freq, double T_bright)
Definition: beam.c:499
int setRejections()
Definition: beam.c:170
int processResults(int n, int indx, FILE *fp)
Definition: beam.c:511
int isScanIgnored(double scan)
Definition: ignore.c:181
int writeResults(indx)
Definition: beam.c:588
double rej
Definition: beam.h:10
#define K
Definition: beam.c:63
void st_report()
double el
Definition: header.h:83
int UseCurrent
Definition: beam.h:29
TIME time
Definition: beam.h:48
#define MAX_BEAMS
Definition: defines.h:41
int numofscans
Definition: env.h:85
char * fourthArg
Definition: parse.h:183
#define PI
Definition: cactus.h:45
double JupDiam
Definition: beam.h:37
int hour
Definition: beam.h:27
#define MOON
Definition: planets.h:12
double rms
Definition: beam.h:5
#define R0
Definition: beam.c:67
#define VENUS
Definition: planets.h:6
GLOBAL global
Definition: beam.h:52
#define LN2
Definition: beam.c:65
double burn_time
Definition: header.h:181
double accumtr
Definition: env.h:164
struct RESULTS averages[MAX_BKNDS]
Definition: beam.c:82
double avg
Definition: beam.h:5
#define CHECK_ALL
Definition: defines.h:64
double SatDiam
Definition: beam.h:38
double bm_eff[MAX_BEAMS]
Definition: env.h:171
char * secondArg
Definition: parse.h:181
void st_print()
#define KP_DIAMETER
Definition: defines.h:13
double MoonAge
Definition: beam.h:40
int setBeamEff()
Definition: beam.c:117
int planet
Definition: beam.h:17
int accum
Definition: env.h:16
char object[16]
Definition: header.h:40
double err
Definition: beam.h:16
Definition: beam.c:72
char filename[256]
Definition: env.h:9
int calmode
Definition: env.h:38
double tmpBeamEff[4]
Definition: beam.c:83