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 &, table::RecordId 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 =
"",
"id"_a = 0);
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);
108 cls.def(
"getId", &VisitInfo::getId);
111 cls.def_property_readonly(
"exposureTime", &VisitInfo::getExposureTime);
112 cls.def_property_readonly(
"darkTime", &VisitInfo::getDarkTime);
113 cls.def_property_readonly(
"date", &VisitInfo::getDate);
114 cls.def_property_readonly(
"ut1", &VisitInfo::getUt1);
115 cls.def_property_readonly(
"era", &VisitInfo::getEra);
116 cls.def_property_readonly(
"boresightRaDec", &VisitInfo::getBoresightRaDec);
117 cls.def_property_readonly(
"boresightAzAlt", &VisitInfo::getBoresightAzAlt);
118 cls.def_property_readonly(
"boresightAirmass", &VisitInfo::getBoresightAirmass);
119 cls.def_property_readonly(
"boresightParAngle", &VisitInfo::getBoresightParAngle);
120 cls.def_property_readonly(
"boresightRotAngle", &VisitInfo::getBoresightRotAngle);
121 cls.def_property_readonly(
"rotType", &VisitInfo::getRotType);
122 cls.def_property_readonly(
"observatory", &VisitInfo::getObservatory);
123 cls.def_property_readonly(
"weather", &VisitInfo::getWeather);
124 cls.def_property_readonly(
"isPersistable", &VisitInfo::isPersistable);
125 cls.def_property_readonly(
"localEra", &VisitInfo::getLocalEra);
126 cls.def_property_readonly(
"boresightHourAngle", &VisitInfo::getBoresightHourAngle);
127 cls.def_property_readonly(
"instrumentLabel", &VisitInfo::getInstrumentLabel);
128 cls.def_property_readonly(
"id", &VisitInfo::getId);
134 wrappers.wrapType(py::enum_<RotType>(wrappers.module,
"RotType"), [](
auto &mod,
auto &enm) {
135 enm.value(
"UNKNOWN", RotType::UNKNOWN);
136 enm.value(
"SKY", RotType::SKY);
137 enm.value(
"HORIZON", RotType::HORIZON);
138 enm.value(
"MOUNT", RotType::MOUNT);
144 wrappers.addInheritanceDependency(
"lsst.daf.base");
145 wrappers.addInheritanceDependency(
"lsst.geom");
146 wrappers.addInheritanceDependency(
"lsst.afw.coord");
147 wrappers.addInheritanceDependency(
"lsst.afw.typehandling");
150 wrappers.wrap([](
auto &mod) {
Information about a single exposure of an imaging camera.
Interface supporting iteration over heterogenous containers.
A class representing an angle.
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 declareVisitInfo(lsst::utils::python::WrapperCollection &wrappers)
void declareRotType(lsst::utils::python::WrapperCollection &wrappers)
void wrapVisitInfo(lsst::utils::python::WrapperCollection &)
void addOutputOp(PyClass &cls, std::string const &method)
Add __str__ or __repr__ method implemented by operator<<.
def getExposureId(self, dataRef)
A base class for image defects.