Changeset 923


Ignore:
Timestamp:
03/24/06 13:32:05 (18 years ago)
Author:
mar637
Message:

fixed az/el data type to be Float. added getChannels function. to get cnumber of channels per row. (nchan retrurns by IF)

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/Scantable.cpp

    r915 r923  
    218218  // writing create the measure column
    219219  mdirCol.write(td);
    220   td.addColumn(ScalarColumnDesc<Double>("AZIMUTH"));
    221   td.addColumn(ScalarColumnDesc<Double>("ELEVATION"));
     220  td.addColumn(ScalarColumnDesc<Float>("AZIMUTH"));
     221  td.addColumn(ScalarColumnDesc<Float>("ELEVATION"));
    222222  td.addColumn(ScalarColumnDesc<Float>("PARANGLE"));
    223223
     
    518518    if ( t.nrow() == 0 ) return 0;
    519519    ROArrayColumn<Float> v(t, "SPECTRA");
    520     return v(0).nelements();
     520    return v.shape(0)(0);
    521521  }
    522522  return 0;
    523523}
    524524
     525int Scantable::getChannels(int whichrow) const
     526{
     527  return specCol_.shape(whichrow)(0);
     528}
    525529
    526530int Scantable::getBeam(int whichrow) const
     
    569573                                                frame)
    570574                            )().getAngle("rad").getValue();
    571     azCol_.put(i,azel[0]);
    572     elCol_.put(i,azel[1]);
     575    azCol_.put(i,Float(azel[0]));
     576    elCol_.put(i,Float(azel[1]));
    573577    oss << "azel: " << azel[0]/C::pi*180.0 << " "
    574578        << azel[1]/C::pi*180.0 << " (deg)" << endl;
     
    768772        const TableRecord& irec = irow.get(0);
    769773        oss << std::right <<setw(8) << "" << std::left << irec.asuInt("IFNO");
    770         oss << frequencies().print(irec.asuInt("FREQ_ID"));
     774        oss << frequencies().print(irec.asuInt("FREQ_ID")) << irec.asuInt("MOLECULE_ID");
    771775
    772776        ++iiter;
     
    856860void asap::Scantable::setRestFrequencies( double rf, const std::string& unit )
    857861{
    858   ///@todo lookup in line table
     862  ///@todo lookup in line table to fill in name and formattedname
    859863  Unit u(unit);
    860864  Quantum<Double> urf(rf, u);
  • trunk/src/Scantable.h

    r915 r923  
    233233  int getCycle(int whichrow) const { return cycleCol_(whichrow); }
    234234  int getScan(int whichrow) const { return scanCol_(whichrow); }
     235  int getChannels(int whichrow) const;
    235236
    236237  double getInterval(int whichrow) const
     
    379380  casa::MDirection::ScalarColumn dirCol_;
    380381  casa::MEpoch::ScalarColumn timeCol_;
    381   casa::ScalarColumn<casa::Double> azCol_;
    382   casa::ScalarColumn<casa::Double> elCol_;
     382  casa::ScalarColumn<casa::Float> azCol_;
     383  casa::ScalarColumn<casa::Float> elCol_;
    383384  casa::ScalarColumn<casa::Float> paraCol_;
    384385  casa::ScalarColumn<casa::String> srcnCol_, fldnCol_;
Note: See TracChangeset for help on using the changeset viewer.