SourceXtractorPlusPlus 0.21
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
PyAperture.cpp
Go to the documentation of this file.
1
19#include <boost/python/extract.hpp>
20
21
22namespace SourceXtractor {
23
24namespace bp = boost::python;
25
26PyAperture::PyAperture(const boost::python::list &py_apertures) {
27 for (int i = 0; i < bp::len(py_apertures); ++i) {
28 apertures.push_back(bp::extract<float>(py_apertures[i]));
29 }
30}
31
34 str << "(ID:" << id << ", apertures:[";
35 for (unsigned int i = 0; i < apertures.size(); ++i) {
36 str << apertures[i];
37 if (i < apertures.size() - 1) {
38 str << ",";
39 }
40 }
41 str << "])";
42 return str.str();
43}
44
45} // end SourceXtractor
std::vector< float > apertures
Definition PyAperture.h:36
std::string toString() const
PyAperture(const boost::python::list &py_apertures)
T push_back(T... args)
T size(T... args)
T str(T... args)