Line data Source code
1 : /******************************************************************************* 2 : * ALMA - Atacama Large Millimeter Array 3 : * (c) Instituto de Estructura de la Materia, 2011 4 : * (in the framework of the ALMA collaboration). 5 : * All rights reserved. 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 : 22 : #include <string> 23 : #include <vector> 24 : #include <iostream> 25 : #include <fstream> 26 : using namespace std; 27 : 28 : #include <atmosphere/ATM/ATMPercent.h> 29 : #include <atmosphere/ATM/ATMPressure.h> 30 : #include <atmosphere/ATM/ATMNumberDensity.h> 31 : #include <atmosphere/ATM/ATMMassDensity.h> 32 : #include <atmosphere/ATM/ATMTemperature.h> 33 : #include <atmosphere/ATM/ATMLength.h> 34 : #include <atmosphere/ATM/ATMInverseLength.h> 35 : #include <atmosphere/ATM/ATMOpacity.h> 36 : #include <atmosphere/ATM/ATMAngle.h> 37 : #include <atmosphere/ATM/ATMHumidity.h> 38 : #include <atmosphere/ATM/ATMFrequency.h> 39 : #include <atmosphere/ATM/ATMWaterVaporRadiometer.h> 40 : #include <atmosphere/ATM/ATMWVRMeasurement.h> 41 : #include <atmosphere/ATM/ATMProfile.h> 42 : #include <atmosphere/ATM/ATMSpectralGrid.h> 43 : #include <atmosphere/ATM/ATMRefractiveIndex.h> 44 : #include <atmosphere/ATM/ATMRefractiveIndexProfile.h> 45 : #include <atmosphere/ATM/ATMSkyStatus.h> 46 : using namespace atm; 47 : 48 : 49 : 50 1 : int main() 51 : 52 : { 53 : 54 : SpectralGrid *pSpectralGrid; 55 : 56 1 : int numChan(11); 57 : 58 1 : int refChan(11/2+1); 59 : 60 2 : Frequency refFreq(100.,"Hz"); 61 : 62 2 : Frequency chanSep(1.0,"Hz"); 63 : 64 1 : pSpectralGrid = new SpectralGrid(numChan,refChan,refFreq,chanSep); 65 : 66 : 67 : 68 1 : cout << "Setting SPW:" << endl; 69 : 70 1 : cout << "- numChan = " << numChan << endl; 71 : 72 1 : cout << "- refFreq = " << refFreq.get("Hz") << " [Hz]" << endl; 73 : 74 1 : cout << "- refChan = " << refChan << endl; 75 : 76 1 : cout << "- chanSep = " << chanSep.get("Hz") << " [Hz]" << endl; 77 : 78 : 79 : 80 1 : cout << "\nSpectral Grid defined:" << endl; 81 : 82 1 : cout << "- frequency of refChan = " 83 : 84 1 : << pSpectralGrid->getChanFreq(refChan).get("Hz") << " [Hz]" << endl; 85 : 86 12 : for(int i = 0; i < numChan; i++) { 87 : 88 11 : cout << "Frequency of channel " << i << ": " << pSpectralGrid->getChanFreq(i).get("Hz") << " [Hz]" << endl; 89 : 90 : } 91 : 92 1 : delete pSpectralGrid; 93 : 94 : 95 1 : }