- Timestamp:
- 03/08/06 12:01:46 (19 years ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/Scantable.cpp
r878 r884 581 581 return out; 582 582 } 583 584 585 void 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 583 596 584 597 String Scantable::generateName() … … 739 752 std::vector<double> stlout; 740 753 int nchan = specCol_(whichrow).nelements(); 741 cout << nchan << endl;742 754 String us = freqTable_.getUnitString(); 743 755 if ( us == "" || us == "pixel" || us == "channel" ) { -
trunk/src/Scantable.h
r865 r884 248 248 std::vector<float> getSpectrum(int whichrow) const; 249 249 250 void setSpectrum(const std::vector<float>& spec, int whichrow); 251 250 252 std::vector<float> getStokesSpectrum( int whichrow=0, 251 253 bool dopol=false) const; -
trunk/src/ScantableWrapper.h
r868 r884 121 121 122 122 123 //void setSpectrum(std::vector<float> spectrum, int whichrow=0)124 //{ table_->setSpectrum(spectrum, whichrow); }123 void setSpectrum(std::vector<float> spectrum, int whichrow=0) 124 { table_->setSpectrum(spectrum, whichrow); } 125 125 126 126 int getIF(int whichrow) const {return table_->getIF(whichrow);} -
trunk/src/python_Scantable.cpp
r872 r884 63 63 .def("_setInstrument", &ScantableWrapper::setInstrument) 64 64 .def("_getspectrum", &ScantableWrapper::getSpectrum, 65 (boost::python::arg("which Row")=0))65 (boost::python::arg("whichrow")=0)) 66 66 /* 67 67 .def("nstokes", &ScantableWrapper::nStokes) 68 68 .def("_getstokesspectrum", &ScantableWrapper::getStokesSpectrum, 69 (boost::python::arg("which Row")=0),69 (boost::python::arg("whichrow")=0), 70 70 (boost::python::arg("linpol")=false) ) 71 71 .def("_stokestopolspectrum", &ScantableWrapper::stokesToPolSpectrum, 72 (boost::python::arg("which Row")=0),72 (boost::python::arg("whichrow")=0), 73 73 (boost::python::arg("linear")=false), 74 74 (boost::python::arg("thepol")=-1) ) … … 79 79 (boost::python::arg("linpol")=false) ) 80 80 // (boost::python::arg("thepol")=0) ) // Boost fails with 4 arguments 81 /*.def("_setspectrum",&ScantableWrapper::setSpectrum,82 (boost::python::arg("which Row")=0) )*/81 .def("_setspectrum",&ScantableWrapper::setSpectrum, 82 (boost::python::arg("whichrow")=0) ) 83 83 .def("_getabcissa", &ScantableWrapper::getAbcissa, 84 (boost::python::arg("which Row")=0) )84 (boost::python::arg("whichrow")=0) ) 85 85 .def("_getabcissalabel", &ScantableWrapper::getAbcissaLabel, 86 (boost::python::arg("which Row")=0) )86 (boost::python::arg("whichrow")=0) ) 87 87 .def("_getmask", &ScantableWrapper::getMask, 88 (boost::python::arg("which Row")=0) )88 (boost::python::arg("whichrow")=0) ) 89 89 .def("_gettsys", &ScantableWrapper::getTsys) 90 90 .def("_getsourcename", &ScantableWrapper::getSourceName, 91 (boost::python::arg("which Row")=0) )91 (boost::python::arg("whichrow")=0) ) 92 92 .def("_getelevation", &ScantableWrapper::getElevation, 93 (boost::python::arg("which Row")=0) )93 (boost::python::arg("whichrow")=0) ) 94 94 .def("_getazimuth", &ScantableWrapper::getAzimuth, 95 (boost::python::arg("which Row")=0) )95 (boost::python::arg("whichrow")=0) ) 96 96 .def("_getparangle", &ScantableWrapper::getParAngle, 97 (boost::python::arg("which Row")=0) )97 (boost::python::arg("whichrow")=0) ) 98 98 .def("_gettime", &ScantableWrapper::getTime, 99 (boost::python::arg("which Row")=0) )99 (boost::python::arg("whichrow")=0) ) 100 100 .def("_flag", &ScantableWrapper::flag) 101 101 .def("_save", &ScantableWrapper::makePersistent)
Note:
See TracChangeset
for help on using the changeset viewer.