- Timestamp:
- 07/04/06 11:27:03 (18 years ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/Scantable.cpp
r1047 r1068 256 256 timeCol_.attach(table_, "TIME"); 257 257 srcnCol_.attach(table_, "SRCNAME"); 258 srctCol_.attach(table_, "SRCTYPE"); 258 259 specCol_.attach(table_, "SPECTRA"); 259 260 flagsCol_.attach(table_, "FLAGTRA"); … … 321 322 table_.keywordSet().get("POLTYPE", sdh.poltype); 322 323 return sdh; 324 } 325 326 void asap::Scantable::setSourceType( int stype ) 327 { 328 if ( stype < 0 || stype > 1 ) 329 throw(AipsError("Illegal sourcetype.")); 330 TableVector<Int> tabvec(table_, "SRCTYPE"); 331 tabvec = Int(stype); 323 332 } 324 333 … … 826 835 } 827 836 837 std::string Scantable::getDirectionString(int whichrow) const 838 { 839 return formatDirection(getDirection(uInt(whichrow))); 840 } 841 828 842 std::vector< double > asap::Scantable::getAbcissa( int whichrow ) const 829 843 { -
trunk/src/Scantable.h
r1030 r1068 129 129 */ 130 130 STHeader getHeader( ) const; 131 131 132 /** 132 133 * Checks if the "other" Scantable is conformant with this, … … 138 139 139 140 /** 141 * 142 * @param stype The type of the source, 0 = on, 1 = off 143 */ 144 void setSourceType(int stype); 145 146 147 /** 140 148 * return the number of scans in the table 141 149 * @return number of scans in the table … … 152 160 153 161 casa::MDirection getDirection( int whichrow ) const; 162 163 std::string getDirectionString( int whichrow ) const; 154 164 155 165 void setDirectionRefString(const std::string& refstr=""); … … 396 406 casa::ScalarColumn<casa::String> srcnCol_, fldnCol_; 397 407 casa::ScalarColumn<casa::uInt> scanCol_, beamCol_, ifCol_, polCol_, cycleCol_; 398 casa::ScalarColumn<casa::Int> rbeamCol_ ;408 casa::ScalarColumn<casa::Int> rbeamCol_, srctCol_; 399 409 casa::ArrayColumn<casa::Float> specCol_, tsysCol_; 400 410 casa::ArrayColumn<casa::uChar> flagsCol_; -
trunk/src/ScantableWrapper.h
r1003 r1068 85 85 { return table_->getTime(whichrow); } 86 86 87 std::string getDirectionString(int whichrow=0) const 88 { return table_->getDirectionString(whichrow); } 89 87 90 std::string getFluxUnit() const { return table_->getFluxUnit(); } 88 91 … … 135 138 void makePersistent(const std::string& fname) 136 139 { table_->makePersistent(fname); } 140 141 void setSourceType(int stype) 142 { table_->setSourceType(stype); } 137 143 138 144 void setRestFrequencies(double rf, const std::string& unit) -
trunk/src/python_Scantable.cpp
r1003 r1068 27 27 //# AUSTRALIA 28 28 //# 29 //# $Id :$29 //# $Id$ 30 30 //#--------------------------------------------------------------------------- 31 31 #include <vector> … … 92 92 .def("_gettime", &ScantableWrapper::getTime, 93 93 (boost::python::arg("whichrow")=0) ) 94 .def("_getdirection", &ScantableWrapper::getDirectionString, 95 (boost::python::arg("whichrow")=0) ) 94 96 .def("_flag", &ScantableWrapper::flag) 95 97 .def("_save", &ScantableWrapper::makePersistent) … … 109 111 .def("_getfit", &ScantableWrapper::getFit) 110 112 .def("_recalcazel", &ScantableWrapper::calculateAZEL) 113 .def("_setsourcetype", &ScantableWrapper::setSourceType) 111 114 ; 112 115 };
Note:
See TracChangeset
for help on using the changeset viewer.