Changeset 342 for trunk/src/SDReader.cc
- Timestamp:
- 02/01/05 13:15:36 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/SDReader.cc
r338 r342 46 46 cursor_ = 0; 47 47 } 48 SDReader::SDReader(const std::string& filename, const std::string& unit,48 SDReader::SDReader(const std::string& filename, 49 49 int whichIF, int whichBeam) : 50 50 reader_(0), 51 51 table_(new SDMemTable()) { 52 52 cursor_ = 0; 53 open(filename, unit,whichIF, whichBeam);53 open(filename, whichIF, whichBeam); 54 54 } 55 55 … … 88 88 89 89 90 void SDReader::open(const std::string& filename, const std::string& unit,90 void SDReader::open(const std::string& filename, 91 91 int whichIF, int whichBeam) { 92 92 if (reader_) delete reader_; reader_ = 0; … … 146 146 nIF_ = 1; 147 147 } 148 // 149 // Determine Telescope and set units... 150 151 String sUnit(unit); 152 if (sUnit.empty()) { 153 Bool throwIt = False; 154 Instrument inst = SDMemTable::convertInstrument (header_.antennaname, throwIt); 155 header_.fluxunit = "Jy"; 156 if (inst==ATMOPRA || inst==TIDBINBILLA) { 157 header_.fluxunit = "K"; 158 } 159 cerr << "Assuming brightness unit is " << header_.fluxunit << endl; 160 } else { 161 Unit u(sUnit); 162 if (u==Unit("Jy") || u==Unit("K")) { 163 header_.fluxunit = unit; 164 cerr << "Setting brightness unit to " << header_.fluxunit << endl; 165 } else { 166 throw(AipsError("Specified brightness unit is illegal - must be consistent with Jy or K")); 167 } 168 } 148 149 // Determine Telescope and set brightness unit 150 151 Bool throwIt = False; 152 Instrument inst = SDMemTable::convertInstrument (header_.antennaname, throwIt); 153 header_.fluxunit = "Jy"; 154 if (inst==ATMOPRA || inst==TIDBINBILLA) { 155 header_.fluxunit = "K"; 156 } 169 157 // 170 158 header_.nif = nIF_;
Note: See TracChangeset
for help on using the changeset viewer.