Changeset 494 for trunk


Ignore:
Timestamp:
02/21/05 18:05:58 (20 years ago)
Author:
kil064
Message:

rework bindings for stokes conversion and associated functions

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/SDMemTableWrapper.h

    r483 r494  
    8585    return table_->getSpectrum(whichRow);
    8686  }
    87 
    88   std::vector<float> getStokesSpectrum(int whichRow=0, bool doPol=false,
     87//
     88  std::vector<float> getStokesSpectrum(int whichRow=0, bool linPol=false,
    8989                                       float paOff=0.0) const {
    90     return table_->getStokesSpectrum(whichRow, doPol, paOff);
    91   }
    92 
    93   std::vector<float> getCircularSpectrum(int whichRow=0,
    94                                          bool doRR=true) const {
    95     return table_->getCircularSpectrum(whichRow, doRR);
    96   }
    97 
     90    return table_->getStokesSpectrum(whichRow, linPol, paOff);
     91  }
     92
     93  std::vector<float> stokesToPolSpectrum (int whichRow, bool linear,
     94                                          int polIdx) const {
     95    return table_->stokesToPolSpectrum(whichRow, linear, polIdx);
     96  }
     97
     98//  std::string getPolarizationLabel (bool linear, bool stokes, bool linPol, int polIdx) const {
     99// Boost fails with 4 arguments.
     100  std::string getPolarizationLabel (bool linear, bool stokes, bool linPol) const {
     101     int polIdx = -1;
     102     return table_->getPolarizationLabel (linear, stokes, linPol, polIdx);
     103  }
     104//
    98105  std::vector<double> getAbcissa(int whichRow=0) const {
    99106    return table_->getAbcissa(whichRow);
     
    151158  int nScan() {return table_->nScan();}
    152159  int nRow() {return table_->nRow();}
     160  int nStokes() {return table_->nStokes();}
    153161
    154162  //sets the mask
  • trunk/src/python_SDMemTable.cc

    r483 r494  
    7070    .def("_getspectrum", &SDMemTableWrapper::getSpectrum,
    7171         (boost::python::arg("whichRow")=0))
     72    .def("nstokes", &SDMemTableWrapper::nStokes)
    7273    .def("_getstokesspectrum", &SDMemTableWrapper::getStokesSpectrum,
    7374         (boost::python::arg("whichRow")=0),
    74          (boost::python::arg("pol")=false),
     75         (boost::python::arg("linpol")=false),
    7576         (boost::python::arg("pa")=0.0) )
    76     .def("_getcircularspectrum", &SDMemTableWrapper::getCircularSpectrum,
     77    .def("_stokestopolspectrum", &SDMemTableWrapper::stokesToPolSpectrum,
    7778         (boost::python::arg("whichRow")=0),
    78          (boost::python::arg("rr")=true))
     79         (boost::python::arg("linear")=false),
     80         (boost::python::arg("thepol")=0) )
     81    .def("_getpolarizationlabel", &SDMemTableWrapper::getPolarizationLabel,
     82         (boost::python::arg("linear")=false),
     83         (boost::python::arg("stokes")=false),
     84         (boost::python::arg("linpol")=false) )
     85//         (boost::python::arg("thepol")=0) )        // Boost fails with 4 arguments
    7986    .def("_setspectrum",&SDMemTableWrapper::setSpectrum,
    8087         (boost::python::arg("whichRow")=0) )
Note: See TracChangeset for help on using the changeset viewer.