Ignore:
Timestamp:
02/24/06 10:03:21 (18 years ago)
Author:
mar637
Message:

numerous changes before move to new svn repository sourcecode.atnf.csiro.au

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/Scantable.cpp

    r845 r847  
    224224  scanCol_.attach(table_, "SCANNO");
    225225  beamCol_.attach(table_, "BEAMNO");
     226  ifCol_.attach(table_, "IFNO");
     227  polCol_.attach(table_, "POLNO");
    226228  integrCol_.attach(table_, "INTERVAL");
    227229  azCol_.attach(table_, "AZIMUTH");
     
    292294
    293295
    294 int Scantable::rowToScanIndex( int therow )
    295 {
    296   int therealrow = -1;
    297 
    298   return therealrow;
    299 }
    300 
    301296int Scantable::nscan() const {
    302297  int n = 0;
     
    344339std::string Scantable::getFluxUnit() const
    345340{
    346   String tmp;
    347   table_.keywordSet().get("FluxUnit", tmp);
    348   return tmp;
     341  return table_.keywordSet().asString("FluxUnit");
    349342}
    350343
     
    485478  }
    486479  return 0;
     480}
     481
     482
     483int Scantable::getBeam(int whichrow) const
     484{
     485  return beamCol_(whichrow);
     486}
     487
     488int Scantable::getIF(int whichrow) const
     489{
     490  return ifCol_(whichrow);
     491}
     492
     493int Scantable::getPol(int whichrow) const
     494{
     495  return polCol_(whichrow);
    487496}
    488497
     
    563572}
    564573
    565 double Scantable::getInterval(int whichrow) const
    566 {
    567   if (whichrow < 0) return 0.0;
    568   Double intval;
    569   integrCol_.get(Int(whichrow), intval);
    570   return intval;
    571 }
    572 
    573574std::vector<bool> Scantable::getMask(int whichrow) const
    574575{
     
    619620{
    620621  table_ = originalTable_;
     622  attach();
    621623  selector_.reset();
    622624}
     
    629631  }
    630632  table_ = tab;
     633  attach();
    631634  selector_ = selection;
    632635}
     
    742745}
    743746
     747std::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
     771void 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
     781void asap::Scantable::setRestFrequencies( const std::string& name )
     782{
     783  throw(AipsError("setRestFrequencies( const std::string& name ) NYI"));
     784  ///@todo implement
     785}
     786
    744787}//namespace asap
Note: See TracChangeset for help on using the changeset viewer.