Ignore:
Timestamp:
03/08/06 12:01:46 (18 years ago)
Author:
mar637
Message:

added setSpectrum

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/Scantable.cpp

    r878 r884  
    581581  return out;
    582582}
     583
     584
     585void asap::Scantable::setSpectrum( const std::vector<float>& spec,
     586                                   int whichrow )
     587{
     588  Vector<Float> spectrum(spec);
     589  Vector<Float> arr;
     590  specCol_.get(whichrow, arr);
     591  if ( spectrum.nelements() != arr.nelements() )
     592    throw AipsError("The specturm has incorrect number of channels.");
     593  specCol_.put(whichrow, spectrum);
     594}
     595
    583596
    584597String Scantable::generateName()
     
    739752  std::vector<double> stlout;
    740753  int nchan = specCol_(whichrow).nelements();
    741   cout << nchan << endl;
    742754  String us = freqTable_.getUnitString();
    743755  if ( us == "" || us == "pixel" || us == "channel" ) {
Note: See TracChangeset for help on using the changeset viewer.