25 #include "pybind11/pybind11.h"
26 #include "pybind11/stl.h"
40 using namespace pybind11::literals;
47 py::class_<Point, std::shared_ptr<Point>>
cls(mod,
"Point");
49 cls.def(py::init<double, double>(),
"x"_a,
"y"_a);
58 py::class_<FatPoint, std::shared_ptr<FatPoint>, Point>
cls(mod,
"FatPoint");
64 py::class_<BaseStar, std::shared_ptr<BaseStar>, FatPoint>
cls(mod,
"BaseStar");
66 cls.def(py::init<double, double, double, double>(),
"x"_a,
"y"_a,
"flux"_a,
"fluxErr"_a);
70 cls.def_readonly(
"vx", (
double BaseStar::*)&BaseStar::vx);
71 cls.def_readonly(
"vy", (
double BaseStar::*)&BaseStar::vy);
72 cls.def_readonly(
"vxy", (
double BaseStar::*)&BaseStar::vxy);
75 cls.def_property_readonly(
"flux", (
double (BaseStar::*)()
const) & BaseStar::getFlux);
76 cls.def_property_readonly(
"fluxErr", (
double (BaseStar::*)()
const) & BaseStar::getFluxErr);
78 cls.def_property_readonly(
"magErr", (
double (BaseStar::*)()
const) & BaseStar::getMagErr);
82 py::class_<RefStar, std::shared_ptr<RefStar>, BaseStar>
cls(mod,
"RefStar");
84 cls.def(py::init<double, double, double, double>(),
"xx"_a,
"yy"_a,
"flux"_a,
"fluxErr"_a);
88 py::class_<FittedStar, std::shared_ptr<FittedStar>, BaseStar>
cls(mod,
"FittedStar");
90 cls.def(py::init<>());
91 cls.def(py::init<BaseStar const &>(),
"baseStar"_a);
95 py::class_<MeasuredStar, std::shared_ptr<MeasuredStar>, BaseStar>
cls(mod,
"MeasuredStar");
97 cls.def(py::init<>());
98 cls.def(py::init<BaseStar const &>(),
"baseStar"_a);
100 cls.def(
"getFittedStar", &MeasuredStar::getFittedStar);
101 cls.def(
"setFittedStar", &MeasuredStar::setFittedStar);
103 cls.def(
"getInstFlux", &MeasuredStar::getInstFlux);
104 cls.def(
"setInstFluxAndErr", &MeasuredStar::setInstFluxAndErr);
105 cls.def(
"getInstFluxErr", &MeasuredStar::getInstFluxErr);
106 cls.def(
"getInstMag", &MeasuredStar::getInstMag);
107 cls.def(
"getInstMagErr", &MeasuredStar::getInstMagErr);
108 cls.def(
"setXFocal", &MeasuredStar::setXFocal);
109 cls.def(
"setYFocal", &MeasuredStar::setYFocal);
110 cls.def(
"getXFocal", &MeasuredStar::getXFocal);
111 cls.def(
"getYFocal", &MeasuredStar::getYFocal);
116 declareFatPoint(mod);
117 declareBaseStar(mod);
119 declareFittedStar(mod);
120 declareMeasuredStar(mod);