Changeset 847 for trunk/src/Scantable.cpp
- Timestamp:
- 02/24/06 10:03:21 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/Scantable.cpp
r845 r847 224 224 scanCol_.attach(table_, "SCANNO"); 225 225 beamCol_.attach(table_, "BEAMNO"); 226 ifCol_.attach(table_, "IFNO"); 227 polCol_.attach(table_, "POLNO"); 226 228 integrCol_.attach(table_, "INTERVAL"); 227 229 azCol_.attach(table_, "AZIMUTH"); … … 292 294 293 295 294 int Scantable::rowToScanIndex( int therow )295 {296 int therealrow = -1;297 298 return therealrow;299 }300 301 296 int Scantable::nscan() const { 302 297 int n = 0; … … 344 339 std::string Scantable::getFluxUnit() const 345 340 { 346 String tmp; 347 table_.keywordSet().get("FluxUnit", tmp); 348 return tmp; 341 return table_.keywordSet().asString("FluxUnit"); 349 342 } 350 343 … … 485 478 } 486 479 return 0; 480 } 481 482 483 int Scantable::getBeam(int whichrow) const 484 { 485 return beamCol_(whichrow); 486 } 487 488 int Scantable::getIF(int whichrow) const 489 { 490 return ifCol_(whichrow); 491 } 492 493 int Scantable::getPol(int whichrow) const 494 { 495 return polCol_(whichrow); 487 496 } 488 497 … … 563 572 } 564 573 565 double Scantable::getInterval(int whichrow) const566 {567 if (whichrow < 0) return 0.0;568 Double intval;569 integrCol_.get(Int(whichrow), intval);570 return intval;571 }572 573 574 std::vector<bool> Scantable::getMask(int whichrow) const 574 575 { … … 619 620 { 620 621 table_ = originalTable_; 622 attach(); 621 623 selector_.reset(); 622 624 } … … 629 631 } 630 632 table_ = tab; 633 attach(); 631 634 selector_ = selection; 632 635 } … … 742 745 } 743 746 747 std::string Scantable::getAbcissaLabel( int whichrow ) const 748 { 749 if ( whichrow > table_.nrow() ) throw(AipsError("Illegal ro number")); 750 const MPosition& mp = getAntennaPosition(); 751 const MDirection& md = dirCol_(whichrow); 752 const MEpoch& me = timeCol_(whichrow); 753 const Double& rf = mmolidCol_(whichrow); 754 SpectralCoordinate spc = 755 freqTable_.getSpectralCoordinate(md, mp, me, rf, mfreqidCol_(whichrow)); 756 757 String s = "Channel"; 758 Unit u = Unit(freqTable_.getUnitString()); 759 if (u == Unit("km/s")) { 760 s = CoordinateUtil::axisLabel(spc,0,True,True,True); 761 } else if (u == Unit("Hz")) { 762 Vector<String> wau(1);wau = u.getName(); 763 spc.setWorldAxisUnits(wau); 764 765 s = CoordinateUtil::axisLabel(spc,0,True,True,False); 766 } 767 return s; 768 769 } 770 771 void asap::Scantable::setRestFrequencies( double rf, const std::string& unit ) 772 { 773 ///@todo lookup in line table 774 Unit u(unit); 775 Quantum<Double> urf(rf, u); 776 uInt id = moleculeTable_.addEntry(urf.getValue("Hz"), "", ""); 777 TableVector<uInt> tabvec(table_, "MOLECULE_ID"); 778 tabvec = id; 779 } 780 781 void asap::Scantable::setRestFrequencies( const std::string& name ) 782 { 783 throw(AipsError("setRestFrequencies( const std::string& name ) NYI")); 784 ///@todo implement 785 } 786 744 787 }//namespace asap
Note: See TracChangeset
for help on using the changeset viewer.