Changeset 830
- Timestamp:
- 02/17/06 15:49:59 (19 years ago)
- Location:
- trunk/src
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/STFrequencies.cpp
r806 r830 92 92 93 93 94 95 void STFrequencies::getEntry( Double& refpix, Double& refval, Double& inc, 96 uInt id ) 97 { 98 Table t = table_(table_.col("ID") == Int(id) ); 99 if (t.nrow() == 0 ) { 100 throw(AipsError("STFrequencies::getEntry - freqID out of range")); 101 } 102 ROTableRow row(t); 103 // get first row - there should only be one matching id 104 const TableRecord& rec = row.get(0); 105 refpix = rec.asDouble("REFPIX"); 106 refval = rec.asDouble("REFVAL"); 107 inc = rec.asDouble("INCREMENT"); 108 } 109 94 110 SpectralCoordinate STFrequencies::getSpectralCoordinate( uInt freqID ) 95 111 { -
trunk/src/STFrequencies.h
r806 r830 43 43 casa::Double inc ); 44 44 45 //const casa::Table& table() const { return table_; }46 //casa::Table table() { return table_; }45 void getEntry( casa::Double& refpix, casa::Double& refval, 46 casa::Double& inc, casa::uInt id ); 47 47 48 48 casa::SpectralCoordinate getSpectralCoordinate( casa::uInt freqID ); … … 59 59 void rescale(casa::Float factor, const std::string& mode); 60 60 61 float getRefFreq(casa::uInt d, casa::uInt channel);61 float getRefFreq(casa::uInt id, casa::uInt channel); 62 62 63 63 std::string print(int id=-1); -
trunk/src/STMolecules.cpp
r809 r830 78 78 } 79 79 80 void STMolecules::getEntry( Double restfreq, String& name, 81 String& formattedname, uInt id ) 82 { 83 Table t = table_(table_.col("ID") == Int(id) ); 84 if (t.nrow() == 0 ) { 85 throw(AipsError("STMolecules::getEntry - id out of range")); 86 } 87 ROTableRow row(t); 88 // get first row - there should only be one matching id 89 const TableRecord& rec = row.get(0); 90 restfreq = rec.asDouble("RESTFREQUENCY"); 91 name = rec.asString("NAME"); 92 formattedname = rec.asString("FORMATTEDNAME"); 80 93 } 94 95 } //namespace -
trunk/src/STMolecules.h
r809 r830 36 36 const casa::String& formattedname=""); 37 37 38 void getEntry( casa::Double restfreq, casa::String& name, 39 casa::String& formattedname, casa::uInt id); 40 38 41 private: 39 42 void setup(); -
trunk/src/STTcal.cpp
r810 r830 74 74 } 75 75 76 void STTcal::getEntry( String& time, Vector<Float>& tcal, uInt id ) 77 { 78 Table t = table_(table_.col("ID") == Int(id) ); 79 if (t.nrow() == 0 ) { 80 throw(AipsError("STTcal::getEntry - id out of range")); 81 } 82 ROTableRow row(t); 83 // get first row - there should only be one matching id 84 const TableRecord& rec = row.get(0); 85 time = rec.asString("TIME"); 86 tcal.resize(); 87 Vector<Float> out; 88 rec.get("TCAL",out); 89 tcal = out; 76 90 } 77 91 92 } //namespace 93 -
trunk/src/STTcal.h
r810 r830 36 36 casa::uInt addEntry( const casa::String& time, 37 37 const casa::Vector<casa::Float>& tcal); 38 void getEntry( casa::String& time, casa::Vector<casa::Float>& tcal, 39 casa::uInt id ); 38 40 39 41 private: -
trunk/src/STTemplates.cpp
r816 r830 34 34 #include <casa/namespace.h> 35 35 #include <casa/Exceptions/Error.cc> 36 //#include <casa/Exceptions/Error2.cc>37 36 #include <casa/Utilities/CountedPtr.cc> 38 //#include <casa/Utilities/CountedPtr2.cc>39 37 40 38 namespace asap { … … 110 108 const Vector<Bool>&, 111 109 Bool, Bool); 112 template uInt addEntry(Vector<uInt>&, uInt);113 template void extendLastArrayAxis(Array<Int>&, const Array<Int>&,114 const Int& initVal);115 110 } 116 111 //template Array<Bool> SDPolUtil::stokesData (Array<Bool>& dataIn, Bool); -
trunk/src/STWeather.cpp
r811 r830 82 82 } 83 83 84 void STWeather::getEntry( Float& temperature, Float& pressure, 85 Float& humidity, Float& windspeed, Float& windaz, 86 uInt id ) 87 { 88 Table t = table_(table_.col("ID") == Int(id) ); 89 if (t.nrow() == 0 ) { 90 throw(AipsError("STWeather::getEntry - id out of range")); 91 } 92 ROTableRow row(t); 93 // get first row - there should only be one matching id 94 const TableRecord& rec = row.get(0); 95 temperature = rec.asFloat("TEMPERATURE"); 96 pressure = rec.asDouble("PRESSURE"); 97 humidity = rec.asDouble("HUMIDITY"); 98 windspeed = rec.asDouble("WINDSPEED"); 99 windaz = rec.asDouble("WINDAZ"); 84 100 } 101 102 } 103 -
trunk/src/STWeather.h
r811 r830 35 35 casa::uInt addEntry( casa::Float temperature, casa::Float pressure, 36 36 casa::Float humidity, 37 casa::Float windspeed, casa::Float windaz); 37 casa::Float windspeed, casa::Float windaz); 38 39 void getEntry( casa::Float& temperature, casa::Float& pressure, 40 casa::Float& humidity, 41 casa::Float& windspeed, casa::Float& windaz, 42 casa::uInt id); 38 43 39 44 private:
Note:
See TracChangeset
for help on using the changeset viewer.