casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ATMSkyStatus.h
Go to the documentation of this file.
1 #ifndef _ATM_SKYSTATUS_H
2 #define _ATM_SKYSTATUS_H
3 /*******************************************************************************
4  * ALMA - Atacama Large Millimiter Array
5  * (c) Instituto de Estructura de la Materia, 2009
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20  *
21  * "@(#) $Id: ATMSkyStatus.h Exp $"
22  *
23  * who when what
24  * -------- -------- ----------------------------------------------
25  * pardo 24/03/09 created
26  */
27 
28 #ifndef __cplusplus
29 #error This is a C++ include file and cannot be used from plain C
30 #endif
31 
32 #include "ATMCommon.h"
35 #include "ATMWVRMeasurement.h"
36 
37 //#include <math.h>
38 #include <string>
39 #include <vector>
40 
41 using std::string;
42 using std::vector;
43 
45 
58 {
59 public:
60 
62 
74  SkyStatus(const RefractiveIndexProfile &refractiveIndexProfile);
76  SkyStatus(const RefractiveIndexProfile &refractiveIndexProfile,
77  double airMass);
79  SkyStatus(const RefractiveIndexProfile &refractiveIndexProfile,
80  const Temperature &temperatureBackground);
82  SkyStatus(const RefractiveIndexProfile &refractiveIndexProfile,
83  const Length &wh2o);
85  SkyStatus(const RefractiveIndexProfile &refractiveIndexProfile,
86  const Temperature &temperatureBackground,
87  double airMass);
89  SkyStatus(const RefractiveIndexProfile &refractiveIndexProfile,
90  double airMass,
91  const Temperature &temperatureBackground);
93  SkyStatus(const RefractiveIndexProfile &refractiveIndexProfile,
94  const Length &wh2o,
95  double airMass);
97  SkyStatus(const RefractiveIndexProfile &refractiveIndexProfile,
98  double airMass,
99  const Length &wh2o);
101  SkyStatus(const RefractiveIndexProfile &refractiveIndexProfile,
102  const Length &wh2o,
103  const Temperature &temperatureBackground);
105  SkyStatus(const RefractiveIndexProfile &refractiveIndexProfile,
106  const Temperature &temperatureBackground,
107  const Length &wh2o);
109  SkyStatus(const RefractiveIndexProfile &refractiveIndexProfile,
110  const Temperature &temperatureBackground,
111  double airMass,
112  const Length &wh2o);
114  SkyStatus(const RefractiveIndexProfile &refractiveIndexProfile,
115  const Temperature &temperatureBackground,
116  const Length &wh2o,
117  double airMass);
119  SkyStatus(const RefractiveIndexProfile &refractiveIndexProfile,
120  double airMass,
121  const Temperature &temperatureBackground,
122  const Length &wh2o);
124  SkyStatus(const RefractiveIndexProfile &refractiveIndexProfile,
125  double airMass,
126  const Length &wh2o,
127  const Temperature &temperatureBackground);
129  SkyStatus(const RefractiveIndexProfile &refractiveIndexProfile,
130  const Length &wh2o,
131  const Temperature &temperatureBackground,
132  double airMass);
134  SkyStatus(const RefractiveIndexProfile &refractiveIndexProfile,
135  const Length &wh2o,
136  double airMass,
137  const Temperature &temperatureBackground);
138 
140  SkyStatus(const SkyStatus &);
141 
142  virtual ~SkyStatus();
143 
145 
147 
148 
152  Length getUserWH2O() const { return wh2o_user_; }
156  void setUserWH2O(const Length &wh2o)
157  {
158  if(wh2o.get() == wh2o_user_.get()) {
159  } else {
160  wh2o_user_ = wh2o;
161  }
162  }
166  void setUserWH2O(double dwh2o, const string &units)
167  {
168  Length wh2o(dwh2o, units);
169  if(wh2o.get() == wh2o_user_.get()) {
170  } else {
171  wh2o_user_ = wh2o;
172  }
173  }
175  double getAirMass() const { return airMass_; }
177  void setAirMass(double airMass)
178  {
179  if(airMass == airMass_) {
180  } else {
181  airMass_ = airMass;
182  }
183  }
188  void setSkyBackgroundTemperature(const Temperature &skyBackgroundTemperature)
189  {
190  if(skyBackgroundTemperature.get("K") == skyBackgroundTemperature_.get("K")) {
191  } else {
193  = Temperature(skyBackgroundTemperature.get("K"), "K");
194  }
195  }
196 
200  {
201  unsigned int n = 0;
202  return getAverageTebbSky(n);
203  }
206  Temperature getAverageTebbSky(unsigned int spwid)
207  {
208  return getAverageTebbSky(spwid,
209  getUserWH2O(),
210  getAirMass(),
211  1.0,
213  }
216  Temperature getAverageTebbSky(const Length &wh2o) { return getAverageTebbSky(0, wh2o); }
219  Temperature getAverageTebbSky(unsigned int spwid, const Length &wh2o)
220  {
221  return getAverageTebbSky(spwid,
222  wh2o,
223  getAirMass(),
224  1.0,
226  }
229  Temperature getAverageTebbSky(double airmass) { return getAverageTebbSky(0, airmass); }
232  Temperature getAverageTebbSky(unsigned int spwid, double airmass)
233  {
234  return getAverageTebbSky(spwid,
235  getUserWH2O(),
236  airmass,
237  1.0,
239  }
243  double skycoupling,
244  const Temperature &Tspill)
245  {
246  return getAverageTebbSky(0, wh2o, skycoupling, Tspill);
247  }
250  Temperature getAverageTebbSky(unsigned int spwid,
251  const Length &wh2o,
252  double skycoupling,
253  const Temperature &Tspill)
254  {
255  return getAverageTebbSky(spwid, wh2o, getAirMass(), skycoupling, Tspill);
256  }
260  double skycoupling,
261  const Temperature &Tspill)
262  {
263  return getAverageTebbSky(0, airmass, skycoupling, Tspill);
264  }
267  Temperature getAverageTebbSky(unsigned int spwid,
268  double airmass,
269  double skycoupling,
270  const Temperature &Tspill)
271  {
272  return getAverageTebbSky(spwid, getUserWH2O(), airmass, skycoupling, Tspill);
273  }
276  Temperature getAverageTebbSky(double skycoupling, const Temperature &Tspill)
277  {
278  unsigned int n = 0;
279  return getAverageTebbSky(n, skycoupling, Tspill);
280  }
283  Temperature getAverageTebbSky(unsigned int spwid,
284  double skycoupling,
285  const Temperature &Tspill)
286  {
287  return getAverageTebbSky(spwid,
288  getUserWH2O(),
289  getAirMass(),
290  skycoupling,
291  Tspill);
292  }
295  Temperature getAverageTebbSky(unsigned int spwid,
296  const Length &wh2o,
297  double airmass,
298  double skycoupling,
299  const Temperature &Tspill);
300 
301  Temperature getAverageTebbSky(unsigned int spwid,
302  const Length &wh2o,
303  double airmass,
304  double skycoupling,
305  double signalgain,
306  const Temperature &Tspill);
307 
311  {
312  unsigned int n = 0;
313  return getTebbSky(n);
314  }
317  Temperature getTebbSky(unsigned int nc) // There was reported a bug at Launchpad:
318  // that the result did not take into account
319  // the actual column of water. But it is not true.
320  // The column of water is taken into account as
321  // seen in the next accessor, that is referred by this one.
322  {
323  unsigned int n = 0;
324  return getTebbSky(n, nc);
325  }
328  Temperature getTebbSky(unsigned int spwid, unsigned int nc)
329  {
330  return getTebbSky(spwid,
331  nc,
332  getUserWH2O(),
333  getAirMass(),
334  1.0,
335  Temperature(100, "K"));
336  }
339  Temperature getTebbSky(double airmass)
340  {
341  unsigned int n = 0;
342  return getTebbSky(n, airmass);
343  }
346  Temperature getTebbSky(unsigned int nc, double airmass)
347  {
348  unsigned int n = 0;
349  return getTebbSky(n, nc, airmass);
350  }
353  Temperature getTebbSky(unsigned int spwid, unsigned int nc, double airmass)
354  {
355  return getTebbSky(spwid, nc, getUserWH2O(), airmass, 1.0, Temperature(100,
356  "K"));
357  }
361  {
362  unsigned int n = 0;
363  return getTebbSky(n, wh2o);
364  }
367  Temperature getTebbSky(unsigned int nc, const Length &wh2o)
368  {
369  unsigned int n = 0;
370  return getTebbSky(n, nc, wh2o);
371  }
374  Temperature getTebbSky(unsigned int spwid, unsigned int nc, const Length &wh2o)
375  {
376  return getTebbSky(spwid, nc, wh2o, getAirMass(), 1.0, Temperature(100, "K"));
377  }
380  Temperature getTebbSky(unsigned int nc,
381  double skycoupling,
382  const Temperature &Tspill)
383  {
384  unsigned int n = 0;
385  return getTebbSky(n, nc, skycoupling, Tspill);
386  }
389  Temperature getTebbSky(unsigned int spwid,
390  unsigned int nc,
391  double skycoupling,
392  const Temperature &Tspill)
393  {
394  return getTebbSky(spwid,
395  nc,
396  getUserWH2O(),
397  getAirMass(),
398  skycoupling,
399  Tspill);
400  }
403  Temperature getTebbSky(unsigned int nc, const Length &wh2o, double airmass)
404  {
405  unsigned int n = 0;
406  return getTebbSky(n, nc, wh2o, airmass);
407  }
410  Temperature getTebbSky(unsigned int spwid,
411  unsigned int nc,
412  const Length &wh2o,
413  double airmass)
414  {
415  return getTebbSky(spwid, nc, wh2o, airmass, 1.0, Temperature(100, "K"));
416  }
419  Temperature getTebbSky(unsigned int nc,
420  const Length &wh2o,
421  double skycoupling,
422  const Temperature &Tspill)
423  {
424  unsigned int n = 0;
425  return getTebbSky(n, nc, wh2o, skycoupling, Tspill);
426  }
429  Temperature getTebbSky(unsigned int spwid,
430  unsigned int nc,
431  const Length &wh2o,
432  double skycoupling,
433  const Temperature &Tspill)
434  {
435  return getTebbSky(spwid, nc, wh2o, getAirMass(), skycoupling, Tspill);
436  }
439  Temperature getTebbSky(unsigned int nc,
440  double airmass,
441  double skycoupling,
442  const Temperature &Tspill)
443  {
444  unsigned int n = 0;
445  return getTebbSky(n, nc, airmass, skycoupling, Tspill);
446  }
449  Temperature getTebbSky(unsigned int spwid,
450  unsigned int nc,
451  double airmass,
452  double skycoupling,
453  const Temperature &Tspill)
454  {
455  return getTebbSky(spwid, nc, getUserWH2O(), airmass, skycoupling, Tspill);
456  }
459  Temperature getTebbSky(unsigned int nc,
460  const Length &wh2o,
461  double airmass,
462  double skycoupling,
463  const Temperature &Tspill)
464  {
465  unsigned int n = 0;
466  return getTebbSky(n, nc, wh2o, airmass, skycoupling, Tspill);
467  }
470  Temperature getTebbSky(unsigned int spwid,
471  unsigned int nc,
472  const Length &wh2o,
473  double airmass,
474  double skycoupling,
475  const Temperature &Tspill);
476 
477 
481  {
482  unsigned int n = 0;
483  return getAverageTrjSky(n);
484  }
487  Temperature getAverageTrjSky(unsigned int spwid)
488  {
489  return getAverageTrjSky(spwid,
490  getUserWH2O(),
491  getAirMass(),
492  1.0,
494  }
497  Temperature getAverageTrjSky(const Length &wh2o) { return getAverageTrjSky(0, wh2o); }
500  Temperature getAverageTrjSky(unsigned int spwid, const Length &wh2o)
501  {
502  return getAverageTrjSky(spwid,
503  wh2o,
504  getAirMass(),
505  1.0,
507  }
510  Temperature getAverageTrjSky(double airmass) { return getAverageTrjSky(0, airmass); }
513  Temperature getAverageTrjSky(unsigned int spwid, double airmass)
514  {
515  return getAverageTrjSky(spwid,
516  getUserWH2O(),
517  airmass,
518  1.0,
520  }
524  double skycoupling,
525  const Temperature &Tspill)
526  {
527  return getAverageTrjSky(0, wh2o, skycoupling, Tspill);
528  }
531  Temperature getAverageTrjSky(unsigned int spwid,
532  const Length &wh2o,
533  double skycoupling,
534  const Temperature &Tspill)
535  {
536  return getAverageTrjSky(spwid, wh2o, getAirMass(), skycoupling, Tspill);
537  }
541  double skycoupling,
542  const Temperature &Tspill)
543  {
544  return getAverageTrjSky(0, airmass, skycoupling, Tspill);
545  }
548  Temperature getAverageTrjSky(unsigned int spwid,
549  double airmass,
550  double skycoupling,
551  const Temperature &Tspill)
552  {
553  return getAverageTrjSky(spwid, getUserWH2O(), airmass, skycoupling, Tspill);
554  }
557  Temperature getAverageTrjSky(double skycoupling, const Temperature &Tspill)
558  {
559  unsigned int n = 0;
560  return getAverageTrjSky(n, skycoupling, Tspill);
561  }
564  Temperature getAverageTrjSky(unsigned int spwid,
565  double skycoupling,
566  const Temperature &Tspill)
567  {
568  return getAverageTrjSky(spwid,
569  getUserWH2O(),
570  getAirMass(),
571  skycoupling,
572  Tspill);
573  }
576  Temperature getAverageTrjSky(unsigned int spwid,
577  const Length &wh2o,
578  double airmass,
579  double skycoupling,
580  const Temperature &Tspill);
581 
582  Temperature getAverageTrjSky(unsigned int spwid,
583  const Length &wh2o,
584  double airmass,
585  double skycoupling,
586  double signalgain,
587  const Temperature &Tspill);
588 
592  {
593  unsigned int n = 0;
594  return getTrjSky(n);
595  }
598  Temperature getTrjSky(unsigned int nc) // There was reported a bug at Launchpad:
599  // that the result did not take into account
600  // the actual column of water. But it is not true.
601  // The column of water is taken into account as
602  // seen in the next accessor, that is referred by this one.
603  {
604  unsigned int n = 0;
605  return getTrjSky(n, nc);
606  }
609  Temperature getTrjSky(unsigned int spwid, unsigned int nc)
610  {
611  return getTrjSky(spwid,
612  nc,
613  getUserWH2O(),
614  getAirMass(),
615  1.0,
616  Temperature(100, "K"));
617  }
620  Temperature getTrjSky(double airmass)
621  {
622  unsigned int n = 0;
623  return getTrjSky(n, airmass);
624  }
627  Temperature getTrjSky(unsigned int nc, double airmass)
628  {
629  unsigned int n = 0;
630  return getTrjSky(n, nc, airmass);
631  }
634  Temperature getTrjSky(unsigned int spwid, unsigned int nc, double airmass)
635  {
636  return getTrjSky(spwid, nc, getUserWH2O(), airmass, 1.0, Temperature(100,
637  "K"));
638  }
642  {
643  unsigned int n = 0;
644  return getTrjSky(n, wh2o);
645  }
648  Temperature getTrjSky(unsigned int nc, const Length &wh2o)
649  {
650  unsigned int n = 0;
651  return getTrjSky(n, nc, wh2o);
652  }
655  Temperature getTrjSky(unsigned int spwid, unsigned int nc, const Length &wh2o)
656  {
657  return getTrjSky(spwid, nc, wh2o, getAirMass(), 1.0, Temperature(100, "K"));
658  }
661  Temperature getTrjSky(unsigned int nc,
662  double skycoupling,
663  const Temperature &Tspill)
664  {
665  unsigned int n = 0;
666  return getTrjSky(n, nc, skycoupling, Tspill);
667  }
670  Temperature getTrjSky(unsigned int spwid,
671  unsigned int nc,
672  double skycoupling,
673  const Temperature &Tspill)
674  {
675  return getTrjSky(spwid,
676  nc,
677  getUserWH2O(),
678  getAirMass(),
679  skycoupling,
680  Tspill);
681  }
684  Temperature getTrjSky(unsigned int nc, const Length &wh2o, double airmass)
685  {
686  unsigned int n = 0;
687  return getTrjSky(n, nc, wh2o, airmass);
688  }
691  Temperature getTrjSky(unsigned int spwid,
692  unsigned int nc,
693  const Length &wh2o,
694  double airmass)
695  {
696  return getTrjSky(spwid, nc, wh2o, airmass, 1.0, Temperature(100, "K"));
697  }
700  Temperature getTrjSky(unsigned int nc,
701  const Length &wh2o,
702  double skycoupling,
703  const Temperature &Tspill)
704  {
705  unsigned int n = 0;
706  return getTrjSky(n, nc, wh2o, skycoupling, Tspill);
707  }
710  Temperature getTrjSky(unsigned int spwid,
711  unsigned int nc,
712  const Length &wh2o,
713  double skycoupling,
714  const Temperature &Tspill)
715  {
716  return getTrjSky(spwid, nc, wh2o, getAirMass(), skycoupling, Tspill);
717  }
720  Temperature getTrjSky(unsigned int nc,
721  double airmass,
722  double skycoupling,
723  const Temperature &Tspill)
724  {
725  unsigned int n = 0;
726  return getTrjSky(n, nc, airmass, skycoupling, Tspill);
727  }
730  Temperature getTrjSky(unsigned int spwid,
731  unsigned int nc,
732  double airmass,
733  double skycoupling,
734  const Temperature &Tspill)
735  {
736  return getTrjSky(spwid, nc, getUserWH2O(), airmass, skycoupling, Tspill);
737  }
740  Temperature getTrjSky(unsigned int nc,
741  const Length &wh2o,
742  double airmass,
743  double skycoupling,
744  const Temperature &Tspill)
745  {
746  unsigned int n = 0;
747  return getTrjSky(n, nc, wh2o, airmass, skycoupling, Tspill);
748  }
751  Temperature getTrjSky(unsigned int spwid,
752  unsigned int nc,
753  const Length &wh2o,
754  double airmass,
755  double skycoupling,
756  const Temperature &Tspill);
757 
758 
764  Opacity getWetOpacity(){unsigned int n = 0; return getWetOpacity(n);}
765  Opacity getWetOpacityUpTo(Length refalti){unsigned int n = 0; return getWetOpacityUpTo(n, refalti);}
770  Opacity getWetOpacity(unsigned int nc){return getH2OLinesOpacity(nc) + getH2OContOpacity(nc);}
771  Opacity getWetOpacityUpTo(unsigned int nc, Length refalti){return getH2OLinesOpacityUpTo(nc, refalti) + getH2OContOpacityUpTo(nc, refalti);}
776  Opacity getWetOpacity(unsigned int spwid, unsigned int nc)
777  {
778  if(!spwidAndIndexAreValid(spwid, nc)) return (double) -999.0;
779  return getWetOpacity(v_transfertId_[spwid] + nc);
780  }
781  Opacity getWetOpacityUpTo(unsigned int spwid, unsigned int nc, Length refalti)
782  {
783  if(!spwidAndIndexAreValid(spwid, nc)) return (double) -999.0;
784  return getWetOpacityUpTo(v_transfertId_[spwid] + nc, refalti);
785  }
790  Opacity getAverageWetOpacity(unsigned int spwid)
791  {
793  * ((getUserWH2O().get()) / (getGroundWH2O().get()));
794  }
795  Opacity getAverageH2OLinesOpacity(unsigned int spwid)
796  {
798  * ((getUserWH2O().get()) / (getGroundWH2O().get()));
799  }
800  Opacity getAverageH2OContOpacity(unsigned int spwid)
801  {
803  * ((getUserWH2O().get()) / (getGroundWH2O().get()));
804  }
805 
807  {
809  }
810  Opacity getDryOpacity(unsigned int nc)
811  {
813  }
814  Opacity getDryOpacity(unsigned int spwid, unsigned int nc)
815  {
816  return RefractiveIndexProfile::getDryOpacity(spwid, nc);
817  }
818  Opacity getAverageDryOpacity(unsigned int spwid)
819  {
821  }
822 
823  Opacity getAverageO2LinesOpacity(unsigned int spwid)
824  {
826  }
827  Opacity getAverageO3LinesOpacity(unsigned int spwid)
828  {
830  }
831  Opacity getAverageN2OLinesOpacity(unsigned int spwid)
832  {
834  }
835  Opacity getAverageNO2LinesOpacity(unsigned int spwid)
836  {
838  }
839  Opacity getAverageSO2LinesOpacity(unsigned int spwid)
840  {
842  }
843  Opacity getAverageCOLinesOpacity(unsigned int spwid)
844  {
846  }
847  Opacity getAverageDryContOpacity(unsigned int spwid)
848  {
850  }
851 
853  {
854  return getWetOpacity() + getDryOpacity();
855  }
856  Opacity getTotalOpacity(unsigned int nc)
857  {
858  return getWetOpacity(nc) + getDryOpacity(nc);
859  }
860  Opacity getTotalOpacity(unsigned int spwid, unsigned int nc)
861  {
862  return getWetOpacity(spwid, nc) + getDryOpacity(spwid, nc);
863  }
864  Opacity getAverageTotalOpacity(unsigned int spwid)
865  {
866  return getAverageWetOpacity(spwid) + getAverageDryOpacity(spwid);
867  }
869  {
870  unsigned int n = 0;
871  return getTotalOpacityUpTo(n, refalti);
872  }
873  // Opacity getTotalOpacityUpTo(unsigned int nc, Length refalti);
874  Opacity getTotalOpacityUpTo(unsigned int nc, Length refalti)
875  {
876  return getWetOpacityUpTo(nc,refalti) + getDryOpacityUpTo(nc,refalti);
877  }
878  Opacity getTotalOpacityUpTo(unsigned int spwid, unsigned int nc, Length refalti)
879  {
880  Opacity wrongOp(-999.0,"np");
881  if(!spwidAndIndexAreValid(spwid, nc)) return wrongOp;
882  return getTotalOpacityUpTo(v_transfertId_[spwid] + nc, refalti);
883  }
889  Opacity getH2OLinesOpacity(){ unsigned int n = 0; return getH2OLinesOpacity(n);}
890  Opacity getH2OLinesOpacityUpTo(Length refalti){ unsigned int n = 0; return getH2OLinesOpacityUpTo(n, refalti);}
895  Opacity getH2OLinesOpacity(unsigned int nc);
896  Opacity getH2OLinesOpacityUpTo(unsigned int nc, Length refalti);
901  Opacity getH2OLinesOpacity(unsigned int spwid, unsigned int nc){ if(!spwidAndIndexAreValid(spwid, nc)) return (double) -999.0; return getH2OLinesOpacity(v_transfertId_[spwid] + nc);}
902  Opacity getH2OLinesOpacityUpTo(unsigned int spwid, unsigned int nc, Length refalti){ if(!spwidAndIndexAreValid(spwid, nc)) return (double) -999.0; return getH2OLinesOpacityUpTo(v_transfertId_[spwid] + nc, refalti);}
908  Opacity getH2OContOpacity(){unsigned int n = 0; return getH2OContOpacity(n);}
909  Opacity getH2OContOpacityUpTo(Length refalti){unsigned int n = 0; return getH2OContOpacityUpTo(n, refalti);}
914  Opacity getH2OContOpacity(unsigned int nc);
915  Opacity getH2OContOpacityUpTo(unsigned int nc, Length refalti);
920  Opacity getH2OContOpacity(unsigned int spwid, unsigned int nc){ if(!spwidAndIndexAreValid(spwid, nc)) return (double) -999.0; return getH2OContOpacity(v_transfertId_[spwid] + nc);}
921  Opacity getH2OContOpacityUpTo(unsigned int spwid, unsigned int nc, Length refalti){ if(!spwidAndIndexAreValid(spwid, nc)) return (double) -999.0; return getH2OContOpacityUpTo(v_transfertId_[spwid] + nc, refalti);}
928  {
929  unsigned int n = 0;
930  return getDispersiveH2OPhaseDelay(n);
931  }
937  Angle getDispersiveH2OPhaseDelay(unsigned int nc);
943  Angle getDispersiveH2OPhaseDelay(unsigned int spwid, unsigned int nc);
944 
951  {
952  unsigned int n = 0;
953  return getDispersiveH2OPathLength(n);
954  }
960  Length getDispersiveH2OPathLength(unsigned int nc);
966  Length getDispersiveH2OPathLength(unsigned int spwid, unsigned int nc);
967 
974  {
975  unsigned int n = 0;
977  }
983  Angle getNonDispersiveH2OPhaseDelay(unsigned int nc);
989  Angle getNonDispersiveH2OPhaseDelay(unsigned int spwid, unsigned int nc);
990 
997  {
998  unsigned int n = 0;
1000  }
1006  Length getNonDispersiveH2OPathLength(unsigned int nc);
1012  Length getNonDispersiveH2OPathLength(unsigned int spwid, unsigned int nc);
1013 
1018  Angle getAverageDispersiveH2OPhaseDelay(unsigned int spwid);
1024  {
1025  unsigned int n = 0;
1027  }
1032  Angle getAverageNonDispersiveH2OPhaseDelay(unsigned int spwid);
1038  {
1039  unsigned int n = 0;
1041  }
1042 
1047  Length getAverageDispersiveH2OPathLength(unsigned int spwid);
1053  {
1054  unsigned int n = 0;
1056  }
1061  Length getAverageNonDispersiveH2OPathLength(unsigned int spwid);
1067  {
1068  unsigned int n = 0;
1070  }
1071 
1072  Length getAverageH2OPathLength(unsigned int spwid)
1073  {
1074  return getAverageDispersiveH2OPathLength(spwid)
1076  }
1078  {
1079  unsigned int n = 0;
1080  return getAverageH2OPathLength(n);
1081  }
1082  double getAverageH2OPathLengthDerivative(unsigned int spwid)
1083  {
1084  return getAverageH2OPathLength(spwid).get("microns")
1085  / getUserWH2O().get("microns");
1086  } // in microns/micron_H2O
1088  {
1089  unsigned int n = 0;
1091  } // in microns/micron_H2O
1092 
1093 
1094  Angle getAverageH2OPhaseDelay(unsigned int spwid)
1095  {
1096  return getAverageDispersiveH2OPhaseDelay(spwid)
1098  }
1100  {
1101  unsigned int n = 0;
1102  return getAverageH2OPhaseDelay(n);
1103  }
1104 
1106  {
1107  return getAverageO2LinesPathLength(spwid)
1113  }
1115  {
1116  unsigned int n = 0;
1118  }
1119 
1121  {
1123  }
1125  {
1126  unsigned int n = 0;
1128  }
1129  double
1131  double
1133  double
1135  double
1137 
1139  {
1141  }
1143  {
1144  unsigned int n = 0;
1145  return getAverageO2LinesPathLength(n);
1146  }
1147 
1151  bool setBasicAtmosphericParameters(const Length &altitude,
1152  const Pressure &groundPressure,
1153  const Temperature &groundTemperature,
1154  double tropoLapseRate,
1155  const Humidity &humidity,
1156  const Length &wvScaleHeight);
1159  bool setBasicAtmosphericParameters(const Length &altitude);
1162  bool setBasicAtmosphericParameters(const Temperature &groundTemperature);
1165  bool setBasicAtmosphericParameters(const Pressure &groundPressure);
1168  bool setBasicAtmosphericParameters(const Humidity &humidity);
1171  bool setBasicAtmosphericParameters(double tropoLapseRate);
1175  bool setBasicAtmosphericParameters(const Length &altitude,
1176  const Temperature &groundTemperature);
1180  bool setBasicAtmosphericParameters(const Length &altitude, const Pressure &groundPressure);
1184  bool setBasicAtmosphericParameters(const Length &altitude, const Humidity &humidity);
1188  bool setBasicAtmosphericParameters(const Length &altitude, double tropoLapseRate);
1192  bool setBasicAtmosphericParameters(const Length &altitude, const Length &wvScaleHeight);
1194  bool setBasicAtmosphericParameters(const Temperature &groundTemperature,
1195  const Pressure &groundPressure);
1197  bool setBasicAtmosphericParameters(const Pressure &groundPressure,
1198  const Temperature &groundTemperature);
1200  bool setBasicAtmosphericParameters(const Temperature &groundTemperature,
1201  const Humidity &humidity);
1203  bool setBasicAtmosphericParameters(const Humidity &humidity,
1204  const Temperature &groundTemperature);
1206  bool setBasicAtmosphericParameters(const Temperature &groundTemperature,
1207  double tropoLapseRate);
1209  bool setBasicAtmosphericParameters(double tropoLapseRate,
1210  const Temperature &groundTemperature);
1214  bool setBasicAtmosphericParameters(const Temperature &groundTemperature,
1215  const Length &wvScaleHeight);
1217  bool
1218  setBasicAtmosphericParameters(const Pressure &groundPressure, const Humidity &humidity);
1220  bool
1221  setBasicAtmosphericParameters(const Humidity &humidity, const Pressure &groundPressure);
1223  bool setBasicAtmosphericParameters(const Pressure &groundPressure,
1224  double tropoLapseRate);
1226  bool setBasicAtmosphericParameters(double tropoLapseRate,
1227  const Pressure &groundPressure);
1231  bool setBasicAtmosphericParameters(const Pressure &groundPressure,
1232  const Length &wvScaleHeight);
1234  bool setBasicAtmosphericParameters(const Humidity &humidity, double tropoLapseRate);
1236  bool setBasicAtmosphericParameters(double tropoLapseRate, const Humidity &humidity);
1240  bool setBasicAtmosphericParameters(const Humidity &humidity, const Length &wvScaleHeight);
1244  bool setBasicAtmosphericParameters(double tropoLapseRate,
1245  const Length &wvScaleHeight);
1246 
1248  void addNewSpectralWindow(unsigned int numChan,
1249  unsigned int refChan,
1250  const Frequency &refFreq,
1251  const Frequency &chanSep)
1252  {
1253  RefractiveIndexProfile::add(numChan, refChan, refFreq, chanSep);
1254  }
1256  void addNewSpectralWindow(unsigned int numChan,
1257  unsigned int refChan,
1258  double* chanFreq,
1259  const string &freqUnits)
1260  {
1261  RefractiveIndexProfile::add(numChan, refChan, chanFreq, freqUnits);
1262  }
1264  void addNewSpectralWindow(unsigned int numChan,
1265  double refFreq,
1266  double* chanFreq,
1267  const string &freqUnits)
1268  {
1269  RefractiveIndexProfile::add(numChan, refFreq, chanFreq, freqUnits);
1270  }
1272  void addNewSpectralWindow(unsigned int numChan,
1273  double refFreq,
1274  const vector<double> &chanFreq,
1275  const string &freqUnits)
1276  {
1277  RefractiveIndexProfile::add(numChan, refFreq, chanFreq, freqUnits);
1278  }
1280  void addNewSpectralWindow(unsigned int numChan,
1281  unsigned int refChan,
1282  const Frequency &refFreq,
1283  const Frequency &chanSep,
1284  const Frequency &intermediateFreq,
1285  const SidebandSide &sbSide,
1286  const SidebandType &sbType)
1287  {
1289  refChan,
1290  refFreq,
1291  chanSep,
1292  intermediateFreq,
1293  sbSide,
1294  sbType);
1295  }
1296  void addNewSpectralWindow(const vector<Frequency> &chanFreq)
1297  {
1298  RefractiveIndexProfile::add(chanFreq);
1299  }
1300 
1306  Length WaterVaporRetrieval_fromFTS(const vector<double> &v_transmission)
1307  {
1308  unsigned int spwId = 0;
1309  Frequency f1(-999, "GHz");
1310  Frequency f2(-999, "GHz");
1311  return WaterVaporRetrieval_fromFTS(spwId, v_transmission, f1, f2);
1312  }
1314  Length WaterVaporRetrieval_fromFTS(const vector<double> &v_transmission,
1315  const Frequency &f1,
1316  const Frequency &f2)
1317  {
1318  unsigned int spwId = 0;
1319  return WaterVaporRetrieval_fromFTS(spwId, v_transmission, f1, f2);
1320  }
1327  const vector<double> &v_transmission)
1328  {
1329  Frequency f1(-999, "GHz");
1330  Frequency f2(-999, "GHz");
1331  return WaterVaporRetrieval_fromFTS(spwId, v_transmission, f1, f2);
1332  }
1334  Length WaterVaporRetrieval_fromFTS(unsigned int spwId,
1335  const vector<double> &v_transmission,
1336  const Frequency &f1,
1337  const Frequency &f2);
1338 
1340  Length WaterVaporRetrieval_fromTEBB(const vector<unsigned int> &spwId,
1341  const vector<Percent> &signalGain,
1342  const vector<vector<Temperature> > &vv_tebb,
1343  const vector<vector<double> > &spwId_filters,
1344  double airmass,
1345  const vector<double> &skycoupling,
1346  const vector<Temperature> &tspill);
1347 
1348  Length WaterVaporRetrieval_fromTEBB(const vector<unsigned int> &spwId,
1349  const vector<Percent> &signalGain,
1350  const vector<Temperature> &v_tebb,
1351  const vector<vector<double> > &spwId_filters,
1352  double airmass,
1353  const vector<double> &skycoupling,
1354  const vector<Temperature> &tspill);
1355 
1356  /* to implement in .cpp
1357  Length WaterVaporRetrieval_fromTEBB(unsigned int spwId,
1358  Percent signalGain,
1359  Temperature tebb,
1360  vector<double> spwId_filter,
1361  double airmass,
1362  double skycoupling,
1363  Temperature tspill); */
1364 
1365 
1366  Length WaterVaporRetrieval_fromTEBB(unsigned int spwId,
1367  const Percent &signalGain,
1368  const vector<Temperature> &v_tebb,
1369  const vector<double> &spwId_filter,
1370  double airmass,
1371  double skycoupling,
1372  const Temperature &tspill);
1373 
1374  Length WaterVaporRetrieval_fromTEBB(const vector<unsigned int> &spwId,
1375  const Percent &signalGain,
1376  const vector<Temperature> &v_tebb,
1377  const vector<vector<double> > &spwId_filters,
1378  double airmass,
1379  double skycoupling,
1380  const Temperature &tspill);
1381 
1382  Length WaterVaporRetrieval_fromTEBB(const vector<unsigned int> &spwId,
1383  const Percent &signalGain,
1384  const vector<Temperature> &v_tebb,
1385  double airmass,
1386  double skycoupling,
1387  const Temperature &tspill); // equivalent eliminating the vectors already implemented, see below
1388 
1389  Length WaterVaporRetrieval_fromTEBB(unsigned int spwId,
1390  const vector<Temperature> &v_tebb,
1391  double skycoupling,
1392  const Temperature &tspill);
1393 
1394  Length WaterVaporRetrieval_fromTEBB(const vector<unsigned int> &spwId,
1395  const vector<vector<Temperature> > &vv_tebb,
1396  const vector<double> &skycoupling,
1397  const vector<Temperature> &tspill);
1398 
1399  Length WaterVaporRetrieval_fromTEBB(const vector<unsigned int> &spwId,
1400  const vector<Temperature> &v_tebb,
1401  const vector<double> &skycoupling,
1402  const vector<Temperature> &tspill);
1403 
1404  /* to be implemented in the .cpp
1405  Length WaterVaporRetrieval_fromTEBB(unsigned int spwId,
1406  Temperature tebb,
1407  double skycoupling,
1408  Temperature tspill); */
1409 
1410  Length WaterVaporRetrieval_fromTEBB(unsigned int spwId,
1411  const vector<Temperature> &v_tebb,
1412  const vector<double> &spwId_filter,
1413  double skycoupling,
1414  const Temperature &tspill);
1415 
1416  Length WaterVaporRetrieval_fromTEBB(const vector<unsigned int> &spwId,
1417  const vector<vector<Temperature> > &vv_tebb,
1418  const vector<vector<double> > &spwId_filters,
1419  const vector<double> &skycoupling,
1420  const vector<Temperature> &tspill);
1421 
1422  Length WaterVaporRetrieval_fromTEBB(const vector<unsigned int> &spwId,
1423  const vector<Temperature> &v_tebb,
1424  const vector<vector<double> > &spwId_filters,
1425  const vector<double> &skycoupling,
1426  const vector<Temperature> &tspill);
1427 
1428  /* to be implemented in the .cpp
1429  Length WaterVaporRetrieval_fromTEBB(unsigned int spwId,
1430  Temperature tebb,
1431  vector<double> spwId_filters,
1432  double skycoupling,
1433  Temperature tspill); */
1434 
1435  Length WaterVaporRetrieval_fromTEBB(unsigned int spwId,
1436  const vector<Temperature> &v_tebb,
1437  double airmass,
1438  double skycoupling,
1439  const Temperature &tspill);
1440 
1441  Length WaterVaporRetrieval_fromTEBB(const vector<unsigned int> &spwId,
1442  const vector<vector<Temperature> > &vv_tebb,
1443  double airmass,
1444  const vector<double> &skycoupling,
1445  const vector<Temperature> &tspill);
1446 
1447  Length WaterVaporRetrieval_fromTEBB(const vector<unsigned int> &spwId,
1448  const vector<Temperature> &v_tebb,
1449  double airmass,
1450  const vector<double> &skycoupling,
1451  const vector<Temperature> &tspill);
1452 
1453  /* to be implemented in the .cpp
1454  Length WaterVaporRetrieval_fromTEBB(unsigned int spwId,
1455  const Temperature &tebb,
1456  double airmass,
1457  double skycoupling,
1458  const Temperature &tspill); */
1459 
1460  Length WaterVaporRetrieval_fromTEBB(unsigned int spwId,
1461  const vector<Temperature> &v_tebb,
1462  const vector<double> &spwId_filter,
1463  double airmass,
1464  double skycoupling,
1465  const Temperature &tspill);
1466 
1467  Length WaterVaporRetrieval_fromTEBB(const vector<unsigned int> &spwId,
1468  const vector<vector<Temperature> > &vv_tebb,
1469  const vector<vector<double> > &spwId_filters,
1470  double airmass,
1471  const vector<double> &skycoupling,
1472  const vector<Temperature> &tspill);
1473 
1474  Length WaterVaporRetrieval_fromTEBB(const vector<unsigned int> &spwId,
1475  const vector<Temperature> &v_tebb,
1476  const vector<vector<double> > &spwId_filters,
1477  double airmass,
1478  const vector<double> &skycoupling,
1479  const vector<Temperature> &tspill);
1480 
1481  /* to be implemented in the .cpp
1482  Length WaterVaporRetrieval_fromTEBB(unsigned int spwId,
1483  const Temperature &v_tebb,
1484  const vector<double> &spwId_filter,
1485  double airmass,
1486  double skycoupling,
1487  const Temperature &tspill); */
1488 
1489  Length WaterVaporRetrieval_fromTEBB(unsigned int spwId,
1490  const Percent &signalGain,
1491  const vector<Temperature> &v_tebb,
1492  double skycoupling,
1493  const Temperature &tspill);
1494 
1495  Length WaterVaporRetrieval_fromTEBB(const vector<unsigned int> &spwId,
1496  const vector<Percent> &signalGain,
1497  const vector<vector<Temperature> > &vv_tebb,
1498  const vector<double> &skycoupling,
1499  const vector<Temperature> &tspill);
1500 
1501  Length WaterVaporRetrieval_fromTEBB(const vector<unsigned int> &spwId,
1502  const vector<Percent> &signalGain,
1503  const vector<Temperature> &v_tebb,
1504  const vector<double> &skycoupling,
1505  const vector<Temperature> &tspill);
1506 
1507  /* to be implemented in the .cpp
1508  Length WaterVaporRetrieval_fromTEBB(unsigned int spwId,
1509  const Percent &signalGain,
1510  constr Temperature &v_tebb,
1511  double skycoupling,
1512  const Temperature &tspill); */
1513 
1514  Length WaterVaporRetrieval_fromTEBB(unsigned int spwId,
1515  const Percent &signalGain,
1516  const vector<Temperature> &v_tebb,
1517  const vector<double> &spwId_filter,
1518  double skycoupling,
1519  const Temperature &tspill);
1520 
1521  Length WaterVaporRetrieval_fromTEBB(const vector<unsigned int> &spwId,
1522  const vector<Percent> &signalGain,
1523  const vector<vector<Temperature> > &vv_tebb,
1524  const vector<vector<double> > &spwId_filters,
1525  const vector<double> &skycoupling,
1526  const vector<Temperature> &tspill);
1527 
1528  Length WaterVaporRetrieval_fromTEBB(const vector<unsigned int> &spwId,
1529  const vector<Percent> &signalGain,
1530  const vector<Temperature> &v_tebb,
1531  const vector<vector<double> > &spwId_filters,
1532  const vector<double> &skycoupling,
1533  const vector<Temperature> &tspill);
1534 
1535  /* to be implemented in the .cpp
1536  Length WaterVaporRetrieval_fromTEBB(unsigned int spwId,
1537  const Percent &signalGain,
1538  const Temperature &v_tebb,
1539  const vector<double> &spwId_filter,
1540  double skycoupling,
1541  const Temperature &tspill); */
1542 
1543  Length WaterVaporRetrieval_fromTEBB(unsigned int spwId,
1544  const Percent &signalGain,
1545  const vector<Temperature> &v_tebb,
1546  double airmass,
1547  double skycoupling,
1548  const Temperature &tspill);
1549 
1550  Length WaterVaporRetrieval_fromTEBB(const vector<unsigned int> &spwId,
1551  const vector<Percent> &signalGain,
1552  const vector<vector<Temperature> > &vv_tebb,
1553  double airmass,
1554  const vector<double> &skycoupling,
1555  const vector<Temperature> &tspill);
1556 
1557  Length WaterVaporRetrieval_fromTEBB(const vector<unsigned int> &spwId,
1558  const vector<Percent> &signalGain,
1559  const vector<Temperature> &v_tebb,
1560  double airmass,
1561  const vector<double> &skycoupling,
1562  const vector<Temperature> &tspill);
1563 
1564  // implemented 17/9/09
1565  Length WaterVaporRetrieval_fromTEBB(unsigned int spwId,
1566  const Percent &signalGain,
1567  const Temperature &tebb,
1568  double airmass,
1569  double skycoupling,
1570  const Temperature &tspill);
1571 
1572  double SkyCouplingRetrieval_fromTEBB(unsigned int spwId,
1573  const vector<Temperature> &v_tebb,
1574  double skycoupling,
1575  const Temperature &tspill);
1576 
1577  double SkyCouplingRetrieval_fromTEBB(unsigned int spwId,
1578  const vector<Temperature> &v_tebb,
1579  const vector<double> &spwId_filter,
1580  double skycoupling,
1581  const Temperature &tspill);
1582 
1583  double SkyCouplingRetrieval_fromTEBB(unsigned int spwId,
1584  const vector<Temperature> &v_tebb,
1585  double airmass,
1586  double skycoupling,
1587  const Temperature &tspill);
1588 
1589  double SkyCouplingRetrieval_fromTEBB(unsigned int spwId,
1590  const vector<Temperature> &v_tebb,
1591  const vector<double> &spwId_filter,
1592  double airmass,
1593  double skycoupling,
1594  const Temperature &tspill);
1595 
1597  void setWaterVaporRadiometer(const WaterVaporRadiometer &waterVaporRadiometer)
1598  {
1599  waterVaporRadiometer_ = waterVaporRadiometer;
1600  }
1605  void updateSkyCoupling_fromWVR(vector<WVRMeasurement> &RadiometerData,
1606  unsigned int n,
1607  unsigned int m);
1612  void updateSkyCouplingChannel_fromWVR(vector<WVRMeasurement> &RadiometerData,
1613  unsigned int ichan,
1614  unsigned int n,
1615  unsigned int m);
1616  void updateSkyCoupling_fromWVR(vector<WVRMeasurement> &RadiometerData,
1617  unsigned int n)
1618  {
1619  updateSkyCoupling_fromWVR(RadiometerData, n, n + 1);
1620  }
1621  void updateSkyCoupling_fromWVR(vector<WVRMeasurement> &RadiometerData,
1622  unsigned int n,
1623  unsigned int m,
1624  WaterVaporRadiometer &external_wvr)
1625  {
1626  updateSkyCoupling_fromWVR(RadiometerData, n, m);
1627  external_wvr = waterVaporRadiometer_;
1628  }
1629  void updateSkyCoupling_fromWVR(vector<WVRMeasurement> &RadiometerData,
1630  unsigned int n,
1631  WaterVaporRadiometer &external_wvr)
1632  {
1633  updateSkyCoupling_fromWVR(RadiometerData, n, n + 1);
1634  external_wvr = waterVaporRadiometer_;
1635  }
1638  {
1640  }
1643  {
1645  }
1647  void WaterVaporRetrieval_fromWVR(vector<WVRMeasurement> &RadiometerData,
1648  unsigned int n,
1649  unsigned int m);
1650  void WaterVaporRetrieval_fromWVR(vector<WVRMeasurement> &RadiometerData,
1651  unsigned int n)
1652  {
1653  WaterVaporRetrieval_fromWVR(RadiometerData, n, n + 1);
1654  }
1656  void WaterVaporRetrieval_fromWVR(WVRMeasurement &RadiometerData);
1659  {
1660  return waterVaporRadiometer_;
1661  }
1662 
1663  double
1664  sigmaSkyCouplingRetrieval_fromWVR(double par_fit,
1665  const WaterVaporRadiometer &wvr,
1666  vector<WVRMeasurement> &RadiometerData,
1667  unsigned int n,
1668  unsigned int m);
1669  double sigmaSkyCouplingRetrieval_fromWVR(double par_fit,
1670  const WaterVaporRadiometer &wvr,
1671  vector<WVRMeasurement> &RadiometerData,
1672  unsigned int n)
1673  {
1674  return sigmaSkyCouplingRetrieval_fromWVR(par_fit, wvr, RadiometerData, n, n
1675  + 1);
1676  }
1677 
1678  /*
1679  return the rms of the residuals for one channel ichan, as a function of the multiplicative
1680  factor par_fit to this channel's coupling efficiency.
1681  */
1682  double sigmaSkyCouplingChannelRetrieval_fromWVR(double par_fit,
1683  const WaterVaporRadiometer &wvr,
1684  vector<WVRMeasurement> &RadiometerData,
1685  unsigned int ichan,
1686  unsigned int n,
1687  unsigned int m);
1688  Temperature getWVRAverageSigmaTskyFit(const vector<WVRMeasurement> &RadiometerData,
1689  unsigned int n,
1690  unsigned int m);
1691  Temperature getWVRAverageSigmaTskyFit(const vector<WVRMeasurement> &RadiometerData,
1692  unsigned int n)
1693  {
1694  return getWVRAverageSigmaTskyFit(RadiometerData, n, n + 1);
1695  }
1696  /*
1697  return the rms of fit residual for a single channel, in a measurement
1698  */
1699  Temperature getWVRSigmaChannelTskyFit(const vector<WVRMeasurement> &RadiometerData,
1700  unsigned int ichan,
1701  unsigned int n,
1702  unsigned int m);
1703  /*
1704  return the rms of water vapor retrieved values in a measurnment (n to m)
1705  */
1706  double getSigmaTransmissionFit(unsigned int spwId,
1707  const vector<double> &v_transmission,
1708  double airm,
1709  const Frequency &f1,
1710  const Frequency &f2);
1711  //double getSigmaTransmissionFit(){}
1712  Temperature getSigmaFit(unsigned int spwId,
1713  const vector<Temperature> &v_tebbspec,
1714  double skyCoupling,
1715  const Temperature &Tspill)
1716  {
1717  return getSigmaFit(spwId, v_tebbspec, getUserWH2O(), skyCoupling, Tspill);
1718  }
1719  Temperature getSigmaFit(unsigned int spwId,
1720  const vector<Temperature> &v_tebbspec,
1721  const Length &wh2o,
1722  double skyCoupling,
1723  const Temperature &Tspill)
1724  {
1725  return getSigmaFit(spwId,
1726  v_tebbspec,
1727  wh2o,
1728  getAirMass(),
1729  skyCoupling,
1730  Tspill);
1731  }
1732  Temperature getSigmaFit(unsigned int spwId,
1733  const vector<Temperature> &v_tebbspec,
1734  double airmass,
1735  double skyCoupling,
1736  const Temperature &Tspill)
1737  {
1738  return getSigmaFit(spwId,
1739  v_tebbspec,
1740  getUserWH2O(),
1741  airmass,
1742  skyCoupling,
1743  Tspill);
1744  }
1745  Temperature getSigmaFit(unsigned int spwId,
1746  const vector<Temperature> &v_tebbspec,
1747  const Length &wh2o,
1748  double airmass,
1749  double skyCoupling,
1750  const Temperature &Tspill);
1751 
1753 
1754 protected:
1755 
1756  double airMass_;
1759  WaterVaporRadiometer waterVaporRadiometer_; // !< Identifiers, sky coupling, and sideband gain of channels corresponding to the water vapor radiometer.
1761 
1762 
1763  void iniSkyStatus();
1764  bool updateProfilesAndRadiance(const Length &altitude,
1765  const Pressure &groundPressure,
1766  const Temperature &groundTemperature,
1767  double tropoLapseRate,
1768  const Humidity &relativeHumidity,
1769  const Length &wvScaleHeight);
1770  void rmSkyStatus();
1771 
1772  Length mkWaterVaporRetrieval_fromFTS(unsigned int spwId,
1773  const vector<double> &v_transmission,
1774  //double airm, // unused parameter
1775  const Frequency &f1,
1776  const Frequency &f2);
1777 
1779  const Percent &signalGain,
1780  const vector<Temperature> &v_measuredSkyTEBB,
1781  double airm,
1782  const vector<double> &spwId_filter,
1783  double skycoupling,
1784  const Temperature &tspill)
1785  {
1787  vector<unsigned int>(1, spwId),
1788  vector<Percent>(1, signalGain),
1789  vector<vector<Temperature> >(1, v_measuredSkyTEBB),
1790  airm,
1791  vector<vector<double> >(1, spwId_filter),
1792  vector<double>(1, skycoupling),
1793  vector<Temperature>(1, tspill));
1794  }
1795 
1796  Length
1797  mkWaterVaporRetrieval_fromTEBB(const vector<unsigned int> &spwId,
1798  const vector<Percent> &signalGain,
1799  const vector<vector<Temperature> > &measuredSkyTEBB,
1800  double airm,
1801  const vector<vector<double> > &spwId_filters,
1802  const vector<double> &skycoupling,
1803  const vector<Temperature> &tspill);
1804 
1805  Length
1806  mkWaterVaporRetrieval_fromTEBB(const vector<unsigned int> &spwId,
1807  const vector<Percent> &signalGain,
1808  const vector<Temperature> &measuredAverageSkyTEBB,
1809  double airm,
1810  const vector<vector<double> > &spwId_filters,
1811  const vector<double> &skycoupling,
1812  const vector<Temperature> &tspill);
1813 
1814  double mkSkyCouplingRetrieval_fromTEBB(unsigned int spwId,
1815  const Percent &signalGain,
1816  const vector<Temperature> &measuredSkyTEBB,
1817  double airm,
1818  const vector<double> &spwId_filter,
1819  double skycoupling,
1820  const Temperature &tspill);
1821 
1823  mkWaterVaporRetrieval_fromWVR(const vector<Temperature> &measuredSkyBrightnessVector,
1824  const vector<unsigned int> &radiometricChannels,
1825  const vector<double> &skyCoupling,
1826  const vector<Percent> &signalGain,
1827  const Temperature &spilloverTemperature,
1828  const Angle &elevation);
1829 
1830  double RT(double pfit_wh2o,
1831  double skycoupling,
1832  double tspill,
1833  unsigned int spwid,
1834  unsigned int nc)
1835  {
1836  return RT(pfit_wh2o, skycoupling, tspill, airMass_, spwid, nc);
1837  }
1838  double RT(double pfit_wh2o,
1839  double skycoupling,
1840  double tspill,
1841  unsigned int spwid)
1842  {
1843  return RT(pfit_wh2o, skycoupling, tspill, airMass_, spwid);
1844  }
1845  double RT(double pfit_wh2o,
1846  double skycoupling,
1847  double tspill,
1848  double airmass,
1849  unsigned int spwId,
1850  unsigned int nc);
1851 
1852  double RT(double pfit_wh2o,
1853  double skycoupling,
1854  double tspill,
1855  double airmass,
1856  unsigned int spwid)
1857  {
1858  double tebb_channel = 0.0;
1859  for(unsigned int n = 0; n < v_numChan_[spwid]; n++) {
1860  tebb_channel = tebb_channel + RT(pfit_wh2o,
1861  skycoupling,
1862  tspill,
1863  airmass,
1864  spwid,
1865  n) / (v_numChan_[spwid]);
1866  }
1867  return tebb_channel;
1868  }
1869 
1870  double RT(double pfit_wh2o,
1871  double skycoupling,
1872  double tspill,
1873  unsigned int spwid,
1874  const Percent &signalgain)
1875  {
1876  vector<double> spwId_filter;
1877  for(unsigned int n = 0; n < v_numChan_[spwid]; n++) {
1878  spwId_filter.push_back(1.0);
1879  }
1880  return RT(pfit_wh2o,
1881  skycoupling,
1882  tspill,
1883  airMass_,
1884  spwid,
1885  spwId_filter,
1886  signalgain);
1887  }
1888 
1889  double RT(double pfit_wh2o,
1890  double skycoupling,
1891  double tspill,
1892  double airmass,
1893  unsigned int spwid,
1894  const Percent &signalgain)
1895  {
1896  vector<double> spwId_filter;
1897  for(unsigned int n = 0; n < v_numChan_[spwid]; n++) {
1898  spwId_filter.push_back(1.0);
1899  }
1900  return RT(pfit_wh2o,
1901  skycoupling,
1902  tspill,
1903  airmass,
1904  spwid,
1905  spwId_filter,
1906  signalgain);
1907  }
1908 
1909  double RT(double pfit_wh2o,
1910  double skycoupling,
1911  double tspill,
1912  unsigned int spwid,
1913  const vector<double> &spwId_filter)
1914  {
1915  return RT(pfit_wh2o,
1916  skycoupling,
1917  tspill,
1918  airMass_,
1919  spwid,
1920  spwId_filter,
1921  Percent(100.0, "%"));
1922  }
1923 
1924  double RT(double pfit_wh2o,
1925  double skycoupling,
1926  double tspill,
1927  unsigned int spwid,
1928  const vector<double> &spwId_filter,
1929  const Percent &signalgain)
1930  {
1931  return RT(pfit_wh2o,
1932  skycoupling,
1933  tspill,
1934  airMass_,
1935  spwid,
1936  spwId_filter,
1937  signalgain);
1938  }
1939 
1940  double RT(double pfit_wh2o,
1941  double skycoupling,
1942  double tspill,
1943  double airmass,
1944  unsigned int spwid,
1945  const vector<double> &spwId_filter,
1946  const Percent &signalgain);
1947 
1948 
1949  double RTRJ(double pfit_wh2o,
1950  double skycoupling,
1951  double tspill,
1952  unsigned int spwid,
1953  unsigned int nc)
1954  {
1955  return RTRJ(pfit_wh2o, skycoupling, tspill, airMass_, spwid, nc);
1956  }
1957  double RTRJ(double pfit_wh2o,
1958  double skycoupling,
1959  double tspill,
1960  unsigned int spwid)
1961  {
1962  return RTRJ(pfit_wh2o, skycoupling, tspill, airMass_, spwid);
1963  }
1964  double RTRJ(double pfit_wh2o,
1965  double skycoupling,
1966  double tspill,
1967  double airmass,
1968  unsigned int spwId,
1969  unsigned int nc);
1970 
1971  double RTRJ(double pfit_wh2o,
1972  double skycoupling,
1973  double tspill,
1974  double airmass,
1975  unsigned int spwid)
1976  {
1977  double trj_channel = 0.0;
1978  for(unsigned int n = 0; n < v_numChan_[spwid]; n++) {
1979  trj_channel = trj_channel + RTRJ(pfit_wh2o,
1980  skycoupling,
1981  tspill,
1982  airmass,
1983  spwid,
1984  n) / (v_numChan_[spwid]);
1985  }
1986  return trj_channel;
1987  }
1988 
1989  double RTRJ(double pfit_wh2o,
1990  double skycoupling,
1991  double tspill,
1992  unsigned int spwid,
1993  const Percent &signalgain)
1994  {
1995  vector<double> spwId_filter;
1996  for(unsigned int n = 0; n < v_numChan_[spwid]; n++) {
1997  spwId_filter.push_back(1.0);
1998  }
1999  return RTRJ(pfit_wh2o,
2000  skycoupling,
2001  tspill,
2002  airMass_,
2003  spwid,
2004  spwId_filter,
2005  signalgain);
2006  }
2007 
2008  double RTRJ(double pfit_wh2o,
2009  double skycoupling,
2010  double tspill,
2011  double airmass,
2012  unsigned int spwid,
2013  const Percent &signalgain)
2014  {
2015  vector<double> spwId_filter;
2016  for(unsigned int n = 0; n < v_numChan_[spwid]; n++) {
2017  spwId_filter.push_back(1.0);
2018  }
2019  return RTRJ(pfit_wh2o,
2020  skycoupling,
2021  tspill,
2022  airmass,
2023  spwid,
2024  spwId_filter,
2025  signalgain);
2026  }
2027 
2028  double RTRJ(double pfit_wh2o,
2029  double skycoupling,
2030  double tspill,
2031  unsigned int spwid,
2032  const vector<double> &spwId_filter)
2033  {
2034  return RTRJ(pfit_wh2o,
2035  skycoupling,
2036  tspill,
2037  airMass_,
2038  spwid,
2039  spwId_filter,
2040  Percent(100.0, "%"));
2041  }
2042 
2043  double RTRJ(double pfit_wh2o,
2044  double skycoupling,
2045  double tspill,
2046  unsigned int spwid,
2047  const vector<double> &spwId_filter,
2048  const Percent &signalgain)
2049  {
2050  return RTRJ(pfit_wh2o,
2051  skycoupling,
2052  tspill,
2053  airMass_,
2054  spwid,
2055  spwId_filter,
2056  signalgain);
2057  }
2058 
2059  double RTRJ(double pfit_wh2o,
2060  double skycoupling,
2061  double tspill,
2062  double airmass,
2063  unsigned int spwid,
2064  const vector<double> &spwId_filter,
2065  const Percent &signalgain);
2066 
2067 
2068 private:
2069 
2070  // no accessors provided for these
2073 
2074 }; // class SkyStatus
2075 
2077 
2078 #endif
#define ATM_NAMESPACE_END
Definition: ATMCommon.h:38
Temperature getAverageTrjSky(const Length &wh2o, double skycoupling, const Temperature &Tspill)
Accesor to the average Rayleigh-Jeans Temperature in spectral window 0, for the current conditions...
Definition: ATMSkyStatus.h:523
Opacity getTotalOpacity(unsigned int spwid, unsigned int nc)
Definition: ATMSkyStatus.h:860
Angle getNonDispersiveH2OPhaseDelay()
Accesor to get the integrated zenith H2O Atmospheric Phase Delay (Non-Dispersive part) for the curren...
Definition: ATMSkyStatus.h:973
Opacity getAverageO2LinesOpacity(unsigned int spwid)
Opacity getDryOpacity(unsigned int nc)
Definition: ATMSkyStatus.h:810
Length getUserWH2O() const
Accessor to get the user water vapor column.
Definition: ATMSkyStatus.h:152
Temperature getAverageTebbSky(unsigned int spwid, const Length &wh2o)
Accesor to the average Equivalent Blackbody Temperature in spectral window spwid, for the current con...
Definition: ATMSkyStatus.h:219
Temperature getTrjSky(unsigned int spwid, unsigned int nc)
Accesor to the Rayleigh-Jeans Temperature in spectral window spwid and channel nc, for the currnet (user) Water Vapor Column, the current Air Mass, and perfect Sky Coupling to the sky.
Definition: ATMSkyStatus.h:609
This is an auxiliary class that allows to create objects corresponding to measurements (and their ana...
Opacity getAverageNO2LinesOpacity(unsigned int spwid)
Opacity getWetOpacity(unsigned int nc)
Accesor to get the integrated zenith Wet Opacity for the current conditions, for the point nc of spec...
Definition: ATMSkyStatus.h:770
void updateSkyCoupling_fromWVR(vector< WVRMeasurement > &RadiometerData, unsigned int n, unsigned int m, WaterVaporRadiometer &external_wvr)
std::vector< unsigned int > v_transfertId_
Opacity getAverageDryContOpacity(unsigned int spwid)
Opacity getAverageH2OContOpacity(unsigned int spwid)
Definition: ATMSkyStatus.h:800
double getAverageH2OPathLengthDerivative(unsigned int spwid)
Temperature getTebbSky(unsigned int nc, const Length &wh2o, double airmass, double skycoupling, const Temperature &Tspill)
Accesor to the Equivalent Blackbody Temperature in spectral window 0 and channel nc, for Water Column wh2o, Air Mass airmass, Sky Coupling skycoupling, and Spill Over Temperature Tspill.
Definition: ATMSkyStatus.h:459
Temperature getAverageTebbSky(double airmass, double skycoupling, const Temperature &Tspill)
Accesor to the average Equivalent Blackbody Temperature in spectral window 0, for the current conditi...
Definition: ATMSkyStatus.h:259
Temperature getAverageTrjSky(double airmass)
Accesor to the average Rayleigh-Jeans Temperature in spectral window 0, for the current conditions...
Definition: ATMSkyStatus.h:510
Length getAverageO2LinesPathLength()
Opacity getAverageDryContOpacity(unsigned int spwid)
Definition: ATMSkyStatus.h:847
Length mkWaterVaporRetrieval_fromFTS(unsigned int spwId, const vector< double > &v_transmission, const Frequency &f1, const Frequency &f2)
double RT(double pfit_wh2o, double skycoupling, double tspill, unsigned int spwid)
Opacity getH2OContOpacity(unsigned int spwid, unsigned int nc)
Accesor to get the integrated zenith H2O Continuum Opacity for the current conditions, for the point nc of spectral window spwid.
Definition: ATMSkyStatus.h:920
double sigmaSkyCouplingRetrieval_fromWVR(double par_fit, const WaterVaporRadiometer &wvr, vector< WVRMeasurement > &RadiometerData, unsigned int n)
ATM_NAMESPACE_BEGIN typedef ATM_NAMESPACE::Percent Humidity
Definition: ATMHumidity.h:37
Opacity getWetOpacityUpTo(Length refalti)
Definition: ATMSkyStatus.h:765
Temperature getAverageTebbSky(const Length &wh2o)
Accesor to the average Equivalent Blackbody Temperature in spectral window 0, for the current conditi...
Definition: ATMSkyStatus.h:216
Opacity getAverageN2OLinesOpacity(unsigned int spwid)
double get() const
Accessor to the temperature value in International System units (K)
This is an axuliary class to SkyStatus that allows to identify the spectral windows that actually cor...
Length getGroundWH2O() const
Method to get the zenith column of water vapor.
Length WaterVaporRetrieval_fromTEBB(const vector< unsigned int > &spwId, const vector< Percent > &signalGain, const vector< vector< Temperature > > &vv_tebb, const vector< vector< double > > &spwId_filters, double airmass, const vector< double > &skycoupling, const vector< Temperature > &tspill)
Zenith Water Vapor column retrieval based on fitting measured brightness temperatures of the atmosphe...
Opacity getAverageH2OContOpacity(const Length &integratedwatercolumn, unsigned int spwid)
Opacity getH2OLinesOpacity()
Accesor to get the integrated zenith H2O Lines Opacity for the current conditions, for a single frequency RefractiveIndexProfile object or for the point 0 of spectral window 0 of a multi-window RefractiveIndexProfile object.
Definition: ATMSkyStatus.h:889
Temperature getAverageTrjSky(double airmass, double skycoupling, const Temperature &Tspill)
Accesor to the average Rayleigh-Jeans Temperature in spectral window 0, for the current conditions...
Definition: ATMSkyStatus.h:540
double sigmaSkyCouplingRetrieval_fromWVR(double par_fit, const WaterVaporRadiometer &wvr, vector< WVRMeasurement > &RadiometerData, unsigned int n, unsigned int m)
double RTRJ(double pfit_wh2o, double skycoupling, double tspill, unsigned int spwid, const Percent &signalgain)
Temperature getAverageTebbSky(unsigned int spwid)
Accesor to the average Equivalent Blackbody Temperature in spectral window spwid, for the current con...
Definition: ATMSkyStatus.h:206
bool spwidAndIndexAreValid(unsigned int spwid, unsigned int idx)
Method to assess if a channel frequency index of a given spectral window is valid.
Temperature getTebbSky(unsigned int spwid, unsigned int nc)
Accesor to the Equivalent Blackbody Temperature in spectral window spwid and channel nc...
Definition: ATMSkyStatus.h:328
Temperature getTebbSky(unsigned int nc, double airmass)
Accesor to the Equivalent Blackbody Temperature in spectral window 0 and channel nc, for the currnet (user) Water Vapor Column, Air Mass airmass, and perfect Sky Coupling to the sky.
Definition: ATMSkyStatus.h:346
Length mkWaterVaporRetrieval_fromTEBB(unsigned int spwId, const Percent &signalGain, const vector< Temperature > &v_measuredSkyTEBB, double airm, const vector< double > &spwId_filter, double skycoupling, const Temperature &tspill)
void WaterVaporRetrieval_fromWVR(vector< WVRMeasurement > &RadiometerData, unsigned int n, unsigned int m)
Performs water vapor retrieval for WVR measurement sets between n and m.
Temperature getAverageTebbSky()
Accesor to the average Equivalent Blackbody Temperature in spectral window 0, for the current conditi...
Definition: ATMSkyStatus.h:199
Opacity getAverageCOLinesOpacity(unsigned int spwid)
Definition: ATMSkyStatus.h:843
Opacity getAverageN2OLinesOpacity(unsigned int spwid)
Definition: ATMSkyStatus.h:831
double RT(double pfit_wh2o, double skycoupling, double tspill, unsigned int spwid, unsigned int nc)
Temperature getTebbSky(unsigned int spwid, unsigned int nc, double airmass)
Accesor to the Equivalent Blackbody Temperature in spectral window spwid and channel nc...
Definition: ATMSkyStatus.h:353
double RTRJ(double pfit_wh2o, double skycoupling, double tspill, unsigned int spwid, const vector< double > &spwId_filter)
Temperature getSigmaFit(unsigned int spwId, const vector< Temperature > &v_tebbspec, double skyCoupling, const Temperature &Tspill)
double getSigmaTransmissionFit(){}
void setAirMass(double airMass)
Setter for air mass in SkyStatus without performing water vapor retrieval.
Definition: ATMSkyStatus.h:177
Temperature getAverageTrjSky()
Accesor to the average Rayleigh-Jeans Temperature in spectral window 0, for the current conditions a...
Definition: ATMSkyStatus.h:480
SidebandType
Defines the kind of sideband separations.
Temperature getTrjSky(unsigned int nc, double airmass, double skycoupling, const Temperature &Tspill)
Accesor to the Rayleigh-Jeans Temperature in spectral window 0 and channel nc, for the current User W...
Definition: ATMSkyStatus.h:720
double RT(double pfit_wh2o, double skycoupling, double tspill, unsigned int spwid, const vector< double > &spwId_filter, const Percent &signalgain)
Temperature getAverageTebbSky(unsigned int spwid, double airmass)
Accesor to the average Equivalent Blackbody Temperature in spectral window spwid, for the current con...
Definition: ATMSkyStatus.h:232
Opacity getAverageWetOpacity(const Length &integratedwatercolumn, unsigned int spwid)
Angle getAverageNonDispersiveH2OPhaseDelay()
Accessor to get the average integrated zenith Atmospheric Phase Delay (Non-Dispersive part) in spectr...
bool updateProfilesAndRadiance(const Length &altitude, const Pressure &groundPressure, const Temperature &groundTemperature, double tropoLapseRate, const Humidity &relativeHumidity, const Length &wvScaleHeight)
Temperature getAverageTrjSky(double skycoupling, const Temperature &Tspill)
Accesor to the average Rayleigh-Jeans Temperature in spectral window 0 for the current conditions...
Definition: ATMSkyStatus.h:557
void updateSkyCouplingChannel_fromWVR(vector< WVRMeasurement > &RadiometerData, unsigned int ichan, unsigned int n, unsigned int m)
Performs a sky coupling retrieval using WVR measurement sets between n and m (obtains the ratio betwe...
WVRMeasurement mkWaterVaporRetrieval_fromWVR(const vector< Temperature > &measuredSkyBrightnessVector, const vector< unsigned int > &radiometricChannels, const vector< double > &skyCoupling, const vector< Percent > &signalGain, const Temperature &spilloverTemperature, const Angle &elevation)
Temperature getWVRAverageSigmaTskyFit(const vector< WVRMeasurement > &RadiometerData, unsigned int n, unsigned int m)
Opacity getWetOpacityUpTo(unsigned int nc, Length refalti)
Definition: ATMSkyStatus.h:771
Temperature sigma_TEBBfit_
double RT(double pfit_wh2o, double skycoupling, double tspill, unsigned int spwid, const vector< double > &spwId_filter)
Opacity getAverageH2OLinesOpacity(unsigned int spwid)
Definition: ATMSkyStatus.h:795
Temperature getTrjSky(unsigned int nc, double skycoupling, const Temperature &Tspill)
Accesor to the Rayleigh-Jeans Temperature in spectral window 0 and channel nc, for the current (user)...
Definition: ATMSkyStatus.h:661
Opacity getDryOpacity()
Function to retrieve the integrated Dry Opacity along the atmospheric path for single frequency Refra...
Temperature getTrjSky(unsigned int nc)
Accesor to the Rayleigh-Jeans Temperature in spectral window 0 and channel nc, for the currnet (user)...
Definition: ATMSkyStatus.h:598
Length getAverageH2OPathLength(unsigned int spwid)
void updateSkyCoupling_fromWVR(vector< WVRMeasurement > &RadiometerData, unsigned int n, unsigned int m)
Performs a sky coupling retrieval using WVR measurement sets between n and m (obtains the ratio betwe...
Opacity getAverageSO2LinesOpacity(unsigned int spwid)
double RTRJ(double pfit_wh2o, double skycoupling, double tspill, unsigned int spwid)
Temperature getTrjSky(unsigned int nc, const Length &wh2o)
Accesor to the Rayleigh-Jeans Temperature in spectral window 0 and channel nc, for Water Vapor Column...
Definition: ATMSkyStatus.h:648
Opacity getTotalOpacityUpTo(unsigned int spwid, unsigned int nc, Length refalti)
Definition: ATMSkyStatus.h:878
void addNewSpectralWindow(unsigned int numChan, unsigned int refChan, double *chanFreq, const string &freqUnits)
Setter of new spectral windows (adds frequencies to the SpectralGrid and calculates the corresponding...
Temperature getTrjSky(double airmass)
Accesor to the Rayleigh-Jeans Temperature in spectral window 0 and channel 0, for the currnet (user) ...
Definition: ATMSkyStatus.h:620
Opacity getTotalOpacity(unsigned int nc)
Definition: ATMSkyStatus.h:856
Temperature getTebbSky(unsigned int spwid, unsigned int nc, double airmass, double skycoupling, const Temperature &Tspill)
Accesor to the Equivalent Blackbody Temperature in spectral window spwid and channel nc...
Definition: ATMSkyStatus.h:449
Opacity getAverageO3LinesOpacity(unsigned int spwid)
void setSkyBackgroundTemperature(const Temperature &skyBackgroundTemperature)
Setter for sky background temperature in SkyStatus without performing water vapor retrieval...
Definition: ATMSkyStatus.h:188
Opacity getH2OLinesOpacityUpTo(Length refalti)
Definition: ATMSkyStatus.h:890
double sigmaSkyCouplingChannelRetrieval_fromWVR(double par_fit, const WaterVaporRadiometer &wvr, vector< WVRMeasurement > &RadiometerData, unsigned int ichan, unsigned int n, unsigned int m)
Opacity getDryOpacity()
Definition: ATMSkyStatus.h:806
void addNewSpectralWindow(unsigned int numChan, double refFreq, const vector< double > &chanFreq, const string &freqUnits)
Setter of new spectral windows (adds frequencies to the SpectralGrid and calculates the corresponding...
Opacity getWetOpacity()
Accesor to get the integrated zenith Wet Opacity for the current conditions, for a single frequency R...
Definition: ATMSkyStatus.h:764
double getAverageNonDispersiveDryPathLength_GroundTemperatureDerivative(unsigned int spwid)
Temperature getTebbSky(unsigned int spwid, unsigned int nc, const Length &wh2o)
Accesor to the Equivalent Blackbody Temperature in spectral window spwid and channel nc...
Definition: ATMSkyStatus.h:374
Opacity getAverageO3LinesOpacity(unsigned int spwid)
Definition: ATMSkyStatus.h:827
Temperature getTrjSky(unsigned int nc, double airmass)
Accesor to the Rayleigh-Jeans Temperature in spectral window 0 and channel nc, for the currnet (user)...
Definition: ATMSkyStatus.h:627
Length getAverageDispersiveDryPathLength(unsigned int spwid)
void addNewSpectralWindow(unsigned int numChan, unsigned int refChan, const Frequency &refFreq, const Frequency &chanSep, const Frequency &intermediateFreq, const SidebandSide &sbSide, const SidebandType &sbType)
Setter of new spectral windows (adds frequencies to the SpectralGrid and calculates the corresponding...
Opacity getTotalOpacityUpTo(unsigned int nc, Length refalti)
Opacity getTotalOpacityUpTo(unsigned int nc, Length refalti);.
Definition: ATMSkyStatus.h:874
Temperature getTrjSky(unsigned int spwid, unsigned int nc, double airmass)
Accesor to the Rayleigh-Jeans Temperature in spectral window spwid and channel nc, for the currnet (user) Water Vapor Column, Air Mass airmass, and perfect Sky Coupling to the sky.
Definition: ATMSkyStatus.h:634
From the layerThickness and layerTemperature arrays (from AtmProfile), the RefractiveIndexProfile arr...
Definition: ATMSkyStatus.h:57
SidebandSide
Defines the side of a sideband.
Temperature getTebbSky(unsigned int nc)
Accesor to the Equivalent Blackbody Temperature in spectral window 0 and channel nc, for the currnet (user) Water Vapor Column, the current Air Mass, and perfect Sky Coupling to the sky.
Definition: ATMSkyStatus.h:317
double RTRJ(double pfit_wh2o, double skycoupling, double tspill, unsigned int spwid, const vector< double > &spwId_filter, const Percent &signalgain)
Opacity getH2OContOpacity()
Accesor to get the integrated zenith H2O Continuum Opacity for the current conditions, for a single frequency RefractiveIndexProfile object or for the point 0 of spectral window 0 of a multi-window RefractiveIndexProfile object.
Definition: ATMSkyStatus.h:908
Temperature getTebbSky(unsigned int nc, double airmass, double skycoupling, const Temperature &Tspill)
Accesor to the Equivalent Blackbody Temperature in spectral window 0 and channel nc, for the current User Water Column, Air Mass airmass, Sky Coupling skycoupling, and Spill Over Temperature Tspill.
Definition: ATMSkyStatus.h:439
double RT(double pfit_wh2o, double skycoupling, double tspill, double airmass, unsigned int spwid)
double RTRJ(double pfit_wh2o, double skycoupling, double tspill, double airmass, unsigned int spwid)
Opacity getDryOpacityUpTo(Length refalti)
Percent getWaterVaporRadiometerSignalGain(int n) const
Accessor to the sky coupling of channel n of the Water Vapor Radiometer.
vector< double > getSkyCoupling() const
Accessor to Sky coupling of the different radiometric channels (vector of double) ...
Temperature getWVRAverageSigmaTskyFit(const vector< WVRMeasurement > &RadiometerData, unsigned int n)
double getSigmaTransmissionFit(unsigned int spwId, const vector< double > &v_transmission, double airm, const Frequency &f1, const Frequency &f2)
#define ATM_NAMESPACE_BEGIN
Definition: ATMCommon.h:37
Length WaterVaporRetrieval_fromFTS(unsigned int spwId, const vector< double > &v_transmission)
Zenith Water Vapor column retrieval based on fitting the vector of zenith atmospheric transmission gi...
Angle getDispersiveH2OPhaseDelay()
Accesor to get the integrated zenith H2O Atmospheric Phase Delay (Dispersive part) for the current co...
Definition: ATMSkyStatus.h:927
vector< Percent > getsignalGain() const
Accessor to signalGain of the different radiometric channels (vector of percent)
Temperature getTrjSky(unsigned int spwid, unsigned int nc, const Length &wh2o, double airmass)
Accesor to the Rayleigh-Jeans Temperature in spectral window spwid and channel nc, for Water Vapor Column wh2o, Air Mass airmass, and perfect Sky Coupling to the sky.
Definition: ATMSkyStatus.h:691
Temperature getTrjSky(unsigned int spwid, unsigned int nc, const Length &wh2o)
Accesor to the Rayleigh-Jeans Temperature in spectral window spwid and channel nc, for Water Vapor Column wh2o, the current Air Mass, and perfect Sky Coupling to the sky.
Definition: ATMSkyStatus.h:655
Temperature getAverageTebbSky(const Length &wh2o, double skycoupling, const Temperature &Tspill)
Accesor to the average Equivalent Blackbody Temperature in spectral window 0, for the current conditi...
Definition: ATMSkyStatus.h:242
Temperature getTebbSky(unsigned int spwid, unsigned int nc, const Length &wh2o, double skycoupling, const Temperature &Tspill)
Accesor to the Equivalent Blackbody Temperature in spectral window spwid and channel nc...
Definition: ATMSkyStatus.h:429
Length getAverageNonDispersiveDryPathLength()
Opacity getH2OLinesOpacity(unsigned int spwid, unsigned int nc)
Accesor to get the integrated zenith H2O Lines Opacity for the current conditions, for the point nc of spectral window spwid.
Definition: ATMSkyStatus.h:901
double getAverageH2OPathLengthDerivative()
Length getAverageO2LinesPathLength(unsigned int spwid)
Function to retrieve the average integrated Atmospheric Path Length (due to O2 Lines) in spectral Win...
Opacity getAverageWetOpacity(unsigned int spwid)
Accesor to get the average Wet Opacity for the current conditions, in spectral window spwid...
Definition: ATMSkyStatus.h:790
Temperature getAverageTrjSky(unsigned int spwid, double skycoupling, const Temperature &Tspill)
Accesor to the average Rayleigh-Jeans Temperature in spectral window spwid for the current conditions...
Definition: ATMSkyStatus.h:564
Opacity getH2OContOpacityUpTo(Length refalti)
Definition: ATMSkyStatus.h:909
Length getAverageO2LinesPathLength(unsigned int spwid)
Temperature getAverageTrjSky(unsigned int spwid, const Length &wh2o, double skycoupling, const Temperature &Tspill)
Accesor to the average Rayleigh-Jeans Temperature in spectral window spwid, for the current condition...
Definition: ATMSkyStatus.h:531
Temperature getAverageTrjSky(unsigned int spwid, const Length &wh2o)
Accesor to the average Rayleigh-Jeans Temperature in spectral window spwid, for the current condition...
Definition: ATMSkyStatus.h:500
Opacity getAverageH2OLinesOpacity(const Length &integratedwatercolumn, unsigned int spwid)
Temperature getAverageTebbSky(unsigned int spwid, const Length &wh2o, double skycoupling, const Temperature &Tspill)
Accesor to the average Equivalent Blackbody Temperature in spectral window spwid, for the current con...
Definition: ATMSkyStatus.h:250
WaterVaporRadiometer getWaterVaporRadiometer() const
Accessor to get or check the water vapor radiometer channels.
Length getDispersiveH2OPathLength()
Accesor to get the integrated zenith H2O Atmospheric Path length (Dispersive part) for the current co...
Definition: ATMSkyStatus.h:950
void iniSkyStatus()
Basic Method initialize the class when using the constructors.
double SkyCouplingRetrieval_fromTEBB(unsigned int spwId, const vector< Temperature > &v_tebb, double skycoupling, const Temperature &tspill)
Length wh2o_user_
Water vapor column used for radiative transfer calculations. If not provided,.
Length getAverageSO2LinesPathLength(unsigned int spwid)
Function to retrieve the average integrated Atmospheric Path Length (due to SO2 Lines) in spectral Wi...
Temperature getTebbSky(unsigned int nc, const Length &wh2o)
Accesor to the Equivalent Blackbody Temperature in spectral window 0 and channel nc, for Water Vapor Column wh2o, the current Air Mass, and perfect Sky Coupling to the sky.
Definition: ATMSkyStatus.h:367
Profile of the absorption and Phase coefficient(s) at given frequency(ies) for an atmospheric profile...
Opacity getAverageNO2LinesOpacity(unsigned int spwid)
Definition: ATMSkyStatus.h:835
Temperature getTrjSky(unsigned int spwid, unsigned int nc, double skycoupling, const Temperature &Tspill)
Accesor to the Rayleigh-Jeans Temperature in spectral window spwid and channel nc, for the current (user) Water Vapor Column and Air Mass, Sky Coupling skycoupling, and Spill Over Temperature Tspill.
Definition: ATMSkyStatus.h:670
Temperature getTebbSky()
Accesor to the Equivalent Blackbody Temperature in spectral window 0 and channel 0, for the currnet (user) Water Vapor Column, the current Air Mass, and perfect Sky Coupling to the sky.
Definition: ATMSkyStatus.h:310
Length getAverageN2OLinesPathLength(unsigned int spwid)
Function to retrieve the average integrated Atmospheric Path Length (due to N2O Lines) in spectral Wi...
Temperature getAverageTebbSky(unsigned int spwid, double skycoupling, const Temperature &Tspill)
Accesor to the average Equivalent Blackbody Temperature in spectral window spwid for the current cond...
Definition: ATMSkyStatus.h:283
Temperature getAverageTrjSky(unsigned int spwid, double airmass, double skycoupling, const Temperature &Tspill)
Accesor to the average Rayleigh-Jeans Temperature in spectral window spwid, for the current condition...
Definition: ATMSkyStatus.h:548
Temperature getTrjSky(const Length &wh2o)
Accesor to the Rayleigh-Jeans Temperature in spectral window 0 and channel 0, for Water Vapor Column ...
Definition: ATMSkyStatus.h:641
Opacity getAverageTotalOpacity(unsigned int spwid)
Definition: ATMSkyStatus.h:864
double getAverageNonDispersiveDryPathLength_GroundPressureDerivative(unsigned int spwid)
unsigned int add(unsigned int numChan, unsigned int refChan, const Frequency &refFreq, const Frequency &chanSep)
Add a new spectral window, uniformly sampled, this spectral window having no sideband.
Temperature getAverageTebbSky(unsigned int spwid, double airmass, double skycoupling, const Temperature &Tspill)
Accesor to the average Equivalent Blackbody Temperature in spectral window spwid, for the current con...
Definition: ATMSkyStatus.h:267
Defines pressure with units.
Definition: ATMPressure.h:43
Length getAverageH2OPathLength()
Temperature getAverageTebbSky(double airmass)
Accesor to the average Equivalent Blackbody Temperature in spectral window 0, for the current conditi...
Definition: ATMSkyStatus.h:229
double RTRJ(double pfit_wh2o, double skycoupling, double tspill, unsigned int spwid, unsigned int nc)
Temperature getWVRSigmaChannelTskyFit(const vector< WVRMeasurement > &RadiometerData, unsigned int ichan, unsigned int n, unsigned int m)
Temperature getAverageTebbSky(double skycoupling, const Temperature &Tspill)
Accesor to the average Equivalent Blackbody Temperature in spectral window 0 for the current conditio...
Definition: ATMSkyStatus.h:276
void setWaterVaporRadiometer(const WaterVaporRadiometer &waterVaporRadiometer)
(Re)setter of water vapor radiometer channels
Temperature getTrjSky(unsigned int spwid, unsigned int nc, double airmass, double skycoupling, const Temperature &Tspill)
Accesor to the Rayleigh-Jeans Temperature in spectral window spwid and channel nc, for the current User Water Column, Air Mass airmass, Sky Coupling skycoupling, and Spill Over Temperature Tspill.
Definition: ATMSkyStatus.h:730
void updateSkyCoupling_fromWVR(vector< WVRMeasurement > &RadiometerData, unsigned int n)
Temperature getSigmaFit(unsigned int spwId, const vector< Temperature > &v_tebbspec, const Length &wh2o, double skyCoupling, const Temperature &Tspill)
Angle getAverageH2OPhaseDelay(unsigned int spwid)
Class for opacities [no dimensions].
Definition: ATMOpacity.h:44
double RT(double pfit_wh2o, double skycoupling, double tspill, double airmass, unsigned int spwid, const Percent &signalgain)
Temperature getGroundTemperature() const
Accessor to the current Ground Temperature used in the object.
Definition: ATMProfile.h:249
Opacity getTotalOpacityUpTo(Length refalti)
Definition: ATMSkyStatus.h:868
Temperature getAverageTrjSky(unsigned int spwid)
Accesor to the average Rayleigh-Jeans Temperature in spectral window spwid, for the current condition...
Definition: ATMSkyStatus.h:487
double mkSkyCouplingRetrieval_fromTEBB(unsigned int spwId, const Percent &signalGain, const vector< Temperature > &measuredSkyTEBB, double airm, const vector< double > &spwId_filter, double skycoupling, const Temperature &tspill)
Temperature getAverageTrjSky(const Length &wh2o)
Accesor to the average Rayleigh-Jeans Temperature in spectral window 0, for the current conditions...
Definition: ATMSkyStatus.h:497
Opacity getWetOpacityUpTo(unsigned int spwid, unsigned int nc, Length refalti)
Definition: ATMSkyStatus.h:781
double getAverageDispersiveDryPathLength_GroundTemperatureDerivative(unsigned int spwid)
Length getAverageO3LinesPathLength(unsigned int spwid)
Function to retrieve the average integrated Atmospheric Path Length (due to O3 Lines) in spectral Win...
Temperature getTebbSky(unsigned int spwid, unsigned int nc, const Length &wh2o, double airmass)
Accesor to the Equivalent Blackbody Temperature in spectral window spwid and channel nc...
Definition: ATMSkyStatus.h:410
Temperature getSkyBackgroundTemperature() const
Accessor to get sky background temperature.
Definition: ATMSkyStatus.h:185
Length WaterVaporRetrieval_fromFTS(const vector< double > &v_transmission, const Frequency &f1, const Frequency &f2)
Same as above but using for the retrieval only the measurements between frequencies f1 and f2&gt;f1...
Opacity getH2OContOpacityUpTo(unsigned int spwid, unsigned int nc, Length refalti)
Definition: ATMSkyStatus.h:921
Length getAverageDispersiveDryPathLength()
void setUserWH2O(double dwh2o, const string &units)
Alternative form of the setter for user zenith water vapor column for forward radiative transfer calc...
Definition: ATMSkyStatus.h:166
Angle getAverageH2OPhaseDelay()
Length getAverageNonDispersiveDryPathLength(unsigned int spwid)
Function to retrieve the average integrated Atmospheric Path Length (Dry part) in spectral Window spw...
Opacity getAverageSO2LinesOpacity(unsigned int spwid)
Definition: ATMSkyStatus.h:839
Length getAverageNonDispersiveH2OPathLength()
Accessor to get the average integrated zenith Atmospheric Path Length (Non-Dispersive part) in spectr...
Temperature skyBackgroundTemperature_
Blackbody temperature of the sky background.
double get() const
Accessor to get the numerical value of length (in International System units: m)
Definition: ATMLength.h:60
Temperature getTebbSky(unsigned int spwid, unsigned int nc, double skycoupling, const Temperature &Tspill)
Accesor to the Equivalent Blackbody Temperature in spectral window spwid and channel nc...
Definition: ATMSkyStatus.h:389
Opacity getAverageDryOpacity(unsigned int spwid)
double sigma_transmission_FTSfit_
no accessors provided for these
void addNewSpectralWindow(unsigned int numChan, unsigned int refChan, const Frequency &refFreq, const Frequency &chanSep)
Setter of new spectral windows (adds frequencies to the SpectralGrid and calculates the corresponding...
Opacity getAverageDryOpacity(unsigned int spwid)
Definition: ATMSkyStatus.h:818
Opacity getTotalOpacity()
Definition: ATMSkyStatus.h:852
Length getAverageDispersiveH2OPathLength()
Accessor to get the average integrated zenith Atmospheric Path Length (Dispersive part) in spectral W...
Opacity getAverageO2LinesOpacity(unsigned int spwid)
Definition: ATMSkyStatus.h:823
Length getAverageNonDispersiveDryPathLength(unsigned int spwid)
Temperature getTebbSky(unsigned int nc, double skycoupling, const Temperature &Tspill)
Accesor to the Equivalent Blackbody Temperature in spectral window 0 and channel nc, for the current (user) Water Vapor Column and Air Mass, Sky Coupling skycoupling, and Spill Over Temperature Tspill.
Definition: ATMSkyStatus.h:380
Length getAverageNO2LinesPathLength(unsigned int spwid)
Function to retrieve the average integrated Atmospheric Path Length (due to NO2 Lines) in spectral Wi...
double getAverageDispersiveDryPathLength_GroundPressureDerivative(unsigned int spwid)
Defines a Class for those parameters being angles.
Definition: ATMAngle.h:44
virtual ~SkyStatus()
void rmSkyStatus()
Resets retrieved water column to zero, or the default value.
Temperature value with units.
bool setBasicAtmosphericParameters(const Length &altitude, const Pressure &groundPressure, const Temperature &groundTemperature, double tropoLapseRate, const Humidity &humidity, const Length &wvScaleHeight)
Setter for a new set of basic atmospheric parameters.
Defines a frequency value with units.
Definition: ATMFrequency.h:48
SkyStatus(const RefractiveIndexProfile &refractiveIndexProfile)
The basic constructor.
double getAirMass() const
Accessor to get airmass.
Definition: ATMSkyStatus.h:175
Temperature getTebbSky(const Length &wh2o)
Accesor to the Equivalent Blackbody Temperature in spectral window 0 and channel 0, for Water Vapor Column wh2o, the current Air Mass, and perfect Sky Coupling to the sky.
Definition: ATMSkyStatus.h:360
Temperature getTrjSky(unsigned int nc, const Length &wh2o, double skycoupling, const Temperature &Tspill)
Accesor to the Rayleigh-Jeans Temperature in spectral window 0 and channel nc, for Water Vapor Column...
Definition: ATMSkyStatus.h:700
double airMass_
Air Mass used for the radiative transfer.
Temperature getTebbSky(unsigned int nc, const Length &wh2o, double airmass)
Accesor to the Equivalent Blackbody Temperature in spectral window 0 and channel nc, for Water Vapor Column wh2o, Air Mass airmass, and perfect Sky Coupling to the sky.
Definition: ATMSkyStatus.h:403
double RT(double pfit_wh2o, double skycoupling, double tspill, unsigned int spwid, const Percent &signalgain)
WaterVaporRadiometer waterVaporRadiometer_
!&lt; the one retrieved from the water vapor radiometer channels will be used.
Length getNonDispersiveH2OPathLength()
Accesor to get the integrated zenith H2O Atmospheric Path length (Non-Dispersive part) for the curren...
Definition: ATMSkyStatus.h:996
Opacity getDryOpacity(unsigned int spwid, unsigned int nc)
Definition: ATMSkyStatus.h:814
Temperature getTebbSky(unsigned int nc, const Length &wh2o, double skycoupling, const Temperature &Tspill)
Accesor to the Equivalent Blackbody Temperature in spectral window 0 and channel nc, for Water Vapor Column wh2o, the current Air Mass, Sky Coupling skycoupling, and Spill Over Temperature Tspill.
Definition: ATMSkyStatus.h:419
void setUserWH2O(const Length &wh2o)
Setter for user zenith water vapor column for forward radiative transfer calculations.
Definition: ATMSkyStatus.h:156
Temperature getTebbSky(double airmass)
Accesor to the Equivalent Blackbody Temperature in spectral window 0 and channel 0, for the currnet (user) Water Vapor Column, Air Mass airmass, and perfect Sky Coupling to the sky.
Definition: ATMSkyStatus.h:339
Temperature getTrjSky(unsigned int spwid, unsigned int nc, const Length &wh2o, double skycoupling, const Temperature &Tspill)
Accesor to the Rayleigh-Jeans Temperature in spectral window spwid and channel nc, for Water Vapor Column wh2o, the current Air Mass, Sky Coupling skycoupling, and Spill Over Temperature Tspill.
Definition: ATMSkyStatus.h:710
Class for those physical parameters having dimensions of Length [L].
Definition: ATMLength.h:44
Temperature getAverageTrjSky(unsigned int spwid, double airmass)
Accesor to the average Rayleigh-Jeans Temperature in spectral window spwid, for the current condition...
Definition: ATMSkyStatus.h:513
Angle getAverageDispersiveH2OPhaseDelay()
Accessor to get the average integrated zenith Atmospheric Phase Delay (Dispersive part) for the curre...
Length WaterVaporRetrieval_fromFTS(const vector< double > &v_transmission)
Zenith Water Vapor column retrieval based on fitting the vector of zenith atmospheric transmission gi...
Length getAverageCOLinesPathLength(unsigned int spwid)
Function to retrieve the average integrated Atmospheric Path Length (due to CO Lines) in spectral Win...
Temperature getTrjSky()
Accesor to the Rayleigh-Jeans Temperature in spectral window 0 and channel 0, for the currnet (user) ...
Definition: ATMSkyStatus.h:591
std::vector< unsigned int > v_numChan_
number of channels for every spectral window
Temperature getTrjSky(unsigned int nc, const Length &wh2o, double airmass, double skycoupling, const Temperature &Tspill)
Accesor to the Rayleigh-Jeans Temperature in spectral window 0 and channel nc, for Water Column wh2o...
Definition: ATMSkyStatus.h:740
Temperature getTrjSky(unsigned int nc, const Length &wh2o, double airmass)
Accesor to the Rayleigh-Jeans Temperature in spectral window 0 and channel nc, for Water Vapor Column...
Definition: ATMSkyStatus.h:684
Opacity getH2OLinesOpacityUpTo(unsigned int spwid, unsigned int nc, Length refalti)
Definition: ATMSkyStatus.h:902
double RTRJ(double pfit_wh2o, double skycoupling, double tspill, double airmass, unsigned int spwid, const Percent &signalgain)
Temperature getSigmaFit(unsigned int spwId, const vector< Temperature > &v_tebbspec, double airmass, double skyCoupling, const Temperature &Tspill)
Defines a class for quantities that may be expressed in percent.
Definition: ATMPercent.h:44
Opacity getWetOpacity(unsigned int spwid, unsigned int nc)
Accesor to get the integrated zenith Wet Opacity for the current conditions, for the point nc of spec...
Definition: ATMSkyStatus.h:776
void addNewSpectralWindow(const vector< Frequency > &chanFreq)
void WaterVaporRetrieval_fromWVR(vector< WVRMeasurement > &RadiometerData, unsigned int n)
void addNewSpectralWindow(unsigned int numChan, double refFreq, double *chanFreq, const string &freqUnits)
Setter of new spectral windows (adds frequencies to the SpectralGrid and calculates the corresponding...
void updateSkyCoupling_fromWVR(vector< WVRMeasurement > &RadiometerData, unsigned int n, WaterVaporRadiometer &external_wvr)
double getWaterVaporRadiometerSkyCoupling(int n) const
Accessor to the sky coupling of channel n of the Water Vapor Radiometer.
Opacity getAverageCOLinesOpacity(unsigned int spwid)