Loading [MathJax]/extensions/tex2jax.js
LSST Applications g0d33ba9806+3d1aa5cd78,g0fba68d861+6c07529581,g1e78f5e6d3+aa4d1c21f1,g1ec0fe41b4+f536777771,g1fd858c14a+c6963eae98,g35bb328faa+fcb1d3bbc8,g4af146b050+58cb980876,g4d2262a081+bfae794ebc,g53246c7159+fcb1d3bbc8,g5a012ec0e7+b20b785ecb,g60b5630c4e+3d1aa5cd78,g67b6fd64d1+4086c0989b,g78460c75b0+2f9a1b4bcd,g786e29fd12+cf7ec2a62a,g7b71ed6315+fcb1d3bbc8,g87b7deb4dc+a8b896a16a,g8852436030+75f93ca278,g89139ef638+4086c0989b,g9125e01d80+fcb1d3bbc8,g94187f82dc+3d1aa5cd78,g989de1cb63+4086c0989b,g9f33ca652e+94dd9a85be,g9f7030ddb1+3f50642ad9,ga2b97cdc51+3d1aa5cd78,ga44b1db4f6+7d2d5e68ea,gabe3b4be73+1e0a283bba,gabf8522325+fa80ff7197,gb1101e3267+96cb2ddcf2,gb58c049af0+f03b321e39,gb89ab40317+4086c0989b,gcf25f946ba+75f93ca278,gd6cbbdb0b4+af3c3595f5,gd9a9a58781+fcb1d3bbc8,gde0f65d7ad+ed90e8109d,ge278dab8ac+d65b3c2b70,ge410e46f29+4086c0989b,gf67bdafdda+4086c0989b,gfe06eef73a+e2ab3e8e4f,v29.0.0.rc5
LSST Data Management Base Package
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
observation.cc File Reference
#include <pybind11/attr.h>
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
#include <memory>
#include <string>
#include "lsst/gauss2d/fit/observation.h"
#include "lsst/gauss2d/fit/parametric.h"
#include "lsst/gauss2d/python/image.h"
#include "pybind11.h"

Go to the source code of this file.

Functions

template<typename T>
void declare_observation (py::module &m, std::string str_type)
 
void bind_observation (py::module &m)
 

Function Documentation

◆ bind_observation()

void bind_observation ( py::module & m)

Definition at line 64 of file observation.cc.

64 {
67}
void declare_observation(py::module &m, std::string str_type)

◆ declare_observation()

template<typename T>
void declare_observation ( py::module & m,
std::string str_type )

Definition at line 43 of file observation.cc.

43 {
44 typedef g2p::Image<T> Image;
45 typedef g2p::Image<bool> Mask;
46 typedef g2f::Observation<T, Image, Mask> Observation;
47 std::string pyclass_name = std::string("Observation") + str_type;
48 py::class_<Observation, std::shared_ptr<Observation>, g2f::Parametric>(m, pyclass_name.c_str())
50 const g2f::Channel &>(),
51 "image"_a, "sigma_inv"_a, "mask_inv"_a, "channel"_a)
52 .def_property_readonly("channel", &Observation::get_channel)
53 .def_property_readonly("image", &Observation::get_image)
54 .def_property_readonly("mask_inv", &Observation::get_mask_inverse)
55 .def_property_readonly("sigma_inv", &Observation::get_sigma_inverse)
56 .def_property_readonly("n_cols", &Observation::get_n_cols)
57 .def_property_readonly("n_rows", &Observation::get_n_rows)
58 .def("parameters", &Observation::get_parameters, "parameters"_a = g2f::ParamRefs(),
59 "paramfilter"_a = nullptr)
60 .def("__repr__", [](const Observation &self) { return self.repr(true); })
61 .def("__str__", &Observation::str);
62}
T c_str(T... args)
An observational channel, usually representing some range of wavelengths of light.
Definition channel.h:29
An observed single-channel image with an associated variance and mask.
Definition observation.h:35
A parametric object that can return and filter its Parameter instances.
Definition parametric.h:13
A Python image using numpy arrrays for storage.
Definition image.h:72
std::vector< ParamBaseRef > ParamRefs
Definition param_defs.h:13
g2d::python::Image< double > Image
Definition test_image.cc:14
g2d::python::Image< bool > Mask
Definition test_image.cc:16