Changeset 1360 for trunk/src/Scantable.cpp
- Timestamp:
- 04/27/07 11:00:43 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/Scantable.cpp
r1334 r1360 330 330 } 331 331 332 void asap::Scantable::setSourceType( int stype )332 void Scantable::setSourceType( int stype ) 333 333 { 334 334 if ( stype < 0 || stype > 1 ) … … 533 533 return int(n); 534 534 } 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 536 537 Table t = table_(table_.col("IFNO") == ifno); 537 538 if ( t.nrow() == 0 ) return 0; … … 702 703 } 703 704 704 void asap::Scantable::setSpectrum( const std::vector<float>& spec,705 void Scantable::setSpectrum( const std::vector<float>& spec, 705 706 int whichrow ) 706 707 { … … 867 868 } 868 869 869 std::vector< double > asap::Scantable::getAbcissa( int whichrow ) const870 std::vector< double > Scantable::getAbcissa( int whichrow ) const 870 871 { 871 872 if ( whichrow > int(table_.nrow()) ) throw(AipsError("Illegal ro number")); … … 902 903 return stlout; 903 904 } 904 void asap::Scantable::setDirectionRefString( const std::string & refstr )905 void Scantable::setDirectionRefString( const std::string & refstr ) 905 906 { 906 907 MDirection::Types mdt; … … 916 917 } 917 918 918 std::string asap::Scantable::getDirectionRefString( ) const919 std::string Scantable::getDirectionRefString( ) const 919 920 { 920 921 return table_.keywordSet().asString("DIRECTIONREF"); … … 959 960 } 960 961 961 void asap::Scantable::setRestFrequencies( double rf, const std::string& name,962 void Scantable::setRestFrequencies( double rf, const std::string& name, 962 963 const std::string& unit ) 963 964 { … … 970 971 } 971 972 972 void asap::Scantable::setRestFrequencies( const std::string& name )973 void Scantable::setRestFrequencies( const std::string& name ) 973 974 { 974 975 throw(AipsError("setRestFrequencies( const std::string& name ) NYI")); … … 976 977 } 977 978 978 std::vector< unsigned int > asap::Scantable::rownumbers( ) const979 std::vector< unsigned int > Scantable::rownumbers( ) const 979 980 { 980 981 std::vector<unsigned int> stlout; … … 985 986 986 987 987 Matrix<Float> asap::Scantable::getPolMatrix( uInt whichrow ) const988 Matrix<Float> Scantable::getPolMatrix( uInt whichrow ) const 988 989 { 989 990 ROTableRow row(table_); … … 998 999 } 999 1000 1000 std::vector< std::string > asap::Scantable::columnNames( ) const1001 std::vector< std::string > Scantable::columnNames( ) const 1001 1002 { 1002 1003 Vector<String> vec = table_.tableDesc().columnNames(); … … 1004 1005 } 1005 1006 1006 casa::MEpoch::Types asap::Scantable::getTimeReference( ) const1007 MEpoch::Types Scantable::getTimeReference( ) const 1007 1008 { 1008 1009 return MEpoch::castType(timeCol_.getMeasRef().getType()); 1009 1010 } 1010 1011 1011 void Scantable::addFit( const STFitEntry 1012 void Scantable::addFit( const STFitEntry& fit, int row ) 1012 1013 { 1013 1014 cout << mfitidCol_(uInt(row)) << endl; … … 1016 1017 } 1017 1018 1019 void 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 } 1018 1028 1019 1029 }
Note: See TracChangeset
for help on using the changeset viewer.