Ignore:
Timestamp:
04/27/07 11:00:43 (17 years ago)
Author:
mar637
Message:

enhancement #107; added scantable.shift_refpix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/Scantable.cpp

    r1334 r1360  
    330330}
    331331
    332 void asap::Scantable::setSourceType( int stype )
     332void Scantable::setSourceType( int stype )
    333333{
    334334  if ( stype < 0 || stype > 1 )
     
    533533    return int(n);
    534534  } else {
    535     // take the first SCANNO,POLNO,BEAMNO,CYCLENO as nbeam shouldn't vary with these
     535    // take the first SCANNO,POLNO,BEAMNO,CYCLENO as nbeam shouldn't
     536    // vary with these
    536537    Table t = table_(table_.col("IFNO") == ifno);
    537538    if ( t.nrow() == 0 ) return 0;
     
    702703}
    703704
    704 void asap::Scantable::setSpectrum( const std::vector<float>& spec,
     705void Scantable::setSpectrum( const std::vector<float>& spec,
    705706                                   int whichrow )
    706707{
     
    867868}
    868869
    869 std::vector< double > asap::Scantable::getAbcissa( int whichrow ) const
     870std::vector< double > Scantable::getAbcissa( int whichrow ) const
    870871{
    871872  if ( whichrow > int(table_.nrow()) ) throw(AipsError("Illegal ro number"));
     
    902903  return stlout;
    903904}
    904 void asap::Scantable::setDirectionRefString( const std::string & refstr )
     905void Scantable::setDirectionRefString( const std::string & refstr )
    905906{
    906907  MDirection::Types mdt;
     
    916917}
    917918
    918 std::string asap::Scantable::getDirectionRefString( ) const
     919std::string Scantable::getDirectionRefString( ) const
    919920{
    920921  return table_.keywordSet().asString("DIRECTIONREF");
     
    959960}
    960961
    961 void asap::Scantable::setRestFrequencies( double rf, const std::string& name,
     962void Scantable::setRestFrequencies( double rf, const std::string& name,
    962963                                          const std::string& unit )
    963964{
     
    970971}
    971972
    972 void asap::Scantable::setRestFrequencies( const std::string& name )
     973void Scantable::setRestFrequencies( const std::string& name )
    973974{
    974975  throw(AipsError("setRestFrequencies( const std::string& name ) NYI"));
     
    976977}
    977978
    978 std::vector< unsigned int > asap::Scantable::rownumbers( ) const
     979std::vector< unsigned int > Scantable::rownumbers( ) const
    979980{
    980981  std::vector<unsigned int> stlout;
     
    985986
    986987
    987 Matrix<Float> asap::Scantable::getPolMatrix( uInt whichrow ) const
     988Matrix<Float> Scantable::getPolMatrix( uInt whichrow ) const
    988989{
    989990  ROTableRow row(table_);
     
    998999}
    9991000
    1000 std::vector< std::string > asap::Scantable::columnNames( ) const
     1001std::vector< std::string > Scantable::columnNames( ) const
    10011002{
    10021003  Vector<String> vec = table_.tableDesc().columnNames();
     
    10041005}
    10051006
    1006 casa::MEpoch::Types asap::Scantable::getTimeReference( ) const
     1007MEpoch::Types Scantable::getTimeReference( ) const
    10071008{
    10081009  return MEpoch::castType(timeCol_.getMeasRef().getType());
    10091010}
    10101011
    1011 void Scantable::addFit( const STFitEntry & fit, int row )
     1012void Scantable::addFit( const STFitEntry& fit, int row )
    10121013{
    10131014  cout << mfitidCol_(uInt(row)) << endl;
     
    10161017}
    10171018
     1019void Scantable::shift(int npix)
     1020{
     1021  Vector<uInt> fids(mfreqidCol_.getColumn());
     1022  genSort( fids, Sort::Ascending,
     1023           Sort::QuickSort|Sort::NoDuplicates );
     1024  for (uInt i=0; i<fids.nelements(); ++i) {
     1025    frequencies().shiftRefPix(npix, i);
     1026  }
     1027}
    10181028
    10191029}
Note: See TracChangeset for help on using the changeset viewer.