23 #include "pybind11/pybind11.h"
24 #include "pybind11/stl.h"
28 #include "ndarray/pybind11.h"
35 using namespace pybind11::literals;
42 using PyTransmissionCurve =
43 py::class_<TransmissionCurve, std::shared_ptr<TransmissionCurve>, typehandling::Storable>;
46 return PyTransmissionCurve(mod,
"TransmissionCurve");
49 void define(PyTransmissionCurve &
cls) {
52 cls.def_static(
"makeIdentity", &TransmissionCurve::makeIdentity);
53 cls.def_static(
"makeSpatiallyConstant", &TransmissionCurve::makeSpatiallyConstant,
54 "throughput"_a,
"wavelengths"_a,
55 "throughputAtMin"_a=0.0,
"throughputAtMax"_a=0.0);
56 cls.def_static(
"makeRadial", &TransmissionCurve::makeRadial,
57 "throughput"_a,
"wavelengths"_a,
"radii"_a,
58 "throughputAtMin"_a=0.0,
"throughputAtMax"_a=0.0);
59 cls.def(
"__mul__", &TransmissionCurve::multipliedBy, py::is_operator());
60 cls.def(
"multipliedBy", &TransmissionCurve::multipliedBy);
61 cls.def(
"transformedBy", &TransmissionCurve::transformedBy,
"transform"_a);
62 cls.def(
"getWavelengthBounds", &TransmissionCurve::getWavelengthBounds);
63 cls.def(
"getThroughputAtBounds", &TransmissionCurve::getThroughputAtBounds);
66 (
void (TransmissionCurve::*)(
68 ndarray::Array<double const,1,1>
const &,
69 ndarray::Array<double,1,1>
const &
70 )
const) &TransmissionCurve::sampleAt,
71 "position"_a,
"wavelengths"_a,
"out"_a
75 (ndarray::Array<double,1,1> (TransmissionCurve::*)(
77 ndarray::Array<double const,1,1>
const &
78 )
const) &TransmissionCurve::sampleAt,
79 "position"_a,
"wavelengths"_a
85 py::module::import(
"lsst.afw.typehandling");
89 py::module::import(
"lsst.afw.geom");