Changeset 275
- Timestamp:
- 01/24/05 12:31:27 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/SDMemTable.cc
r263 r275 335 335 } 336 336 t.rwKeywordSet().define("UNIT", un); 337 337 // 338 338 MFrequency::Types mdr; 339 339 if (!MFrequency::getType(mdr, rfrm)) { … … 346 346 t.rwKeywordSet().define("REFFRAME",rfrm); 347 347 } 348 348 // 349 MDoppler::Types dtype; 350 dpl.upcase(); 351 if (!MDoppler::getType(dtype, dpl)) { 352 throw(AipsError("Doppler type unknown")); 353 } else { 354 t.rwKeywordSet().define("DOPPLER",dpl); 355 } 349 356 } 350 357 … … 386 393 MFrequency::Types mtype; 387 394 if (!MFrequency::getType(mtype, frm)) { 388 cout << "Frequency type unknown assuming TOPO" << endl; 395 cout << "Frequency type unknown assuming TOPO" << endl; // SHould never happen 389 396 mtype = MFrequency::TOPO; 397 } 398 MDoppler::Types dtype; 399 if (!MDoppler::getType(dtype, dpl)) { 400 cout << "Doppler type unknown assuming RADIO" << endl; // SHould never happen 401 dtype = MDoppler::RADIO; 390 402 } 391 403 … … 400 412 if (rstf.nelements() >= nIF()) 401 413 spc.selectRestFrequency(uInt(IFSel_)); 402 spc.setVelocity(u.getName() );414 spc.setVelocity(u.getName(),dtype); 403 415 Vector<Double> wrld; 404 416 spc.pixelToVelocity(wrld,absc1); … … 447 459 String frm; 448 460 t.keywordSet().get("REFFRAME",frm); 461 // 449 462 MFrequency::Types mtype; 450 463 if (!MFrequency::getType(mtype, frm)) { … … 453 466 } 454 467 spc.setFrequencySystem(mtype); 468 // 469 String dpl; 470 t.keywordSet().get("DOPPLER",dpl); 471 MDoppler::Types dtype; 472 MDoppler::getType(dtype, dpl); // Can't fail 473 // 455 474 String s = "Channel"; 456 475 if (u == Unit("km/s")) { 457 spc.setVelocity(u.getName() );476 spc.setVelocity(u.getName(), dtype); 458 477 s = CoordinateUtil::axisLabel(spc,0,True,True,True); 459 478 } else if (u == Unit("Hz")) { … … 921 940 } 922 941 942 923 943 void SDMemTable::setInstrument(const std::string& name) 924 944 {
Note:
See TracChangeset
for help on using the changeset viewer.