[2356] | 1 | //#---------------------------------------------------------------------------
|
---|
| 2 | //# python_STGrid.cc: python exposure of c++ STGrid class
|
---|
| 3 | //#---------------------------------------------------------------------------
|
---|
[2526] | 4 | #include <boost/python.hpp>
|
---|
| 5 | #include <boost/python/args.hpp>
|
---|
| 6 |
|
---|
[2356] | 7 | #include <string>
|
---|
[2360] | 8 | #include <vector>
|
---|
[2356] | 9 |
|
---|
| 10 | #include "STGrid.h"
|
---|
[2593] | 11 | #include "ScantableWrapper.h"
|
---|
[2356] | 12 |
|
---|
| 13 | using namespace boost::python;
|
---|
| 14 |
|
---|
| 15 | namespace asap {
|
---|
| 16 | namespace python {
|
---|
| 17 |
|
---|
| 18 | void python_STGrid() {
|
---|
| 19 | class_<STGrid>("stgrid")
|
---|
| 20 | .def( init <> () )
|
---|
| 21 | .def( init < const std::string > () )
|
---|
[2390] | 22 | .def( init < const std::vector<std::string> > () )
|
---|
[2362] | 23 | .def("_setif", &STGrid::setIF)
|
---|
[2360] | 24 | .def("_setpollist", &STGrid::setPolList)
|
---|
[2364] | 25 | .def("_setscanlist", &STGrid::setScanList)
|
---|
[2356] | 26 | .def("_defineimage", &STGrid::defineImage)
|
---|
[2364] | 27 | .def("_setfunc", &STGrid::setFunc)
|
---|
[2356] | 28 | .def("_grid", &STGrid::grid)
|
---|
| 29 | .def("_setin", &STGrid::setFileIn)
|
---|
[2390] | 30 | .def("_setfiles", &STGrid::setFileList)
|
---|
[2361] | 31 | .def("_setweight", &STGrid::setWeight)
|
---|
[2396] | 32 | .def("_enableclip", &STGrid::enableClip)
|
---|
| 33 | .def("_disableclip", &STGrid::disableClip)
|
---|
[2356] | 34 | .def("_save", &STGrid::saveData)
|
---|
| 35 | ;
|
---|
[2593] | 36 |
|
---|
| 37 | class_<STGrid2>("stgrid2")
|
---|
| 38 | .def( init <> () )
|
---|
| 39 | .def( init < const ScantableWrapper & > () )
|
---|
| 40 | .def( init < const std::vector<ScantableWrapper> & > () )
|
---|
| 41 | .def("_setif", &STGrid2::setIF)
|
---|
| 42 | .def("_setpollist", &STGrid2::setPolList)
|
---|
| 43 | .def("_setscanlist", &STGrid2::setScanList)
|
---|
| 44 | .def("_defineimage", &STGrid2::defineImage)
|
---|
| 45 | .def("_setfunc", &STGrid2::setFunc)
|
---|
| 46 | .def("_grid", &STGrid2::grid)
|
---|
| 47 | .def("_setin", &STGrid2::setScantable)
|
---|
| 48 | .def("_setfiles", &STGrid2::setScantableList)
|
---|
| 49 | .def("_setweight", &STGrid2::setWeight)
|
---|
| 50 | .def("_enableclip", &STGrid2::enableClip)
|
---|
| 51 | .def("_disableclip", &STGrid2::disableClip)
|
---|
| 52 | .def("_get", &STGrid2::getResultAsScantable)
|
---|
| 53 | ;
|
---|
| 54 |
|
---|
[2356] | 55 | };
|
---|
| 56 |
|
---|
| 57 | } // python
|
---|
| 58 | } // asap
|
---|