Line data Source code
1 : #ifndef _ATM_WATERVAPORRADIOMETER_H 2 : #define _ATM_WATERVAPORRADIOMETER_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: ATMWaterVaporRadiometer.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 "ATMPercent.h" 34 : #include "ATMTemperature.h" 35 : 36 : #include <vector> 37 : 38 : using std::vector; 39 : 40 : ATM_NAMESPACE_BEGIN 41 : 42 : /*! \brief This is an axuliary class to SkyStatus that allows to identify the spectral windows 43 : * that actually correspond to a dedicated water vapor radiometry system, and also to 44 : * associate to those spectral windows some instrumental caracteristics such as the signal 45 : * side band gain, the sky coupling or the spillover temperature. 46 : */ 47 : class WaterVaporRadiometer 48 : { 49 : public: 50 : 51 1728 : WaterVaporRadiometer() {} 52 : 53 : /** Class constructor with identifiers of radiometric channels. Sky Coupling = 1.0, Sideband Gain: 50% (no spilloverTemperature given) */ 54 : WaterVaporRadiometer(const vector<unsigned int> &IdChannels); 55 : 56 : /** Class constructor with identifiers of radiometric channels. Sideband Gain: 50% (no spilloverTemperature given) */ 57 : WaterVaporRadiometer(const vector<unsigned int> &IdChannels, 58 : const vector<double> &skyCoupling); 59 : 60 : inline WaterVaporRadiometer(const vector<unsigned int> &IdChannels, 61 : double skyCoupling) 62 : { 63 : WaterVaporRadiometer(IdChannels, vector<double> (IdChannels.size(), 64 : skyCoupling)); 65 : } 66 : 67 : /** Class constructor with identifiers of radiometric channels. Sky Coupling = 1.0 (no spilloverTemperature given) */ 68 : WaterVaporRadiometer(const vector<unsigned int> &IdChannels, 69 : const vector<Percent> &signalGain); 70 : 71 : /* WaterVaporRadiometer(vector<unsigned int> IdChannels, Percent signalGain); */ 72 : 73 : /** Full class constructor (no spilloverTemperature given) */ 74 : WaterVaporRadiometer(const vector<unsigned int> &IdChannels, 75 : const vector<double> &skyCoupling, 76 : const vector<Percent> &signalGain); 77 : 78 : /** Class constructor with identifiers of radiometric channels. Sky Coupling = 1.0, Sideband Gain: 50% (spilloverTemperature given) */ 79 : WaterVaporRadiometer(const vector<unsigned int> &IdChannels, 80 : const Temperature &spilloverTemperature); 81 : 82 : /** Class constructor with identifiers of radiometric channels. Sideband Gain: 50% (spilloverTemperature given) */ 83 : WaterVaporRadiometer(const vector<unsigned int> &IdChannels, 84 : const vector<double> &skyCoupling, 85 : const Temperature &spilloverTemperature); 86 : 87 : /** Class constructor with identifiers of radiometric channels. Sky Coupling = 1.0 (spilloverTemperature given) */ 88 : WaterVaporRadiometer(const vector<unsigned int> &IdChannels, 89 : const vector<Percent> &signalGain, 90 : const Temperature &spilloverTemperature); 91 : 92 : /** Full class constructor (spilloverTemperature given) */ 93 : WaterVaporRadiometer(const vector<unsigned int> &IdChannels, 94 : const vector<double> &skyCoupling, 95 : const vector<Percent> &signalGain, 96 : const Temperature &spilloverTemperature); 97 : 98 : virtual ~WaterVaporRadiometer(); 99 : 100 : /** Accessor to identifiers of radiometric channels (vector of int) */ 101 0 : inline vector<unsigned int> getIdChannels() const { return IdChannels_; } 102 : 103 : /** Accessor to Sky coupling of the different radiometric channels (vector of double) */ 104 0 : inline vector<double> getSkyCoupling() const { return skyCoupling_; } 105 : 106 : /** Multiplier of the Sky coupling vector */ 107 0 : inline void multiplySkyCoupling(double factor) 108 : { 109 0 : for(unsigned int i = 0; i < skyCoupling_.size(); i++) { 110 0 : skyCoupling_[i] = skyCoupling_[i] * factor; 111 : } 112 0 : } 113 : /** Multiplier of one Sky coupling channel */ 114 0 : inline void multiplySkyCouplingChannel(unsigned int ichan, double factor) 115 : { 116 0 : skyCoupling_[ichan] = skyCoupling_[ichan] * factor; 117 0 : } 118 : 119 : /** Setter of the Sky coupling vector to a single Sky Coupling value */ 120 : inline void setSkyCoupling(double factor) 121 : { 122 : /* for(unsigned int i=0; i<skyCoupling_.size(); i++){ skyCoupling_[i] = factor;} */ 123 : for(vector<double>::iterator it(skyCoupling_.begin()), 124 : itmax(skyCoupling_.end()); it != itmax; ++it) { 125 : (*it) = factor; 126 : } 127 : } 128 : inline void setSkyCoupling(unsigned int i, double factor) 129 : { 130 : if(i < skyCoupling_.size()) { 131 : skyCoupling_[i] = factor; 132 : } else { /* throw(Error()); */ 133 : } 134 : } 135 : 136 : /** Accessor to signalGain of the different radiometric channels (vector of percent) */ 137 0 : inline vector<Percent> getsignalGain() const { return signalGain_; } 138 : /** Accessor to SpilloverTemperature */ 139 0 : inline Temperature getSpilloverTemperature() const { return spilloverTemperature_; } 140 : /** Setter of SpilloverTemperature */ 141 : inline void setSpilloverTemperature(Temperature spilloverTemperature) { spilloverTemperature_ = spilloverTemperature; } 142 : 143 : protected: 144 : vector<unsigned int> IdChannels_; 145 : vector<double> skyCoupling_; 146 : vector<Percent> signalGain_; 147 : Temperature spilloverTemperature_; 148 : 149 : private: 150 : // /** Inaccessible Copy Constructor */ 151 : // WaterVaporRadiometer(const WaterVaporRadiometer&); 152 : 153 : // /** Inaccessible assignment operator */ 154 : // WaterVaporRadiometer& operator=(const WaterVaporRadiometer&); 155 : 156 : 157 : }; // class WaterVaporRadiometer 158 : 159 : ATM_NAMESPACE_END 160 : 161 : #endif /*!_ATM_WATERVAPORRADIOMETER_H*/