Changeset 236
- Timestamp:
- 01/21/05 12:22:45 (20 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/SDMemTable.cc
r218 r236 907 907 } 908 908 909 void SDMemTable::setInstrument(const std::string& name) 910 { 911 Bool throwIt = True; 912 Instrument ins = convertInstrument (name, throwIt); 913 String nameU(name); 914 nameU.upcase(); 915 table_.rwKeywordSet().define(String("AntennaName"), nameU); 916 } 917 909 918 std::string SDMemTable::summary() { 910 919 ROScalarColumn<Int> scans(table_, "SCANID"); … … 1087 1096 } 1088 1097 1098 1099 Instrument SDMemTable::convertInstrument (const String& instrument, 1100 Bool throwIt) 1101 { 1102 String t(instrument); 1103 t.upcase(); 1104 // 1105 Instrument inst = asap::UNKNOWN; 1106 if (t==String("TID")) { 1107 inst = TIDBINBILLA; 1108 } else if (t==String("ATPKSMB")) { 1109 inst = PKSMULTIBEAM; 1110 } else if (t==String("ATPKSSB")) { 1111 inst = PKSSINGLEBEAM; 1112 } else if (t==String("MOPRA")) { 1113 inst = MOPRA; 1114 } else { 1115 if (throwIt) { 1116 throw AipsError("Unrecognized instrument - use function scan.set_instrument to set"); 1117 } 1118 } 1119 return inst; 1120 } 1121 -
trunk/src/SDMemTable.h
r218 r236 36 36 #include <vector> 37 37 // AIPS++ 38 #include <casa/aips.h>38 #include <casa/aips.h> 39 39 #include <casa/BasicSL/String.h> 40 40 #include <tables/Tables/Table.h> 41 41 #include <casa/Arrays/MaskedArray.h> 42 #include "SDDefs.h" 42 43 43 44 #include <coordinates/Coordinates/SpectralCoordinate.h> … … 104 105 std::string getFluxUnit() const; 105 106 void setFluxUnit (const std::string& unit); 107 108 // Set Instrument 109 void setInstrument (const std::string& instrument); 106 110 107 111 // set the current value … … 174 178 casa::MEpoch::Types getTimeReference () const; 175 179 180 // Helper function to check instrument (antenna) name and give enum 181 static Instrument convertInstrument (const casa::String& instrument, 182 casa::Bool throwIt); 183 176 184 private: 177 185 // utility func for nice printout
Note:
See TracChangeset
for help on using the changeset viewer.