23 #include "pybind11/pybind11.h"
28 #include "lsst/daf/base/PropertySet.h"
38 namespace py = pybind11;
39 using namespace pybind11::literals;
47 static double const nan(std::numeric_limits<double>::quiet_NaN());
53 py::module mod(
"visitInfo");
56 table::io::python::declarePersistableFacade<VisitInfo>(mod,
"VisitInfo");
60 cls(mod,
"VisitInfo");
63 py::enum_<RotType>(mod,
"RotType")
65 .value(
"SKY", RotType::SKY)
66 .value(
"HORIZON", RotType::HORIZON)
67 .value(
"MOUNT", RotType::MOUNT)
71 cls.def(py::init<
table::RecordId,
double,
double, daf::base::DateTime
const &,
double,
75 "exposureId"_a = 0,
"exposureTime"_a = nan,
"darkTime"_a = nan,
"date"_a = daf::base::DateTime(),
77 "boresightAzAlt"_a =
coord::Coord(nanAngle, nanAngle),
"boresightAirmass"_a = nan,
81 cls.def(py::init<daf::base::PropertySet const &>(),
"metadata"_a);
82 cls.def(py::init<VisitInfo const &>(),
"visitInfo"_a);
85 cls.def(
"__eq__", [](
VisitInfo const &
self,
VisitInfo const &other) {
return self == other; },
87 cls.def(
"__ne__", [](
VisitInfo const &
self,
VisitInfo const &other) {
return self != other; },
91 cls.def(
"getExposureId", &VisitInfo::getExposureId);
92 cls.def(
"getExposureTime", &VisitInfo::getExposureTime);
93 cls.def(
"getDarkTime", &VisitInfo::getDarkTime);
94 cls.def(
"getDate", &VisitInfo::getDate);
95 cls.def(
"getUt1", &VisitInfo::getUt1);
96 cls.def(
"getEra", &VisitInfo::getEra);
97 cls.def(
"getBoresightRaDec", &VisitInfo::getBoresightRaDec);
98 cls.def(
"getBoresightAzAlt", &VisitInfo::getBoresightAzAlt);
99 cls.def(
"getBoresightAirmass", &VisitInfo::getBoresightAirmass);
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);
std::int64_t RecordId
Type used for unique IDs for records.
lsst::afw::geom::Angle Angle
Hold the location of an observatory.
Information about a single exposure of an imaging camera.
A base class for objects that can be persisted via afw::table::io Archive classes.
PYBIND11_PLUGIN(_cameraPoint)
void setVisitInfoMetadata(daf::base::PropertyList &metadata, VisitInfo const &visitInfo)
Set FITS metadata from a VisitInfo.
A class representing an angle.
Basic weather information sufficient for a simple model for air mass or refraction.
int stripVisitInfoKeywords(daf::base::PropertySet &metadata)
Remove VisitInfo-related keywords from the metadata.
This is the base class for spherical coordinates.
A class to handle Icrs coordinates (inherits from Coord)