24 #include "pybind11/pybind11.h"
44 using namespace pybind11::literals;
61 [](
auto &mod,
auto &cls) {
63 cls.def(py::init<table::RecordId, double, double, daf::base::DateTime const &, double,
64 lsst::geom::Angle const &, lsst::geom::SpherePoint const &,
65 lsst::geom::SpherePoint const &, double, lsst::geom::Angle const &,
66 RotType const &, coord::Observatory const &, coord::Weather const &,
67 std::string const &>(),
68 "exposureId"_a = 0,
"exposureTime"_a = nan,
"darkTime"_a = nan,
69 "date"_a = daf::base::DateTime(),
"ut1"_a = nan,
"era"_a = nanAngle,
70 "boresightRaDec"_a = lsst::geom::SpherePoint(nanAngle, nanAngle),
71 "boresightAzAlt"_a = lsst::geom::SpherePoint(nanAngle, nanAngle),
72 "boresightAirmass"_a = nan,
"boresightRotAngle"_a = nanAngle,
73 "rotType"_a = RotType::UNKNOWN,
74 "observatory"_a = coord::Observatory(nanAngle, nanAngle, nan),
75 "weather"_a = coord::Weather(nan, nan, nan),
"instrumentLabel"_a =
"");
76 cls.def(py::init<daf::base::PropertySet const &>(),
"metadata"_a);
77 cls.def(py::init<VisitInfo const &>(),
"visitInfo"_a);
79 table::io::python::addPersistableMethods<VisitInfo>(cls);
83 "__eq__", [](VisitInfo const &self, VisitInfo const &other) { return self == other; },
91 cls.def(
"getExposureTime", &VisitInfo::getExposureTime);
92 cls.def(
"getDarkTime", &VisitInfo::getDarkTime);
93 cls.def(
"getDate", &VisitInfo::getDate);
94 cls.def(
"getUt1", &VisitInfo::getUt1);
95 cls.def(
"getEra", &VisitInfo::getEra);
96 cls.def(
"getBoresightRaDec", &VisitInfo::getBoresightRaDec);
97 cls.def(
"getBoresightAzAlt", &VisitInfo::getBoresightAzAlt);
98 cls.def(
"getBoresightAirmass", &VisitInfo::getBoresightAirmass);
99 cls.def(
"getBoresightParAngle", &VisitInfo::getBoresightParAngle);
100 cls.def(
"getBoresightRotAngle", &VisitInfo::getBoresightRotAngle);
101 cls.def(
"getRotType", &VisitInfo::getRotType);
102 cls.def(
"getObservatory", &VisitInfo::getObservatory);
103 cls.def(
"getWeather", &VisitInfo::getWeather);
104 cls.def(
"isPersistable", &VisitInfo::isPersistable);
105 cls.def(
"getLocalEra", &VisitInfo::getLocalEra);
106 cls.def(
"getBoresightHourAngle", &VisitInfo::getBoresightHourAngle);
107 cls.def(
"getInstrumentLabel", &VisitInfo::getInstrumentLabel);
113 wrappers.
wrapType(py::enum_<RotType>(wrappers.
module,
"RotType"), [](
auto &mod,
auto &enm) {
114 enm.value(
"UNKNOWN", RotType::UNKNOWN);
115 enm.value(
"SKY", RotType::SKY);
116 enm.value(
"HORIZON", RotType::HORIZON);
117 enm.value(
"MOUNT", RotType::MOUNT);
131 wrappers.
wrap([](
auto &mod) {
ItemVariant const * other
Information about a single exposure of an imaging camera.
Interface supporting iteration over heterogenous containers.
A class representing an angle.
A helper class for subdividing pybind11 module across multiple translation units (i....
pybind11::module module
The module object passed to the PYBIND11_MODULE block that contains this WrapperCollection.
void finish()
Invoke all deferred wrapper-declaring callables.
PyType wrapType(PyType cls, ClassWrapperCallback function, bool setModuleName=true)
Add a type (class or enum) wrapper, deferring method and other attribute definitions until finish() i...
void addInheritanceDependency(std::string const &name)
Indicate an external module that provides a base class for a subsequent addType call.
void wrap(WrapperCallback function)
Add a set of wrappers without defining a class.
PYBIND11_MODULE(imageUtils, mod)
int stripVisitInfoKeywords(daf::base::PropertySet &metadata)
Remove VisitInfo-related keywords from the metadata.
void setVisitInfoMetadata(daf::base::PropertyList &metadata, VisitInfo const &visitInfo)
Set FITS metadata from a VisitInfo.
Backwards-compatibility support for depersisting the old Calib (FluxMag0/FluxMag0Err) objects.
void wrapRotType(lsst::utils::python::WrapperCollection &wrappers)
void wrapVisitInfo(lsst::utils::python::WrapperCollection &wrappers)
def getExposureId(self, dataRef)
void addOutputOp(PyClass &cls, std::string const &method)
Add __str__ or __repr__ method implemented by operator<<.
A base class for image defects.