Changeset 1375
- Timestamp:
- 07/12/07 11:57:05 (17 years ago)
- Location:
- trunk/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/STAsciiWriter.cpp
r1295 r1375 120 120 addLine(of, "Beam No", rec.asuInt("BEAMNO")); 121 121 addLine(of, "IF No", rec.asuInt("IFNO")); 122 String wcs = stable.frequencies().print(rec.asuInt("FREQ_ID"), True); 123 addLine(of, "WCS", wcs); 124 addLine(of, "Rest Freq.", 125 stable.molecules().getRestFrequency(rec.asuInt("MOLECULE_ID") )); 122 126 of << setfill('#') << setw(70) << "" << setfill(' ') << endl; 123 127 -
trunk/src/STFrequencies.cpp
r1360 r1375 274 274 } 275 275 276 std::string STFrequencies::print( int id )276 std::string STFrequencies::print( int id, Bool strip ) const 277 277 { 278 278 Table t; … … 284 284 const TableRecord& rec = row.get(i); 285 285 oss << setw(8) 286 << t.keywordSet().asString("FRAME") << setw(16) << setprecision(8) 287 << rec.asDouble("REFVAL") << setw(7) 288 << rec.asDouble("REFPIX") << setw(12) 289 << rec.asDouble("INCREMENT") << endl; 290 } 291 return String(oss); 286 << t.keywordSet().asString("FRAME") << setw(16) << setprecision(8) 287 << rec.asDouble("REFVAL") << setw(7) 288 << rec.asDouble("REFPIX") 289 << setw(12) 290 << rec.asDouble("INCREMENT"); 291 } 292 String outstr(oss); 293 if (strip) { 294 int f = outstr.find_first_not_of(' '); 295 int l = outstr.find_last_not_of(' ', outstr.size()); 296 if (f < 0) { 297 f = 0; 298 } 299 if ( l < f || l < f ) { 300 l = outstr.size(); 301 } 302 return outstr.substr(f,l); 303 } 304 return outstr; 292 305 } 293 306 -
trunk/src/STFrequencies.h
r1360 r1375 145 145 * @return a string 146 146 */ 147 std::string print(int id=-1 );147 std::string print(int id=-1, casa::Bool strip=casa::False) const; 148 148 149 149 std::vector<std::string> getInfo() const; -
trunk/src/Scantable.cpp
r1360 r1375 837 837 oss << setw(10) << ""; 838 838 oss << setw(3) << std::right << irec.asuInt("IFNO") << std::left 839 << setw(2) << "" << frequencies().print(irec.asuInt("FREQ_ID")); 839 << setw(2) << "" << frequencies().print(irec.asuInt("FREQ_ID")) 840 << endl; 840 841 841 842 ++iiter; -
trunk/src/Scantable.h
r1360 r1375 361 361 362 362 STFrequencies& frequencies() { return freqTable_; } 363 const STFrequencies& frequencies() const { return freqTable_; } 363 364 STWeather& weather() { return weatherTable_; } 365 const STWeather& weather() const { return weatherTable_; } 364 366 STFocus& focus() { return focusTable_; } 367 const STFocus& focus() const { return focusTable_; } 365 368 STTcal& tcal() { return tcalTable_; } 369 const STTcal& tcal() const { return tcalTable_; } 366 370 STMolecules& molecules() { return moleculeTable_; } 371 const STMolecules& molecules() const { return moleculeTable_; } 367 372 STHistory& history() { return historyTable_; } 373 const STHistory& history() const { return historyTable_; } 368 374 STFit& fit() { return fitTable_; } 375 const STFit& fit() const { return fitTable_; } 369 376 370 377 std::vector<std::string> columnNames() const;
Note:
See TracChangeset
for help on using the changeset viewer.