LCOV - code coverage report
Current view: top level - atmosphere/ATM - ATMSkyStatus.h (source / functions) Hit Total Coverage
Test: casacpp_coverage.info Lines: 66 86 76.7 %
Date: 2024-11-06 17:42:47 Functions: 23 26 88.5 %

          Line data    Source code
       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"
      33             : #include "ATMRefractiveIndexProfile.h"
      34             : #include "ATMWaterVaporRadiometer.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             : 
      44             : ATM_NAMESPACE_BEGIN
      45             : 
      46             : /*! \brief From the layerThickness and layerTemperature arrays (from AtmProfile),
      47             :  *   the RefractiveIndexProfile array, and a brightness temperature measured to
      48             :  *   the sky at the corresponding frequency, this Class retrieves the water vapor
      49             :  *   column that corresponds to the measurement.
      50             :  *
      51             :  *   The strating point will therefore be an RefractiveIndexProfile object form
      52             :  *   which the essential information will be inherited: layerThickness,
      53             :  *   layerTemperature vectors (these two inherited themselves from AtmProfile),
      54             :  *   and absTotalDry and absTotalWet arrays. The numerical methods
      55             :  *   will be an iteration wh2o to match the measured brightness temperature
      56             :  */
      57             : class SkyStatus: public RefractiveIndexProfile
      58             : {
      59             : public:
      60             : 
      61             :       //@{
      62             : 
      63             :   /** The basic constructor. It will allow to perform forward radiative transfer enquires in
      64             :    *  the spectral bands of refractiveIndexProfile, and to use some of these bands for water vapor retrievals.
      65             :    *  The basic constructor needs at least an  RefractiveIndexProfile object (it brings the spectral information via the
      66             :    *  SpectralGrid object inherited by it). Additional inputs can be the
      67             :    *  Air mass (default 1.0), sky background temperature (default 2.73 K), and user water vapor column (default 1 mm).
      68             :    *  Methods inside the class allow to retrieve the water vapor column and eventually update the user value to the retrieved one.
      69             :    *  In order to perform such retrievals, the numerical methods will need as inputs the measured T_EBBs towards the sky in
      70             :    *  some spectral bands that will be designed as water vapor radiometry channels. The sideband gains and coupling to the sky
      71             :    *  of these vapor radiometry channels should also be inputs of the retrieval methods, otherwise they will be set to default
      72             :    *  values. See documentation ef particular methods for more information.
      73             :    */
      74             :   SkyStatus(const RefractiveIndexProfile &refractiveIndexProfile);
      75             :   /** Class constructor with additional inputs */
      76             :   SkyStatus(const RefractiveIndexProfile &refractiveIndexProfile,
      77             :             double airMass);
      78             :   /** Class constructor with additional inputs */
      79             :   SkyStatus(const RefractiveIndexProfile &refractiveIndexProfile,
      80             :             const Temperature &temperatureBackground);
      81             :   /** Class constructor with additional inputs */
      82             :   SkyStatus(const RefractiveIndexProfile &refractiveIndexProfile,
      83             :             const Length &wh2o);
      84             :   /** Class constructor with additional inputs */
      85             :   SkyStatus(const RefractiveIndexProfile &refractiveIndexProfile,
      86             :             const Temperature &temperatureBackground,
      87             :             double airMass);
      88             :   /** Class constructor with additional inputs */
      89             :   SkyStatus(const RefractiveIndexProfile &refractiveIndexProfile,
      90             :             double airMass,
      91             :             const Temperature &temperatureBackground);
      92             :   /** Class constructor with additional inputs */
      93             :   SkyStatus(const RefractiveIndexProfile &refractiveIndexProfile,
      94             :             const Length &wh2o,
      95             :             double airMass);
      96             :   /** Class constructor with additional inputs */
      97             :   SkyStatus(const RefractiveIndexProfile &refractiveIndexProfile,
      98             :             double airMass,
      99             :             const Length &wh2o);
     100             :   /** Class constructor with additional inputs */
     101             :   SkyStatus(const RefractiveIndexProfile &refractiveIndexProfile,
     102             :             const Length &wh2o,
     103             :             const Temperature &temperatureBackground);
     104             :   /** Class constructor with additional inputs */
     105             :   SkyStatus(const RefractiveIndexProfile &refractiveIndexProfile,
     106             :             const Temperature &temperatureBackground,
     107             :             const Length &wh2o);
     108             :   /** Class constructor with additional inputs */
     109             :   SkyStatus(const RefractiveIndexProfile &refractiveIndexProfile,
     110             :             const Temperature &temperatureBackground,
     111             :             double airMass,
     112             :             const Length &wh2o);
     113             :   /** Class constructor with additional inputs */
     114             :   SkyStatus(const RefractiveIndexProfile &refractiveIndexProfile,
     115             :             const Temperature &temperatureBackground,
     116             :             const Length &wh2o,
     117             :             double airMass);
     118             :   /** Class constructor with additional inputs */
     119             :   SkyStatus(const RefractiveIndexProfile &refractiveIndexProfile,
     120             :             double airMass,
     121             :             const Temperature &temperatureBackground,
     122             :             const Length &wh2o);
     123             :   /** Class constructor with additional inputs */
     124             :   SkyStatus(const RefractiveIndexProfile &refractiveIndexProfile,
     125             :             double airMass,
     126             :             const Length &wh2o,
     127             :             const Temperature &temperatureBackground);
     128             :   /** Class constructor with additional inputs */
     129             :   SkyStatus(const RefractiveIndexProfile &refractiveIndexProfile,
     130             :             const Length &wh2o,
     131             :             const Temperature &temperatureBackground,
     132             :             double airMass);
     133             :   /** Class constructor with additional inputs */
     134             :   SkyStatus(const RefractiveIndexProfile &refractiveIndexProfile,
     135             :             const Length &wh2o,
     136             :             double airMass,
     137             :             const Temperature &temperatureBackground);
     138             : 
     139             :   /** A copy constructor for deep copy   */
     140             :   SkyStatus(const SkyStatus &);
     141             : 
     142             :   virtual ~SkyStatus();
     143             : 
     144             :   //@}
     145             : 
     146             :   //@{
     147             : 
     148             : 
     149             :   /** Accessor to get the user water vapor column. This is the water vapor column used for forward
     150             :    radiative transfer calculations. It can be equal to wh2o_retrieved_ when this one is avalilable
     151             :    and the proper setter or update accessor (retrieveandupdateWaterVapor) has been used. */
     152    31905322 :   Length getUserWH2O() const { return wh2o_user_; }
     153             :   /** Setter for user zenith water vapor column for forward radiative transfer calculations. The user
     154             :    zenith water vapor column equals the retrieved zenith water vapor column from H2O radiometers,
     155             :    every time the last one is derived with the retrieveandupdateWaterVapor accessor.*/
     156         103 :   void setUserWH2O(const Length &wh2o)
     157             :   {
     158         103 :     if(wh2o.get() == wh2o_user_.get()) {
     159             :     } else {
     160          96 :       wh2o_user_ = wh2o;
     161             :     }
     162         103 :   }
     163             :   /** Alternative form of the setter for user zenith water vapor column for forward radiative transfer calculations. The user
     164             :    zenith water vapor column equals the retrieved zenith water vapor column from H2O radiometers,
     165             :    every time the last one is derived with the retrieveandupdateWaterVapor accessor.*/
     166           2 :   void setUserWH2O(double dwh2o, const string &units)
     167             :   {
     168           2 :     Length wh2o(dwh2o, units);
     169           2 :     if(wh2o.get() == wh2o_user_.get()) {
     170             :     } else {
     171           2 :       wh2o_user_ = wh2o;
     172             :     }
     173           2 :   }
     174             :   /** Accessor to get airmass */
     175    15616017 :   double getAirMass() const { return airMass_; }
     176             :   /** Setter for air mass in SkyStatus without performing water vapor retrieval */
     177       26563 :   void setAirMass(double airMass)
     178             :   {
     179       26563 :     if(airMass == airMass_) {
     180             :     } else {
     181       26561 :       airMass_ = airMass;
     182             :     }
     183       26563 :   }
     184             :   /** Accessor to get sky background temperature */
     185             :   Temperature getSkyBackgroundTemperature() const { return skyBackgroundTemperature_; }
     186             :   /** Setter for sky background temperature in SkyStatus without
     187             :    performing water vapor retrieval */
     188             :   void setSkyBackgroundTemperature(const Temperature &skyBackgroundTemperature)
     189             :   {
     190             :     if(skyBackgroundTemperature.get(Temperature::UnitKelvin) == skyBackgroundTemperature_.get(Temperature::UnitKelvin)) {
     191             :     } else {
     192             :       skyBackgroundTemperature_
     193             :           = Temperature(skyBackgroundTemperature.get(Temperature::UnitKelvin), Temperature::UnitKelvin);
     194             :     }
     195             :   }
     196             : 
     197             :   /** Accesor to the average Equivalent Blackbody Temperature in spectral window 0, for the current conditions
     198             :    and a perfect sky coupling */
     199           2 :   Temperature getAverageTebbSky()
     200             :   {
     201           2 :     unsigned int n = 0;
     202           2 :     return getAverageTebbSky(n);
     203             :   }
     204             :   /** Accesor to the average Equivalent Blackbody Temperature in spectral window spwid, for the current conditions
     205             :    and a perfect sky coupling */
     206           3 :   Temperature getAverageTebbSky(unsigned int spwid)
     207             :   {
     208             :     return getAverageTebbSky(spwid,
     209           6 :                              getUserWH2O(),
     210             :                              getAirMass(),
     211             :                              1.0,
     212           9 :                              getGroundTemperature());
     213             :   }
     214             :   /** Accesor to the average Equivalent Blackbody Temperature in spectral window 0, for the current
     215             :    conditions, except water column wh2o, and a perfect sky coupling */
     216           1 :   Temperature getAverageTebbSky(const Length &wh2o) { return getAverageTebbSky(0, wh2o); }
     217             :   /** Accesor to the average Equivalent Blackbody Temperature in spectral window spwid, for the current
     218             :    conditions, except water column wh2o, and a perfect sky coupling */
     219           1 :   Temperature getAverageTebbSky(unsigned int spwid, const Length &wh2o)
     220             :   {
     221             :     return getAverageTebbSky(spwid,
     222             :                              wh2o,
     223             :                              getAirMass(),
     224             :                              1.0,
     225           2 :                              getGroundTemperature());
     226             :   }
     227             :   /** Accesor to the average Equivalent Blackbody Temperature in spectral window 0, for the current
     228             :    conditions, except Air Mass airmass, and a perfect sky coupling */
     229             :   Temperature getAverageTebbSky(double airmass) { return getAverageTebbSky(0, airmass); }
     230             :   /** Accesor to the average Equivalent Blackbody Temperature in spectral window spwid, for the current
     231             :    conditions, except Air Mass airmass, and a perfect sky coupling */
     232             :   Temperature getAverageTebbSky(unsigned int spwid, double airmass)
     233             :   {
     234             :     return getAverageTebbSky(spwid,
     235             :                              getUserWH2O(),
     236             :                              airmass,
     237             :                              1.0,
     238             :                              getGroundTemperature());
     239             :   }
     240             :   /** Accesor to the average Equivalent Blackbody Temperature in spectral window 0, for the current
     241             :    conditions, except water column wh2o, introducing a Sky Coupling and Spill Over Temperature */
     242             :   Temperature getAverageTebbSky(const Length &wh2o,
     243             :                                 double skycoupling,
     244             :                                 const Temperature &Tspill)
     245             :   {
     246             :     return getAverageTebbSky(0, wh2o, skycoupling, Tspill);
     247             :   }
     248             :   /** Accesor to the average Equivalent Blackbody Temperature in spectral window spwid, for the current
     249             :    conditions, except water column wh2o, introducing a Sky Coupling and Spill Over Temperature */
     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             :   }
     257             :   /** Accesor to the average Equivalent Blackbody Temperature in spectral window 0, for the current
     258             :    conditions, except Air Mass airmass, introducing a Sky Coupling and Spill Over Temperature */
     259             :   Temperature getAverageTebbSky(double airmass,
     260             :                                 double skycoupling,
     261             :                                 const Temperature &Tspill)
     262             :   {
     263             :     return getAverageTebbSky(0, airmass, skycoupling, Tspill);
     264             :   }
     265             :   /** Accesor to the average Equivalent Blackbody Temperature in spectral window spwid, for the current
     266             :    conditions, except Air Mass airmass, introducing a Sky Coupling and Spill Over Temperature */
     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             :   }
     274             :   /** Accesor to the average Equivalent Blackbody Temperature in spectral window 0 for the current
     275             :    conditions, introducing a Sky Coupling and Spill Over Temperature */
     276             :   Temperature getAverageTebbSky(double skycoupling, const Temperature &Tspill)
     277             :   {
     278             :     unsigned int n = 0;
     279             :     return getAverageTebbSky(n, skycoupling, Tspill);
     280             :   }
     281             :   /** Accesor to the average Equivalent Blackbody Temperature in spectral window spwid for the current
     282             :    conditions, introducing a Sky Coupling and Spill Over Temperature */
     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             :   }
     293             :   /** Accesor to the average Equivalent Blackbody Temperature in spectral window spwid, for Water Column
     294             :    wh2o, Air Mass airmass, Sky Coupling skycoupling, and Spill Over Temperature Tspill */
     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             : 
     308             :   /** Accesor to the Equivalent Blackbody Temperature in spectral window 0 and channel 0, for the currnet
     309             :    (user) Water Vapor Column, the current Air Mass, and perfect Sky Coupling to the sky */
     310             :   Temperature getTebbSky()
     311             :   {
     312             :     unsigned int n = 0;
     313             :     return getTebbSky(n);
     314             :   }
     315             :   /** Accesor to the Equivalent Blackbody Temperature in spectral window 0 and channel nc, for the currnet
     316             :    (user) Water Vapor Column, the current Air Mass, and perfect Sky Coupling to the sky */
     317          10 :   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          10 :     unsigned int n = 0;
     324          10 :     return getTebbSky(n, nc);
     325             :   }
     326             :   /** Accesor to the Equivalent Blackbody Temperature in spectral window spwid and channel nc, for the currnet
     327             :    (user) Water Vapor Column, the current Air Mass, and perfect Sky Coupling to the sky */
     328          10 :   Temperature getTebbSky(unsigned int spwid, unsigned int nc)
     329             :   {
     330             :     return getTebbSky(spwid,
     331             :                       nc,
     332          20 :                       getUserWH2O(),
     333             :                       getAirMass(),
     334             :                       1.0,
     335          30 :                       Temperature(100, Temperature::UnitKelvin));
     336             :   }
     337             :   /** Accesor to the Equivalent Blackbody Temperature in spectral window 0 and channel 0, for the currnet
     338             :    (user) Water Vapor Column, Air Mass airmass, and perfect Sky Coupling to the sky */
     339             :   Temperature getTebbSky(double airmass)
     340             :   {
     341             :     unsigned int n = 0;
     342             :     return getTebbSky(n, airmass);
     343             :   }
     344             :   /** Accesor to the Equivalent Blackbody Temperature in spectral window 0 and channel nc, for the currnet
     345             :    (user) Water Vapor Column, Air Mass airmass, and perfect Sky Coupling to the sky */
     346             :   Temperature getTebbSky(unsigned int nc, double airmass)
     347             :   {
     348             :     unsigned int n = 0;
     349             :     return getTebbSky(n, nc, airmass);
     350             :   }
     351             :   /** Accesor to the Equivalent Blackbody Temperature in spectral window spwid and channel nc, for the currnet
     352             :    (user) Water Vapor Column, Air Mass airmass, and perfect Sky Coupling to the sky */
     353             :   Temperature getTebbSky(unsigned int spwid, unsigned int nc, double airmass)
     354             :   {
     355             :     return getTebbSky(spwid, nc, getUserWH2O(), airmass, 1.0, Temperature(100,
     356             :                                                                           Temperature::UnitKelvin));
     357             :   }
     358             :   /** Accesor to the Equivalent Blackbody Temperature in spectral window 0 and channel 0, for Water
     359             :    Vapor Column wh2o, the current Air Mass, and perfect Sky Coupling to the sky */
     360             :   Temperature getTebbSky(const Length &wh2o)
     361             :   {
     362             :     unsigned int n = 0;
     363             :     return getTebbSky(n, wh2o);
     364             :   }
     365             :   /** Accesor to the Equivalent Blackbody Temperature in spectral window 0 and channel nc, for Water
     366             :    Vapor Column wh2o, the current Air Mass, and perfect Sky Coupling to the sky */
     367             :   Temperature getTebbSky(unsigned int nc, const Length &wh2o)
     368             :   {
     369             :     unsigned int n = 0;
     370             :     return getTebbSky(n, nc, wh2o);
     371             :   }
     372             :   /** Accesor to the Equivalent Blackbody Temperature in spectral window spwid and channel nc, for Water
     373             :    Vapor Column wh2o, the current Air Mass, and perfect Sky Coupling to the sky */
     374             :   Temperature getTebbSky(unsigned int spwid, unsigned int nc, const Length &wh2o)
     375             :   {
     376             :     return getTebbSky(spwid, nc, wh2o, getAirMass(), 1.0, Temperature(100, Temperature::UnitKelvin));
     377             :   }
     378             :   /** Accesor to the Equivalent Blackbody Temperature in spectral window 0 and channel nc, for the current
     379             :    (user) Water Vapor Column and Air Mass, Sky Coupling skycoupling, and Spill Over Temperature Tspill */
     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             :   }
     387             :   /** Accesor to the Equivalent Blackbody Temperature in spectral window spwid and channel nc, for the current
     388             :    (user) Water Vapor Column and Air Mass, Sky Coupling skycoupling, and Spill Over Temperature Tspill */
     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             :   }
     401             :   /** Accesor to the Equivalent Blackbody Temperature in spectral window 0 and channel nc, for Water
     402             :    Vapor Column wh2o, Air Mass airmass, and perfect Sky Coupling to the sky */
     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             :   }
     408             :   /** Accesor to the Equivalent Blackbody Temperature in spectral window spwid and channel nc, for Water
     409             :    Vapor Column wh2o, Air Mass airmass, and perfect Sky Coupling to the sky */
     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, Temperature::UnitKelvin));
     416             :   }
     417             :   /** Accesor to the Equivalent Blackbody Temperature in spectral window 0 and channel nc, for Water
     418             :    Vapor Column wh2o, the current Air Mass, Sky Coupling skycoupling, and Spill Over Temperature Tspill */
     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             :   }
     427             :   /** Accesor to the Equivalent Blackbody Temperature in spectral window spwid and channel nc, for Water
     428             :    Vapor Column wh2o, the current Air Mass, Sky Coupling skycoupling, and Spill Over Temperature Tspill */
     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             :   }
     437             :   /** Accesor to the Equivalent Blackbody Temperature in spectral window 0 and channel nc, for the current
     438             :    User Water Column, Air Mass airmass, Sky Coupling skycoupling, and Spill Over Temperature Tspill */
     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             :   }
     447             :   /** Accesor to the Equivalent Blackbody Temperature in spectral window spwid and channel nc, for the current
     448             :    User Water Column, Air Mass airmass, Sky Coupling skycoupling, and Spill Over Temperature Tspill */
     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             :   }
     457             :   /** Accesor to the Equivalent Blackbody Temperature in spectral window 0 and channel nc, for Water Column
     458             :    wh2o, Air Mass airmass, Sky Coupling skycoupling, and Spill Over Temperature Tspill */
     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             :   }
     468             :   /** Accesor to the Equivalent Blackbody Temperature in spectral window spwid and channel nc, for Water Column
     469             :    wh2o, Air Mass airmass, Sky Coupling skycoupling, and Spill Over Temperature Tspill */
     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             : 
     478             :    /** Accesor to the average Rayleigh-Jeans Temperature in spectral window 0, for the current conditions
     479             :    and a perfect sky coupling */
     480             :   Temperature getAverageTrjSky()
     481             :   {
     482             :     unsigned int n = 0;
     483             :     return getAverageTrjSky(n);
     484             :   }
     485             :   /** Accesor to the average Rayleigh-Jeans Temperature in spectral window spwid, for the current conditions
     486             :    and a perfect sky coupling */
     487             :   Temperature getAverageTrjSky(unsigned int spwid)
     488             :   {
     489             :     return getAverageTrjSky(spwid,
     490             :                              getUserWH2O(),
     491             :                              getAirMass(),
     492             :                              1.0,
     493             :                              getGroundTemperature());
     494             :   }
     495             :   /** Accesor to the average Rayleigh-Jeans Temperature in spectral window 0, for the current
     496             :    conditions, except water column wh2o, and a perfect sky coupling */
     497             :   Temperature getAverageTrjSky(const Length &wh2o) { return getAverageTrjSky(0, wh2o); }
     498             :   /** Accesor to the average Rayleigh-Jeans Temperature in spectral window spwid, for the current
     499             :    conditions, except water column wh2o, and a perfect sky coupling */
     500             :   Temperature getAverageTrjSky(unsigned int spwid, const Length &wh2o)
     501             :   {
     502             :     return getAverageTrjSky(spwid,
     503             :                              wh2o,
     504             :                              getAirMass(),
     505             :                              1.0,
     506             :                              getGroundTemperature());
     507             :   }
     508             :   /** Accesor to the average Rayleigh-Jeans Temperature in spectral window 0, for the current
     509             :    conditions, except Air Mass airmass, and a perfect sky coupling */
     510             :   Temperature getAverageTrjSky(double airmass) { return getAverageTrjSky(0, airmass); }
     511             :   /** Accesor to the average Rayleigh-Jeans Temperature in spectral window spwid, for the current
     512             :    conditions, except Air Mass airmass, and a perfect sky coupling */
     513             :   Temperature getAverageTrjSky(unsigned int spwid, double airmass)
     514             :   {
     515             :     return getAverageTrjSky(spwid,
     516             :                              getUserWH2O(),
     517             :                              airmass,
     518             :                              1.0,
     519             :                              getGroundTemperature());
     520             :   }
     521             :   /** Accesor to the average Rayleigh-Jeans Temperature in spectral window 0, for the current
     522             :    conditions, except water column wh2o, introducing a Sky Coupling and Spill Over Temperature */
     523             :   Temperature getAverageTrjSky(const Length &wh2o,
     524             :                                 double skycoupling,
     525             :                                 const Temperature &Tspill)
     526             :   {
     527             :     return getAverageTrjSky(0, wh2o, skycoupling, Tspill);
     528             :   }
     529             :   /** Accesor to the average Rayleigh-Jeans Temperature in spectral window spwid, for the current
     530             :    conditions, except water column wh2o, introducing a Sky Coupling and Spill Over Temperature */
     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             :   }
     538             :   /** Accesor to the average Rayleigh-Jeans Temperature in spectral window 0, for the current
     539             :    conditions, except Air Mass airmass, introducing a Sky Coupling and Spill Over Temperature */
     540             :   Temperature getAverageTrjSky(double airmass,
     541             :                                 double skycoupling,
     542             :                                 const Temperature &Tspill)
     543             :   {
     544             :     return getAverageTrjSky(0, airmass, skycoupling, Tspill);
     545             :   }
     546             :   /** Accesor to the average Rayleigh-Jeans Temperature in spectral window spwid, for the current
     547             :    conditions, except Air Mass airmass, introducing a Sky Coupling and Spill Over Temperature */
     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             :   }
     555             :   /** Accesor to the average Rayleigh-Jeans Temperature in spectral window 0 for the current
     556             :    conditions, introducing a Sky Coupling and Spill Over Temperature */
     557             :   Temperature getAverageTrjSky(double skycoupling, const Temperature &Tspill)
     558             :   {
     559             :     unsigned int n = 0;
     560             :     return getAverageTrjSky(n, skycoupling, Tspill);
     561             :   }
     562             :   /** Accesor to the average Rayleigh-Jeans Temperature in spectral window spwid for the current
     563             :    conditions, introducing a Sky Coupling and Spill Over Temperature */
     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             :   }
     574             :   /** Accesor to the average Rayleigh-Jeans Temperature in spectral window spwid, for Water Column
     575             :    wh2o, Air Mass airmass, Sky Coupling skycoupling, and Spill Over Temperature Tspill */
     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             : 
     589             :   /** Accesor to the Rayleigh-Jeans Temperature in spectral window 0 and channel 0, for the currnet
     590             :    (user) Water Vapor Column, the current Air Mass, and perfect Sky Coupling to the sky */
     591             :   Temperature getTrjSky()
     592             :   {
     593             :     unsigned int n = 0;
     594             :     return getTrjSky(n);
     595             :   }
     596             :   /** Accesor to the Rayleigh-Jeans Temperature in spectral window 0 and channel nc, for the currnet
     597             :    (user) Water Vapor Column, the current Air Mass, and perfect Sky Coupling to the sky */
     598    15616000 :   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    15616000 :     unsigned int n = 0;
     605    15616000 :     return getTrjSky(n, nc);
     606             :   }
     607             :   /** Accesor to the Rayleigh-Jeans Temperature in spectral window spwid and channel nc, for the currnet
     608             :    (user) Water Vapor Column, the current Air Mass, and perfect Sky Coupling to the sky */
     609    15616000 :   Temperature getTrjSky(unsigned int spwid, unsigned int nc)
     610             :   {
     611             :     return getTrjSky(spwid,
     612             :                       nc,
     613    31232000 :                       getUserWH2O(),
     614             :                       getAirMass(),
     615             :                       1.0,
     616    46848000 :                       Temperature(100, Temperature::UnitKelvin));
     617             :   }
     618             :   /** Accesor to the Rayleigh-Jeans Temperature in spectral window 0 and channel 0, for the currnet
     619             :    (user) Water Vapor Column, Air Mass airmass, and perfect Sky Coupling to the sky */
     620             :   Temperature getTrjSky(double airmass)
     621             :   {
     622             :     unsigned int n = 0;
     623             :     return getTrjSky(n, airmass);
     624             :   }
     625             :   /** Accesor to the Rayleigh-Jeans Temperature in spectral window 0 and channel nc, for the currnet
     626             :    (user) Water Vapor Column, Air Mass airmass, and perfect Sky Coupling to the sky */
     627             :   Temperature getTrjSky(unsigned int nc, double airmass)
     628             :   {
     629             :     unsigned int n = 0;
     630             :     return getTrjSky(n, nc, airmass);
     631             :   }
     632             :   /** Accesor to the Rayleigh-Jeans Temperature in spectral window spwid and channel nc, for the currnet
     633             :    (user) Water Vapor Column, Air Mass airmass, and perfect Sky Coupling to the sky */
     634             :   Temperature getTrjSky(unsigned int spwid, unsigned int nc, double airmass)
     635             :   {
     636             :     return getTrjSky(spwid, nc, getUserWH2O(), airmass, 1.0, Temperature(100,
     637             :                                                                          Temperature::UnitKelvin));
     638             :   }
     639             :   /** Accesor to the Rayleigh-Jeans Temperature in spectral window 0 and channel 0, for Water
     640             :    Vapor Column wh2o, the current Air Mass, and perfect Sky Coupling to the sky */
     641             :   Temperature getTrjSky(const Length &wh2o)
     642             :   {
     643             :     unsigned int n = 0;
     644             :     return getTrjSky(n, wh2o);
     645             :   }
     646             :   /** Accesor to the Rayleigh-Jeans Temperature in spectral window 0 and channel nc, for Water
     647             :    Vapor Column wh2o, the current Air Mass, and perfect Sky Coupling to the sky */
     648             :   Temperature getTrjSky(unsigned int nc, const Length &wh2o)
     649             :   {
     650             :     unsigned int n = 0;
     651             :     return getTrjSky(n, nc, wh2o);
     652             :   }
     653             :   /** Accesor to the Rayleigh-Jeans Temperature in spectral window spwid and channel nc, for Water
     654             :    Vapor Column wh2o, the current Air Mass, and perfect Sky Coupling to the sky */
     655             :   Temperature getTrjSky(unsigned int spwid, unsigned int nc, const Length &wh2o)
     656             :   {
     657             :     return getTrjSky(spwid, nc, wh2o, getAirMass(), 1.0, Temperature(100, Temperature::UnitKelvin));
     658             :   }
     659             :   /** Accesor to the Rayleigh-Jeans Temperature in spectral window 0 and channel nc, for the current
     660             :    (user) Water Vapor Column and Air Mass, Sky Coupling skycoupling, and Spill Over Temperature Tspill */
     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             :   }
     668             :   /** Accesor to the Rayleigh-Jeans Temperature in spectral window spwid and channel nc, for the current
     669             :    (user) Water Vapor Column and Air Mass, Sky Coupling skycoupling, and Spill Over Temperature Tspill */
     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             :   }
     682             :   /** Accesor to the Rayleigh-Jeans Temperature in spectral window 0 and channel nc, for Water
     683             :    Vapor Column wh2o, Air Mass airmass, and perfect Sky Coupling to the sky */
     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             :   }
     689             :   /** Accesor to the Rayleigh-Jeans Temperature in spectral window spwid and channel nc, for Water
     690             :    Vapor Column wh2o, Air Mass airmass, and perfect Sky Coupling to the sky */
     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, Temperature::UnitKelvin));
     697             :   }
     698             :   /** Accesor to the Rayleigh-Jeans Temperature in spectral window 0 and channel nc, for Water
     699             :    Vapor Column wh2o, the current Air Mass, Sky Coupling skycoupling, and Spill Over Temperature Tspill */
     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             :   }
     708             :   /** Accesor to the Rayleigh-Jeans Temperature in spectral window spwid and channel nc, for Water
     709             :    Vapor Column wh2o, the current Air Mass, Sky Coupling skycoupling, and Spill Over Temperature Tspill */
     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             :   }
     718             :   /** Accesor to the Rayleigh-Jeans Temperature in spectral window 0 and channel nc, for the current
     719             :    User Water Column, Air Mass airmass, Sky Coupling skycoupling, and Spill Over Temperature Tspill */
     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             :   }
     728             :   /** Accesor to the Rayleigh-Jeans Temperature in spectral window spwid and channel nc, for the current
     729             :    User Water Column, Air Mass airmass, Sky Coupling skycoupling, and Spill Over Temperature Tspill */
     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             :   }
     738             :   /** Accesor to the Rayleigh-Jeans Temperature in spectral window 0 and channel nc, for Water Column
     739             :    wh2o, Air Mass airmass, Sky Coupling skycoupling, and Spill Over Temperature Tspill */
     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             :   }
     749             :   /** Accesor to the Rayleigh-Jeans Temperature in spectral window spwid and channel nc, for Water Column
     750             :    wh2o, Air Mass airmass, Sky Coupling skycoupling, and Spill Over Temperature Tspill */
     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             : 
     759             :   /** Accesor to get the integrated zenith Wet Opacity for the current conditions, for a single
     760             :    frequency RefractiveIndexProfile object or for the point 0 of spectral window 0 of a
     761             :    multi-window RefractiveIndexProfile object.
     762             :    There is overloading. The same accessor exists in RefractiveIndexProfile but in that
     763             :    case the returned value corresponds to the zenith water vapor column of the AtmProfile object.*/
     764             :   Opacity getWetOpacity(){unsigned int n = 0; return getWetOpacity(n);}
     765             :   Opacity getWetOpacityUpTo(Length refalti){unsigned int n = 0; return getWetOpacityUpTo(n, refalti);}
     766             :   /** Accesor to get the integrated zenith Wet Opacity for the current conditions,
     767             :    for the point nc of spectral window 0.
     768             :    There is overloading. The same accessor exists in RefractiveIndexProfile but in that
     769             :    case the returned value corresponds to the zenith water vapor column of the AtmProfile object.*/
     770    15616042 :   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);}
     772             :   /** Accesor to get the integrated zenith Wet Opacity for the current conditions,
     773             :    for the point nc of spectral window spwid.
     774             :    There is overloading. The same accessor exists in RefractiveIndexProfile but in that
     775             :    case the returned value corresponds to the zenith water vapor column of the AtmProfile object.*/
     776          10 :   Opacity getWetOpacity(unsigned int spwid, unsigned int nc)
     777             :   {
     778          10 :   if(!spwidAndIndexAreValid(spwid, nc)) return (double) -999.0;
     779          10 :     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             :   }
     786             :   /** Accesor to get the average Wet Opacity for the current conditions,
     787             :    in spectral window spwid.
     788             :    There is overloading. The same accessor exists in RefractiveIndexProfile but in that
     789             :    case the returned value corresponds to the zenith water vapor column of the AtmProfile object.*/
     790             :   Opacity getAverageWetOpacity(unsigned int spwid)
     791             :   {
     792             :     return RefractiveIndexProfile::getAverageWetOpacity(getGroundWH2O(),spwid)
     793             :         * ((getUserWH2O().get()) / (getGroundWH2O().get()));
     794             :   }
     795             :   Opacity getAverageH2OLinesOpacity(unsigned int spwid)
     796             :   {
     797             :     return RefractiveIndexProfile::getAverageH2OLinesOpacity(getGroundWH2O(),spwid)
     798             :         * ((getUserWH2O().get()) / (getGroundWH2O().get()));
     799             :   }
     800             :   Opacity getAverageH2OContOpacity(unsigned int spwid)
     801             :   {
     802             :     return RefractiveIndexProfile::getAverageH2OContOpacity(getGroundWH2O(),spwid)
     803             :         * ((getUserWH2O().get()) / (getGroundWH2O().get()));
     804             :   }
     805             : 
     806             :   Opacity getDryOpacity()
     807             :   {
     808             :     return RefractiveIndexProfile::getDryOpacity();
     809             :   }
     810     7808011 :   Opacity getDryOpacity(unsigned int nc)
     811             :   {
     812     7808011 :     return RefractiveIndexProfile::getDryOpacity(nc);
     813             :   }
     814          10 :   Opacity getDryOpacity(unsigned int spwid, unsigned int nc)
     815             :   {
     816          10 :     return RefractiveIndexProfile::getDryOpacity(spwid, nc);
     817             :   }
     818             :   Opacity getAverageDryOpacity(unsigned int spwid)
     819             :   {
     820             :     return RefractiveIndexProfile::getAverageDryOpacity(spwid);
     821             :   }
     822             : 
     823             :   Opacity getAverageO2LinesOpacity(unsigned int spwid)
     824             :   {
     825             :     return RefractiveIndexProfile::getAverageO2LinesOpacity(spwid);
     826             :   }
     827             :   Opacity getAverageO3LinesOpacity(unsigned int spwid)
     828             :   {
     829             :     return RefractiveIndexProfile::getAverageO3LinesOpacity(spwid);
     830             :   }
     831             :   Opacity getAverageN2OLinesOpacity(unsigned int spwid)
     832             :   {
     833             :     return RefractiveIndexProfile::getAverageN2OLinesOpacity(spwid);
     834             :   }
     835             :   Opacity getAverageNO2LinesOpacity(unsigned int spwid)
     836             :   {
     837             :     return RefractiveIndexProfile::getAverageNO2LinesOpacity(spwid);
     838             :   }
     839             :   Opacity getAverageSO2LinesOpacity(unsigned int spwid)
     840             :   {
     841             :     return RefractiveIndexProfile::getAverageSO2LinesOpacity(spwid);
     842             :   }
     843             :   Opacity getAverageCOLinesOpacity(unsigned int spwid)
     844             :   {
     845             :     return RefractiveIndexProfile::getAverageCOLinesOpacity(spwid);
     846             :   }
     847             :   Opacity getAverageDryContOpacity(unsigned int spwid)
     848             :   {
     849             :     return RefractiveIndexProfile::getAverageDryContOpacity(spwid);
     850             :   }
     851             : 
     852             :   Opacity getTotalOpacity()
     853             :   {
     854             :     return getWetOpacity() + getDryOpacity();
     855             :   }
     856           5 :   Opacity getTotalOpacity(unsigned int nc)
     857             :   {
     858          10 :     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             :   }
     868             :   Opacity getTotalOpacityUpTo(Length refalti)
     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,Opacity::UnitNeper);
     881             :     if(!spwidAndIndexAreValid(spwid, nc)) return wrongOp;
     882             :     return getTotalOpacityUpTo(v_transfertId_[spwid] + nc, refalti);
     883             :   }
     884             :   /** Accesor to get the integrated zenith H2O Lines Opacity for the current conditions,
     885             :    for a single frequency RefractiveIndexProfile object or for the point 0 of spectral
     886             :    window 0 of a multi-window RefractiveIndexProfile object.
     887             :    There is overloading. The same accessor exists in RefractiveIndexProfile but in that
     888             :    case the returned value corresponds to the zenith water vapor column of the AtmProfile object.*/
     889             :   Opacity getH2OLinesOpacity(){ unsigned int n = 0; return getH2OLinesOpacity(n);}
     890             :   Opacity getH2OLinesOpacityUpTo(Length refalti){ unsigned int n = 0; return getH2OLinesOpacityUpTo(n, refalti);}
     891             :   /** Accesor to get the integrated zenith H2O Lines Opacity for the current conditions,
     892             :    for the point nc of spectral window 0.
     893             :    There is overloading. The same accessor exists in RefractiveIndexProfile but in that
     894             :    case the returned value corresponds to the zenith water vapor column of the AtmProfile object.*/
     895             :   Opacity getH2OLinesOpacity(unsigned int nc);
     896             :   Opacity getH2OLinesOpacityUpTo(unsigned int nc, Length refalti);
     897             :   /** Accesor to get the integrated zenith H2O Lines Opacity for the current conditions,
     898             :    for the point nc of spectral window spwid.
     899             :    There is overloading. The same accessor exists in RefractiveIndexProfile but in that
     900             :    case the returned value corresponds to the zenith water vapor column of the AtmProfile object.*/
     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);}
     903             :   /** Accesor to get the integrated zenith H2O Continuum Opacity for the current conditions,
     904             :    for a single frequency RefractiveIndexProfile object or for the point 0 of spectral
     905             :    window 0 of a multi-window RefractiveIndexProfile object.
     906             :    There is overloading. The same accessor exists in RefractiveIndexProfile but in that
     907             :    case the returned value corresponds to the zenith water vapor column of the AtmProfile object.*/
     908             :   Opacity getH2OContOpacity(){unsigned int n = 0; return getH2OContOpacity(n);}
     909             :   Opacity getH2OContOpacityUpTo(Length refalti){unsigned int n = 0; return getH2OContOpacityUpTo(n, refalti);}
     910             :   /** Accesor to get the integrated zenith H2O Continuum Opacity for the current conditions,
     911             :    for the point nc of spectral window 0.
     912             :    There is overloading. The same accessor exists in RefractiveIndexProfile but in that
     913             :    case the returned value corresponds to the zenith water vapor column of the AtmProfile object.*/
     914             :   Opacity getH2OContOpacity(unsigned int nc);
     915             :   Opacity getH2OContOpacityUpTo(unsigned int nc, Length refalti);
     916             :   /** Accesor to get the integrated zenith H2O Continuum Opacity for the current conditions,
     917             :    for the point nc of spectral window spwid.
     918             :    There is overloading. The same accessor exists in RefractiveIndexProfile but in that
     919             :    case the returned value corresponds to the zenith water vapor column of the AtmProfile object.*/
     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);}
     922             :   /** Accesor to get the integrated zenith H2O Atmospheric Phase Delay (Dispersive part)
     923             :    for the current conditions, for a single frequency RefractiveIndexProfile object or
     924             :    for the point 0 of spectral window 0 of a multi-window RefractiveIndexProfile object.
     925             :    There is overloading. The same accessor exists in RefractiveIndexProfile but in that
     926             :    case the returned value corresponds to the zenith water vapor column of the AtmProfile object.*/
     927             :   Angle getDispersiveH2OPhaseDelay()
     928             :   {
     929             :     unsigned int n = 0;
     930             :     return getDispersiveH2OPhaseDelay(n);
     931             :   }
     932             :   /** Accesor to get the integrated zenith H2O Atmospheric Phase Delay (Dispersive part)
     933             :    for the current conditions, for a single frequency RefractiveIndexProfile object or
     934             :    for the point nc of spectral window 0.
     935             :    There is overloading. The same accessor exists in RefractiveIndexProfile but in that
     936             :    case the returned value corresponds to the zenith water vapor column of the AtmProfile object.*/
     937             :   Angle getDispersiveH2OPhaseDelay(unsigned int nc);
     938             :   /** Accesor to get the integrated zenith H2O Atmospheric Phase Delay (Dispersive part)
     939             :    for the current conditions, for a single frequency RefractiveIndexProfile object or
     940             :    for the point nc of spectral window spwid.
     941             :    There is overloading. The same accessor exists in RefractiveIndexProfile but in that
     942             :    case the returned value corresponds to the zenith water vapor column of the AtmProfile object.*/
     943             :   Angle getDispersiveH2OPhaseDelay(unsigned int spwid, unsigned int nc);
     944             : 
     945             :   /** Accesor to get the integrated zenith H2O Atmospheric Path length (Dispersive part)
     946             :    for the current conditions, for a single frequency RefractiveIndexProfile object or
     947             :    for the point 0 of spectral window 0 of a multi-window RefractiveIndexProfile object.
     948             :    There is overloading. The same accessor exists in RefractiveIndexProfile but in that
     949             :    case the returned value corresponds to the zenith water vapor column of the AtmProfile object.*/
     950             :   Length getDispersiveH2OPathLength()
     951             :   {
     952             :     unsigned int n = 0;
     953             :     return getDispersiveH2OPathLength(n);
     954             :   }
     955             :   /** Accesor to get the integrated zenith H2O Atmospheric Path length (Dispersive part)
     956             :    for the current conditions, for a single frequency RefractiveIndexProfile object or
     957             :    for the point nc of spectral window 0.
     958             :    There is overloading. The same accessor exists in RefractiveIndexProfile but in that
     959             :    case the returned value corresponds to the zenith water vapor column of the AtmProfile object.*/
     960             :   Length getDispersiveH2OPathLength(unsigned int nc);
     961             :   /** Accesor to get the integrated zenith H2O Atmospheric Path length (Dispersive part)
     962             :    for the current conditions, for a single frequency RefractiveIndexProfile object or
     963             :    for the point nc of spectral window spwid.
     964             :    There is overloading. The same accessor exists in RefractiveIndexProfile but in that
     965             :    case the returned value corresponds to the zenith water vapor column of the AtmProfile object.*/
     966             :   Length getDispersiveH2OPathLength(unsigned int spwid, unsigned int nc);
     967             : 
     968             :   /** Accesor to get the integrated zenith H2O Atmospheric Phase Delay (Non-Dispersive part)
     969             :    for the current conditions, for a single frequency RefractiveIndexProfile object or
     970             :    for the point 0 of spectral window 0 of a multi-window RefractiveIndexProfile object.
     971             :    There is overloading. The same accessor exists in RefractiveIndexProfile but in that
     972             :    case the returned value corresponds to the zenith water vapor column of the AtmProfile object.*/
     973             :   Angle getNonDispersiveH2OPhaseDelay()
     974             :   {
     975             :     unsigned int n = 0;
     976             :     return getNonDispersiveH2OPhaseDelay(n);
     977             :   }
     978             :   /** Accesor to get the integrated zenith H2O Atmospheric Phase Delay (Non-Dispersive part)
     979             :    for the current conditions, for a single frequency RefractiveIndexProfile object or
     980             :    for the point nc of spectral window 0.
     981             :    There is overloading. The same accessor exists in RefractiveIndexProfile but in that
     982             :    case the returned value corresponds to the zenith water vapor column of the AtmProfile object.*/
     983             :   Angle getNonDispersiveH2OPhaseDelay(unsigned int nc);
     984             :   /** Accesor to get the integrated zenith H2O Atmospheric Phase Delay (Non-Dispersive part)
     985             :    for the current conditions, for a single frequency RefractiveIndexProfile object or
     986             :    for the point nc of spectral window spwid.
     987             :    There is overloading. The same accessor exists in RefractiveIndexProfile but in that
     988             :    case the returned value corresponds to the zenith water vapor column of the AtmProfile object.*/
     989             :   Angle getNonDispersiveH2OPhaseDelay(unsigned int spwid, unsigned int nc);
     990             : 
     991             :   /** Accesor to get the integrated zenith H2O Atmospheric Path length (Non-Dispersive part)
     992             :    for the current conditions, for a single frequency RefractiveIndexProfile object or
     993             :    for the point 0 of spectral window 0 of a multi-window RefractiveIndexProfile object.
     994             :    There is overloading. The same accessor exists in RefractiveIndexProfile but in that
     995             :    case the returned value corresponds to the zenith water vapor column of the AtmProfile object.*/
     996             :   Length getNonDispersiveH2OPathLength()
     997             :   {
     998             :     unsigned int n = 0;
     999             :     return getNonDispersiveH2OPathLength(n);
    1000             :   }
    1001             :   /** Accesor to get the integrated zenith H2O Atmospheric Path length (Non-Dispersive part)
    1002             :    for the current conditions, for a single frequency RefractiveIndexProfile object or
    1003             :    for the point nc of spectral window 0.
    1004             :    There is overloading. The same accessor exists in RefractiveIndexProfile but in that
    1005             :    case the returned value corresponds to the zenith water vapor column of the AtmProfile object.*/
    1006             :   Length getNonDispersiveH2OPathLength(unsigned int nc);
    1007             :   /** Accesor to get the integrated zenith H2O Atmospheric Path length (Non-Dispersive part)
    1008             :    for the current conditions, for a single frequency RefractiveIndexProfile object or
    1009             :    for the point nc of spectral window spwid.
    1010             :    There is overloading. The same accessor exists in RefractiveIndexProfile but in that
    1011             :    case the returned value corresponds to the zenith water vapor column of the AtmProfile object.*/
    1012             :   Length getNonDispersiveH2OPathLength(unsigned int spwid, unsigned int nc);
    1013             : 
    1014             :   /** Accessor to get the average integrated zenith Atmospheric Phase Delay (Dispersive part)
    1015             :    for the current conditions in spectral Window spwid.
    1016             :    There is overloading. The same accessor exists in RefractiveIndexProfile but in that
    1017             :    case the returned value corresponds to the zenith water vapor column of the AtmProfile object.*/
    1018             :   Angle getAverageDispersiveH2OPhaseDelay(unsigned int spwid);
    1019             :   /** Accessor to get the average integrated zenith Atmospheric Phase Delay (Dispersive part)
    1020             :    for the current conditions in spectral Window 0.
    1021             :    There is overloading. The same accessor exists in RefractiveIndexProfile but in that
    1022             :    case the returned value corresponds to the zenith water vapor column of the AtmProfile object.*/
    1023             :   Angle getAverageDispersiveH2OPhaseDelay()
    1024             :   {
    1025             :     unsigned int n = 0;
    1026             :     return getAverageDispersiveH2OPhaseDelay(n);
    1027             :   }
    1028             :   /** Accessor to get the average integrated zenith Atmospheric Phase Delay (Non-Dispersive
    1029             :    part) in spectral Window spwid.
    1030             :    There is overloading. The same accessor exists in RefractiveIndexProfile but in that
    1031             :    case the returned value corresponds to the zenith water vapor column of the AtmProfile object.*/
    1032             :   Angle getAverageNonDispersiveH2OPhaseDelay(unsigned int spwid);
    1033             :   /** Accessor to get the average integrated zenith Atmospheric Phase Delay (Non-Dispersive
    1034             :    part) in spectral Window 0.
    1035             :    There is overloading. The same accessor exists in RefractiveIndexProfile but in that
    1036             :    case the returned value corresponds to the zenith water vapor column of the AtmProfile object.*/
    1037             :   Angle getAverageNonDispersiveH2OPhaseDelay()
    1038             :   {
    1039             :     unsigned int n = 0;
    1040             :     return getAverageNonDispersiveH2OPhaseDelay(n);
    1041             :   }
    1042             : 
    1043             :   /** Accessor to get the average integrated zenith Atmospheric Path Length (Dispersive part)
    1044             :    in spectral Window spwid.
    1045             :    There is overloading. The same accessor exists in RefractiveIndexProfile but in that
    1046             :    case the returned value corresponds to the zenith water vapor column of the AtmProfile object.*/
    1047             :   Length getAverageDispersiveH2OPathLength(unsigned int spwid);
    1048             :   /** Accessor to get the average integrated zenith Atmospheric Path Length (Dispersive part)
    1049             :    in spectral Window 0.
    1050             :    There is overloading. The same accessor exists in RefractiveIndexProfile but in that
    1051             :    case the returned value corresponds to the zenith water vapor column of the AtmProfile object.*/
    1052             :   Length getAverageDispersiveH2OPathLength()
    1053             :   {
    1054             :     unsigned int n = 0;
    1055             :     return getAverageDispersiveH2OPathLength(n);
    1056             :   }
    1057             :   /** Accessor to get the average integrated zenith Atmospheric Path Length (Non-Dispersive
    1058             :    part) in spectral Window spwid.
    1059             :    There is overloading. The same accessor exists in RefractiveIndexProfile but in that
    1060             :    case the returned value corresponds to the zenith water vapor column of the AtmProfile object.*/
    1061             :   Length getAverageNonDispersiveH2OPathLength(unsigned int spwid);
    1062             :   /** Accessor to get the average integrated zenith Atmospheric Path Length (Non-Dispersive
    1063             :    part) in spectral Window 0.
    1064             :    There is overloading. The same accessor exists in RefractiveIndexProfile but in that
    1065             :    case the returned value corresponds to the zenith water vapor column of the AtmProfile object.*/
    1066             :   Length getAverageNonDispersiveH2OPathLength()
    1067             :   {
    1068             :     unsigned int n = 0;
    1069             :     return getAverageNonDispersiveH2OPathLength(n);
    1070             :   }
    1071             : 
    1072         240 :   Length getAverageH2OPathLength(unsigned int spwid)
    1073             :   {
    1074         480 :     return getAverageDispersiveH2OPathLength(spwid)
    1075         720 :         + getAverageNonDispersiveH2OPathLength(spwid);
    1076             :   }
    1077             :   Length getAverageH2OPathLength()
    1078             :   {
    1079             :     unsigned int n = 0;
    1080             :     return getAverageH2OPathLength(n);
    1081             :   }
    1082             :   double getAverageH2OPathLengthDerivative(unsigned int spwid)
    1083             :   {
    1084             :     return getAverageH2OPathLength(spwid).get(Length::UnitMicrons)
    1085             :         / getUserWH2O().get(Length::UnitMicrons);
    1086             :   } // in microns/micron_H2O
    1087             :   double getAverageH2OPathLengthDerivative()
    1088             :   {
    1089             :     unsigned int n = 0;
    1090             :     return getAverageH2OPathLengthDerivative(n);
    1091             :   } // in microns/micron_H2O
    1092             : 
    1093             : 
    1094             :   Angle getAverageH2OPhaseDelay(unsigned int spwid)
    1095             :   {
    1096             :     return getAverageDispersiveH2OPhaseDelay(spwid)
    1097             :         + getAverageNonDispersiveH2OPhaseDelay(spwid);
    1098             :   }
    1099             :   Angle getAverageH2OPhaseDelay()
    1100             :   {
    1101             :     unsigned int n = 0;
    1102             :     return getAverageH2OPhaseDelay(n);
    1103             :   }
    1104             : 
    1105         240 :   Length getAverageDispersiveDryPathLength(unsigned int spwid)
    1106             :   {
    1107         240 :     return getAverageO2LinesPathLength(spwid)
    1108         720 :         + getAverageO3LinesPathLength(spwid)
    1109         960 :         + getAverageN2OLinesPathLength(spwid)
    1110         960 :         + getAverageCOLinesPathLength(spwid)
    1111         960 :         + getAverageNO2LinesPathLength(spwid)
    1112         720 :         + getAverageSO2LinesPathLength(spwid);
    1113             :   }
    1114             :   Length getAverageDispersiveDryPathLength()
    1115             :   {
    1116             :     unsigned int n = 0;
    1117             :     return getAverageDispersiveDryPathLength(n);
    1118             :   }
    1119             : 
    1120         240 :   Length getAverageNonDispersiveDryPathLength(unsigned int spwid)
    1121             :   {
    1122         240 :     return RefractiveIndexProfile::getAverageNonDispersiveDryPathLength(spwid);
    1123             :   }
    1124             :   Length getAverageNonDispersiveDryPathLength()
    1125             :   {
    1126             :     unsigned int n = 0;
    1127             :     return getAverageNonDispersiveDryPathLength(n);
    1128             :   }
    1129             :   double
    1130             :       getAverageNonDispersiveDryPathLength_GroundPressureDerivative(unsigned int spwid);
    1131             :   double
    1132             :       getAverageNonDispersiveDryPathLength_GroundTemperatureDerivative(unsigned int spwid);
    1133             :   double
    1134             :       getAverageDispersiveDryPathLength_GroundPressureDerivative(unsigned int spwid);
    1135             :   double
    1136             :       getAverageDispersiveDryPathLength_GroundTemperatureDerivative(unsigned int spwid);
    1137             : 
    1138         240 :   Length getAverageO2LinesPathLength(unsigned int spwid)
    1139             :   {
    1140         240 :     return RefractiveIndexProfile::getAverageO2LinesPathLength(spwid);
    1141             :   }
    1142             :   Length getAverageO2LinesPathLength()
    1143             :   {
    1144             :     unsigned int n = 0;
    1145             :     return getAverageO2LinesPathLength(n);
    1146             :   }
    1147             : 
    1148             :   /** Setter for a new set of basic atmospheric parameters. Automatically updates the AtmProfile
    1149             :    (if generated from this basic atmospheric parameters), RefractiveIndexProfile, and SkyStatus
    1150             :    objects if the one or more value differ from the previous ones (there is overloading) */
    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);
    1157             :   /** The same setter is available for only one parameter each time (except for "Length wvScaleHeight" due to a type
    1158             :    conflict with "Length altitude") */
    1159             :   bool setBasicAtmosphericParameters(const Length &altitude);
    1160             :   /** The same setter is available for only one parameter each time (except for "Length wvScaleHeight" due to a type
    1161             :    conflict with "Length altitude") */
    1162             :   bool setBasicAtmosphericParameters(const Temperature &groundTemperature);
    1163             :   /** The same setter is available for only one parameter each time (except for "Length wvScaleHeight" due to a type
    1164             :    conflict with "Length altitude") */
    1165             :   bool setBasicAtmosphericParameters(const Pressure &groundPressure);
    1166             :   /** The same setter is available for only one parameter each time (except for "Length wvScaleHeight" due to a type
    1167             :    conflict with "Length altitude") */
    1168             :   bool setBasicAtmosphericParameters(const Humidity &humidity);
    1169             :   /** The same setter is available for only one parameter each time (except for "Length wvScaleHeight" due to a type
    1170             :    conflict with "Length altitude") */
    1171             :   bool setBasicAtmosphericParameters(double tropoLapseRate);
    1172             :   /** The same setter is available for couples of parameters. The order does not matter except for (Length altitude) and
    1173             :    (Length wvScaleHeight) because they are of the same type (Length). The convention is that if a type Length is in first
    1174             :    position, it represents the altitude, and if it is in second position, it represents wvScaleHeight */
    1175             :   bool setBasicAtmosphericParameters(const Length &altitude,
    1176             :                                      const Temperature &groundTemperature);
    1177             :   /** The same setter is available for couples of parameters. The order does not matter except for (Length altitude) and
    1178             :    (Length wvScaleHeight) because they are of the same type (Length). The convention is that if a type Length is in first
    1179             :    position, it represents the altitude, and if it is in second position, it represents wvScaleHeight */
    1180             :   bool setBasicAtmosphericParameters(const Length &altitude, const Pressure &groundPressure);
    1181             :   /** The same setter is available for couples of parameters. The order does not matter except for (Length altitude) and
    1182             :    (Length wvScaleHeight) because they are of the same type (Length). The convention is that if a type Length is in first
    1183             :    position, it represents the altitude, and if it is in second position, it represents wvScaleHeight */
    1184             :   bool setBasicAtmosphericParameters(const Length &altitude, const Humidity &humidity);
    1185             :   /** The same setter is available for couples of parameters. The order does not matter except for (Length altitude) and
    1186             :    (Length wvScaleHeight) because they are of the same type (Length). The convention is that if a type Length is in first
    1187             :    position, it represents the altitude, and if it is in second position, it represents wvScaleHeight */
    1188             :   bool setBasicAtmosphericParameters(const Length &altitude, double tropoLapseRate);
    1189             :   /** The same setter is available for couples of parameters. The order does not matter except for (Length altitude) and
    1190             :    (Length wvScaleHeight) because they are of the same type (Length). The convention is that if a type Length is in first
    1191             :    position, it represents the altitude, and if it is in second position, it represents wvScaleHeight */
    1192             :   bool setBasicAtmosphericParameters(const Length &altitude, const Length &wvScaleHeight);
    1193             :   /** The same setter is available for couples of parameters. The order does not matter */
    1194             :   bool setBasicAtmosphericParameters(const Temperature &groundTemperature,
    1195             :                                      const Pressure &groundPressure);
    1196             :   /** The same setter is available for couples of parameters. The order does not matter  */
    1197             :   bool setBasicAtmosphericParameters(const Pressure &groundPressure,
    1198             :                                      const Temperature &groundTemperature);
    1199             :   /** The same setter is available for couples of parameters. The order does not matter  */
    1200             :   bool setBasicAtmosphericParameters(const Temperature &groundTemperature,
    1201             :                                      const Humidity &humidity);
    1202             :   /** The same setter is available for couples of parameters. The order does not matter  */
    1203             :   bool setBasicAtmosphericParameters(const Humidity &humidity,
    1204             :                                      const Temperature &groundTemperature);
    1205             :   /** The same setter is available for couples of parameters. The order does not matter  */
    1206             :   bool setBasicAtmosphericParameters(const Temperature &groundTemperature,
    1207             :                                      double tropoLapseRate);
    1208             :   /** The same setter is available for couples of parameters. The order does not matter  */
    1209             :   bool setBasicAtmosphericParameters(double tropoLapseRate,
    1210             :                                      const Temperature &groundTemperature);
    1211             :   /** The same setter is available for couples of parameters. The order does not matter except for (Length altitude) and
    1212             :    (Length wvScaleHeight) because they are of the same type (Length). The convention is that if a type Length is in first
    1213             :    position, it represents the altitude, and if it is in second position, it represents wvScaleHeight */
    1214             :   bool setBasicAtmosphericParameters(const Temperature &groundTemperature,
    1215             :                                      const Length &wvScaleHeight);
    1216             :   /** The same setter is available for couples of parameters. The order does not matter  */
    1217             :   bool
    1218             :       setBasicAtmosphericParameters(const Pressure &groundPressure, const Humidity &humidity);
    1219             :   /** The same setter is available for couples of parameters. The order does not matter  */
    1220             :   bool
    1221             :       setBasicAtmosphericParameters(const Humidity &humidity, const Pressure &groundPressure);
    1222             :   /** The same setter is available for couples of parameters. The order does not matter  */
    1223             :   bool setBasicAtmosphericParameters(const Pressure &groundPressure,
    1224             :                                      double tropoLapseRate);
    1225             :   /** The same setter is available for couples of parameters. The order does not matter */
    1226             :   bool setBasicAtmosphericParameters(double tropoLapseRate,
    1227             :                                      const Pressure &groundPressure);
    1228             :   /** The same setter is available for couples of parameters. The order does not matter except for (Length altitude) and
    1229             :    (Length wvScaleHeight) because they are of the same type (Length). The convention is that if a type Length is in first
    1230             :    position, it represents the altitude, and if it is in second position, it represents wvScaleHeight */
    1231             :   bool setBasicAtmosphericParameters(const Pressure &groundPressure,
    1232             :                                      const Length &wvScaleHeight);
    1233             :   /** The same setter is available for couples of parameters. The order does not matter  */
    1234             :   bool setBasicAtmosphericParameters(const Humidity &humidity, double tropoLapseRate);
    1235             :   /** The same setter is available for couples of parameters. The order does not matter  */
    1236             :   bool setBasicAtmosphericParameters(double tropoLapseRate, const Humidity &humidity);
    1237             :   /** The same setter is available for couples of parameters. The order does not matter except for (Length altitude) and
    1238             :    (Length wvScaleHeight) because they are of the same type (Length). The convention is that if a type Length is in first
    1239             :    position, it represents the altitude, and if it is in second position, it represents wvScaleHeight */
    1240             :   bool setBasicAtmosphericParameters(const Humidity &humidity, const Length &wvScaleHeight);
    1241             :   /** The same setter is available for couples of parameters. The order does not matter except for (Length altitude) and
    1242             :    (Length wvScaleHeight) because they are of the same type (Length). The convention is that if a type Length is in first
    1243             :    position, it represents the altitude, and if it is in second position, it represents wvScaleHeight */
    1244             :   bool setBasicAtmosphericParameters(double tropoLapseRate,
    1245             :                                      const Length &wvScaleHeight);
    1246             : 
    1247             :   /** Setter of new spectral windows (adds frequencies to the SpectralGrid and calculates the corresponding absorption coefficients) */
    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             :   }
    1255             :   /** Setter of new spectral windows (adds frequencies to the SpectralGrid and calculates the corresponding absorption coefficients) */
    1256             :   void addNewSpectralWindow(unsigned int numChan,
    1257             :                             unsigned int refChan,
    1258             :                             double* chanFreq,
    1259             :                             Frequency::Units freqUnits)
    1260             :   {
    1261             :     RefractiveIndexProfile::add(numChan, refChan, chanFreq, freqUnits);
    1262             :   }
    1263             :   /** Setter of new spectral windows (adds frequencies to the SpectralGrid and calculates the corresponding absorption coefficients) */
    1264             :   void addNewSpectralWindow(unsigned int numChan,
    1265             :                             double refFreq,
    1266             :                             double* chanFreq,
    1267             :                             Frequency::Units freqUnits)
    1268             :   {
    1269             :     RefractiveIndexProfile::add(numChan, refFreq, chanFreq, freqUnits);
    1270             :   }
    1271             :   /** Setter of new spectral windows (adds frequencies to the SpectralGrid and calculates the corresponding absorption coefficients) */
    1272             :   void addNewSpectralWindow(unsigned int numChan,
    1273             :                             double refFreq,
    1274             :                             const vector<double> &chanFreq,
    1275             :                             Frequency::Units freqUnits)
    1276             :   {
    1277             :     RefractiveIndexProfile::add(numChan, refFreq, chanFreq, freqUnits);
    1278             :   }
    1279             :   /** Setter of new spectral windows (adds frequencies to the SpectralGrid and calculates the corresponding absorption coefficients) */
    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             :   {
    1288             :     RefractiveIndexProfile::add(numChan,
    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             : 
    1301             :   /** Zenith Water Vapor column retrieval based on fitting the vector of zenith atmospheric transmission given as input.
    1302             :    Requirements: A) The FTS individual frequencies must be in spectral window 0, and B) the input zenith atmospheric
    1303             :    transmission vector should match those frequencies (i.e. both vectors should have the same size),
    1304             :    C) the air mass for the retrieval is the current one. If a different one is desired, it should be
    1305             :    changed using the setAirMass setter. */
    1306             :   Length WaterVaporRetrieval_fromFTS(const vector<double> &v_transmission)
    1307             :   {
    1308             :     unsigned int spwId = 0;
    1309             :     Frequency f1(-999, Frequency::UnitGigaHertz);
    1310             :     Frequency f2(-999, Frequency::UnitGigaHertz);
    1311             :     return WaterVaporRetrieval_fromFTS(spwId, v_transmission, f1, f2);
    1312             :   }
    1313             :   /** Same as above but using for the retrieval only the measurements between frequencies f1 and f2>f1 */
    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             :   }
    1321             :   /** Zenith Water Vapor column retrieval based on fitting the vector of zenith atmospheric transmission given as input.
    1322             :    Requirements: A) The FTS individual frequencies must be in spectral window spwId, and B) the input zenith atmospheric
    1323             :    transmission vector should match those frequencies (i.e. both vectors should have the same size),
    1324             :    C) the air mass for the retrieval is the current one. If a different one is desired, it should be
    1325             :    changed using the setAirMass setter. */
    1326             :   Length WaterVaporRetrieval_fromFTS(unsigned int spwId,
    1327             :                                      const vector<double> &v_transmission)
    1328             :   {
    1329             :     Frequency f1(-999, Frequency::UnitGigaHertz);
    1330             :     Frequency f2(-999, Frequency::UnitGigaHertz);
    1331             :     return WaterVaporRetrieval_fromFTS(spwId, v_transmission, f1, f2);
    1332             :   }
    1333             :   /** Same as above but using for the retrieval only the measurements between frequencies f1 and f2>f1 */
    1334             :   Length WaterVaporRetrieval_fromFTS(unsigned int spwId,
    1335             :                                      const vector<double> &v_transmission,
    1336             :                                      const Frequency &f1,
    1337             :                                      const Frequency &f2);
    1338             : 
    1339             :   /** Zenith Water Vapor column retrieval based on fitting measured brightness temperatures of the atmosphere */
    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             : 
    1596             :   /** (Re)setter of water vapor radiometer channels */
    1597             :   void setWaterVaporRadiometer(const WaterVaporRadiometer &waterVaporRadiometer)
    1598             :   {
    1599             :     waterVaporRadiometer_ = waterVaporRadiometer;
    1600             :   }
    1601             :   /** Performs a sky coupling retrieval using WVR measurement sets between n and m
    1602             :    (obtains the ratio between the current sky couplings of all WVR channels and the best fit that
    1603             :    results from WVR measurement sets between n and m, keeping the other parameters unchanged)
    1604             :    and uses the result to update the Skycoupling of all WVR channels */
    1605             :   void updateSkyCoupling_fromWVR(vector<WVRMeasurement> &RadiometerData,
    1606             :                                  unsigned int n,
    1607             :                                  unsigned int m);
    1608             :   /** Performs a sky coupling retrieval using WVR measurement sets between n and m
    1609             :    (obtains the ratio between the current sky coupling of a single WVR channel (ichan) and the best fit that
    1610             :    results from WVR measurement sets between n and m, keeping the other parameters unchanged)
    1611             :    and uses the result to update the Skycoupling of than WVR channel */
    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             :   }
    1636             :   /** Accessor to the sky coupling of channel n of the Water Vapor Radiometer*/
    1637             :   double getWaterVaporRadiometerSkyCoupling(int n) const
    1638             :   {
    1639             :     return waterVaporRadiometer_.getSkyCoupling()[n];
    1640             :   }
    1641             :   /** Accessor to the sky coupling of channel n of the Water Vapor Radiometer*/
    1642             :   Percent getWaterVaporRadiometerSignalGain(int n) const
    1643             :   {
    1644             :     return waterVaporRadiometer_.getsignalGain()[n];
    1645             :   }
    1646             :   /** Performs water vapor retrieval for WVR measurement sets between n and m */
    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             :   }
    1655             :   /** Performs water vapor retrieval for one WVR measurement */
    1656             :   void WaterVaporRetrieval_fromWVR(WVRMeasurement &RadiometerData);
    1657             :   /** Accessor to get or check the water vapor radiometer channels */
    1658             :   WaterVaporRadiometer getWaterVaporRadiometer() const
    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             : 
    1752             :   //@}
    1753             : 
    1754             : protected:
    1755             : 
    1756             :   double airMass_; //!< Air Mass used for the radiative transfer
    1757             :   Temperature skyBackgroundTemperature_; //!< Blackbody temperature of the sky background
    1758             :   Length wh2o_user_; //!< Water vapor column used for radiative transfer calculations. If not provided,
    1759             :   //!< the one retrieved from the water vapor radiometer channels will be used.
    1760             :   WaterVaporRadiometer waterVaporRadiometer_; // !< Identifiers, sky coupling, and sideband gain of channels corresponding to the water vapor radiometer.
    1761             : 
    1762             : 
    1763             :   void iniSkyStatus(); //!< Basic Method initialize the class when using the constructors.
    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(); //!< Resets retrieved water column to zero, or the default value.
    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             : 
    1778           0 :   Length mkWaterVaporRetrieval_fromTEBB(unsigned int spwId,
    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             :   {
    1786             :                 return mkWaterVaporRetrieval_fromTEBB(
    1787           0 :                                 vector<unsigned int>(1, spwId),
    1788           0 :                                 vector<Percent>(1, signalGain),
    1789           0 :                                 vector<vector<Temperature> >(1, v_measuredSkyTEBB),
    1790             :                                 airm,
    1791           0 :                                 vector<vector<double> >(1, spwId_filter),
    1792           0 :                                 vector<double>(1, skycoupling),
    1793           0 :                                 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             : 
    1822             :   WVRMeasurement
    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           4 :   double RT(double pfit_wh2o,
    1853             :             double skycoupling,
    1854             :             double tspill,
    1855             :             double airmass,
    1856             :             unsigned int spwid)
    1857             :   {
    1858           4 :     double tebb_channel = 0.0;
    1859           8 :     for(unsigned int n = 0; n < v_numChan_[spwid]; n++) {
    1860           4 :       tebb_channel = tebb_channel + RT(pfit_wh2o,
    1861             :                                        skycoupling,
    1862             :                                        tspill,
    1863             :                                        airmass,
    1864             :                                        spwid,
    1865           4 :                                        n) / (v_numChan_[spwid]);
    1866             :     }
    1867           4 :     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           0 :   double RT(double pfit_wh2o,
    1890             :             double skycoupling,
    1891             :             double tspill,
    1892             :             double airmass,
    1893             :             unsigned int spwid,
    1894             :             const Percent &signalgain)
    1895             :   {
    1896           0 :     vector<double> spwId_filter;
    1897           0 :     for(unsigned int n = 0; n < v_numChan_[spwid]; n++) {
    1898           0 :       spwId_filter.push_back(1.0);
    1899             :     }
    1900           0 :     return RT(pfit_wh2o,
    1901             :               skycoupling,
    1902             :               tspill,
    1903             :               airmass,
    1904             :               spwid,
    1905             :               spwId_filter,
    1906           0 :               signalgain);
    1907           0 :   }
    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, Percent::UnitPercent));
    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           0 :   double RTRJ(double pfit_wh2o,
    1972             :             double skycoupling,
    1973             :             double tspill,
    1974             :             double airmass,
    1975             :             unsigned int spwid)
    1976             :   {
    1977           0 :     double trj_channel = 0.0;
    1978           0 :     for(unsigned int n = 0; n < v_numChan_[spwid]; n++) {
    1979           0 :       trj_channel = trj_channel + RTRJ(pfit_wh2o,
    1980             :                                        skycoupling,
    1981             :                                        tspill,
    1982             :                                        airmass,
    1983             :                                        spwid,
    1984           0 :                                        n) / (v_numChan_[spwid]);
    1985             :     }
    1986           0 :     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, Percent::UnitPercent));
    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
    2071             :   double sigma_transmission_FTSfit_;
    2072             :   Temperature sigma_TEBBfit_;
    2073             : 
    2074             : }; // class SkyStatus
    2075             : 
    2076             : ATM_NAMESPACE_END
    2077             : 
    2078             : #endif /*!_ATM_SKYSTATUS_H*/

Generated by: LCOV version 1.16