source: trunk/src/python_STGrid.cpp@ 2687

Last change on this file since 2687 was 2686, checked in by Takeshi Nakazato, 12 years ago

New Development: No

JIRA Issue: No

Ready for Test: Yes

Interface Changes: No

What Interface Changed: Please list interface changes

Test Programs: run sdgrid task with plot=True

Put in Release Notes: No

Module(s): Module Names change impacts.

Description: Describe your changes here...

Fix for plotter failure.


File size: 2.8 KB
Line 
1//#---------------------------------------------------------------------------
2//# python_STGrid.cc: python exposure of c++ STGrid class
3//#---------------------------------------------------------------------------
4#include <boost/python.hpp>
5#include <boost/python/args.hpp>
6
7#include <string>
8#include <vector>
9
10#include "STGrid.h"
11#include "ScantableWrapper.h"
12
13using namespace boost::python;
14
15namespace asap {
16 namespace python {
17
18void python_STGrid() {
19 class_<STGrid>("stgrid")
20 .def( init <> () )
21 .def( init < const std::string > () )
22 .def( init < const std::vector<std::string> > () )
23 .def("_setif", &STGrid::setIF)
24 .def("_setpollist", &STGrid::setPolList)
25 .def("_setscanlist", &STGrid::setScanList)
26 .def("_defineimage", &STGrid::defineImage,
27 (boost::python::arg("nx")=-1,
28 boost::python::arg("ny")=-1,
29 boost::python::arg("scellx")="",
30 boost::python::arg("scelly")="",
31 boost::python::arg("scenter")=""))
32 .def("_setfunc", &STGrid::setFunc,
33 (boost::python::arg("convsupport")=-1,
34 boost::python::arg("truncate")="",
35 boost::python::arg("gwidth")="",
36 boost::python::arg("jwidth")=""))
37 .def("_grid", &STGrid::grid)
38 .def("_setin", &STGrid::setFileIn)
39 .def("_setfiles", &STGrid::setFileList)
40 .def("_setweight", &STGrid::setWeight)
41 .def("_enableclip", &STGrid::enableClip)
42 .def("_disableclip", &STGrid::disableClip)
43 .def("_save", &STGrid::saveData)
44 .def("_getfunc", &STGrid::getConvFunc)
45 .def("_get_resultant_map_size", &STGrid::getResultantMapSize)
46 .def("_get_resultant_cell_size", &STGrid::getResultantCellSize)
47 ;
48
49 class_<STGrid2>("stgrid2")
50 .def( init <> () )
51 .def( init < const ScantableWrapper & > () )
52 .def( init < const std::vector<ScantableWrapper> & > () )
53 .def("_setif", &STGrid2::setIF)
54 .def("_setpollist", &STGrid2::setPolList)
55 .def("_setscanlist", &STGrid2::setScanList)
56 .def("_defineimage", &STGrid2::defineImage,
57 (boost::python::arg("nx")=-1,
58 boost::python::arg("ny")=-1,
59 boost::python::arg("scellx")="",
60 boost::python::arg("scelly")="",
61 boost::python::arg("scenter")=""))
62 .def("_setfunc", &STGrid2::setFunc,
63 (boost::python::arg("convsupport")=-1,
64 boost::python::arg("truncate")="",
65 boost::python::arg("gwidth")="",
66 boost::python::arg("jwidth")=""))
67 .def("_grid", &STGrid2::grid)
68 .def("_setin", &STGrid2::setScantable)
69 .def("_setfiles", &STGrid2::setScantableList)
70 .def("_setweight", &STGrid2::setWeight)
71 .def("_enableclip", &STGrid2::enableClip)
72 .def("_disableclip", &STGrid2::disableClip)
73 .def("_get", &STGrid2::getResultAsScantable)
74 .def("_getfunc", &STGrid2::getConvFunc)
75 ;
76
77};
78
79 } // python
80} // asap
Note: See TracBrowser for help on using the repository browser.