LSST Applications g1635faa6d4+215bc75b8c,g1653933729+a8ce1bb630,g22ce9dc20b+d972d8df89,g28da252d5a+0fcf840c6d,g29321ee8c0+e558be0e74,g2bbee38e9b+9634bc57db,g2bc492864f+9634bc57db,g2cdde0e794+c2c89b37c4,g3156d2b45e+41e33cbcdc,g347aa1857d+9634bc57db,g35bb328faa+a8ce1bb630,g3a166c0a6a+9634bc57db,g3e281a1b8c+9f2c4e2fc3,g414038480c+077ccc18e7,g41af890bb2+2a6f257a1d,g5fbc88fb19+17cd334064,g781aacb6e4+a8ce1bb630,g7ab3e175f3+59ce30aec6,g80478fca09+f8b2ab54e1,g82479be7b0+ba9d578ff8,g858d7b2824+d972d8df89,g9125e01d80+a8ce1bb630,g9726552aa6+10f999ec6a,ga5288a1d22+630363936d,gae0086650b+a8ce1bb630,gb58c049af0+d64f4d3760,gb9c6c11c1e+9553554aa7,gbd46683f8f+0c4209622a,gc28159a63d+9634bc57db,gcf0d15dbbd+2db122af0a,gda3e153d99+d972d8df89,gda6a2b7d83+2db122af0a,gdaeeff99f8+1711a396fd,ge2409df99d+d1dc2f3b25,ge33fd446bb+d972d8df89,ge79ae78c31+9634bc57db,gf0baf85859+147a0692ba,gf3967379c6+02b11634a5,w.2024.45
LSST Data Management Base Package
|
A BoundedField based on geom::Transform<Poin2Endpoint, GenericEndpoint<1>>. More...
#include <TransformBoundedField.h>
Public Types | |
using | Transform = afw::geom::Transform<afw::geom::Point2Endpoint, afw::geom::GenericEndpoint> |
Public Member Functions | |
TransformBoundedField (lsst::geom::Box2I const &bbox, Transform const &transform) | |
Create a TransformBoundedField from a bounding box and transform. | |
~TransformBoundedField () override=default | |
TransformBoundedField (TransformBoundedField const &)=default | |
TransformBoundedField (TransformBoundedField &&)=default | |
TransformBoundedField & | operator= (TransformBoundedField const &)=delete |
TransformBoundedField & | operator= (TransformBoundedField &&)=delete |
Transform | getTransform () const |
Get the contained Transform. | |
double | evaluate (lsst::geom::Point2D const &position) const override |
Evaluate the field at the given point. | |
ndarray::Array< double, 1, 1 > | evaluate (ndarray::Array< double const, 1 > const &x, ndarray::Array< double const, 1 > const &y) const override |
Evaluate the field at the given point. | |
bool | isPersistable () const noexcept override |
TransformBoundedField is always persistable. | |
std::shared_ptr< BoundedField > | operator* (double const scale) const override |
Return a scaled BoundedField. | |
bool | operator== (BoundedField const &rhs) const override |
BoundedFields (of the same sublcass) are equal if their bounding boxes and parameters are equal. | |
virtual double | evaluate (lsst::geom::Point2D const &position) const=0 |
Evaluate the field at the given point. | |
double | evaluate (double x, double y) const |
Evaluate the field at the given point. | |
virtual ndarray::Array< double, 1, 1 > | evaluate (ndarray::Array< double const, 1 > const &x, ndarray::Array< double const, 1 > const &y) const |
Evaluate the field at multiple arbitrary points. | |
virtual double | integrate () const |
Compute the integral of this function over its bounding-box. | |
virtual double | mean () const |
Compute the mean of this function over its bounding-box. | |
lsst::geom::Box2I | getBBox () const |
Return the bounding box that defines the region where the field is valid. | |
template<typename T > | |
void | fillImage (image::Image< T > &image, bool overlapOnly=false, int xStep=1, int yStep=1) const |
Assign the field to an image, overwriting values already present. | |
template<typename T > | |
void | addToImage (image::Image< T > &image, double scaleBy=1.0, bool overlapOnly=false, int xStep=1, int yStep=1) const |
Add the field or a constant multiple of it to an image in-place. | |
template<typename T > | |
void | multiplyImage (image::Image< T > &image, bool overlapOnly=false, int xStep=1, int yStep=1) const |
Multiply an image by the field in-place. | |
template<typename T > | |
void | divideImage (image::Image< T > &image, bool overlapOnly=false, int xStep=1, int yStep=1) const |
Divide an image by the field in-place. | |
std::shared_ptr< BoundedField > | operator/ (double scale) const |
bool | operator!= (BoundedField const &rhs) const |
BoundedFields (of the same sublcass) are equal if their bounding boxes and parameters are equal. | |
void | writeFits (std::string const &fileName, std::string const &mode="w") const |
Write the object to a regular FITS file. | |
void | writeFits (fits::MemFileManager &manager, std::string const &mode="w") const |
Write the object to a FITS image in memory. | |
void | writeFits (fits::Fits &fitsfile) const |
Write the object to an already-open FITS object. | |
Static Public Member Functions | |
static std::shared_ptr< TransformBoundedField > | readFits (fits::Fits &fitsfile) |
Read an object from an already open FITS object. | |
static std::shared_ptr< TransformBoundedField > | readFits (std::string const &fileName, int hdu=fits::DEFAULT_HDU) |
Read an object from a regular FITS file. | |
static std::shared_ptr< TransformBoundedField > | readFits (fits::MemFileManager &manager, int hdu=fits::DEFAULT_HDU) |
Read an object from a FITS file in memory. | |
static std::shared_ptr< TransformBoundedField > | dynamicCast (std::shared_ptr< Persistable > const &ptr) |
Dynamically cast a shared_ptr. | |
static std::shared_ptr< BoundedField > | readFits (fits::Fits &fitsfile) |
Read an object from an already open FITS object. | |
static std::shared_ptr< BoundedField > | readFits (std::string const &fileName, int hdu=fits::DEFAULT_HDU) |
Read an object from a regular FITS file. | |
static std::shared_ptr< BoundedField > | readFits (fits::MemFileManager &manager, int hdu=fits::DEFAULT_HDU) |
Read an object from a FITS file in memory. | |
static std::shared_ptr< BoundedField > | dynamicCast (std::shared_ptr< Persistable > const &ptr) |
Dynamically cast a shared_ptr. | |
Protected Types | |
using | OutputArchiveHandle = io::OutputArchiveHandle |
Protected Member Functions | |
std::string | getPersistenceName () const override |
Return the unique name used to persist this object and look up its factory. | |
std::string | getPythonModule () const override |
Return the fully-qualified Python module that should be imported to guarantee that its factory is registered. | |
void | write (OutputArchiveHandle &handle) const override |
Write the object to one or more catalogs. | |
Private Member Functions | |
std::string | toString () const override |
A BoundedField based on geom::Transform<Poin2Endpoint, GenericEndpoint<1>>.
TransformBoundedField supports arbitrary transforms.
Definition at line 43 of file TransformBoundedField.h.
|
protectedinherited |
Definition at line 108 of file Persistable.h.
using lsst::afw::math::TransformBoundedField::Transform = afw::geom::Transform<afw::geom::Point2Endpoint, afw::geom::GenericEndpoint> |
Definition at line 46 of file TransformBoundedField.h.
lsst::afw::math::TransformBoundedField::TransformBoundedField | ( | lsst::geom::Box2I const & | bbox, |
Transform const & | transform ) |
Create a TransformBoundedField from a bounding box and transform.
Definition at line 44 of file TransformBoundedField.cc.
|
overridedefault |
|
default |
|
default |
|
inherited |
Add the field or a constant multiple of it to an image in-place.
[out] | image | Image to add to. |
[in] | scaleBy | Multiply the field by this before adding it to the image. |
[in] | overlapOnly | If true, only modify the region in the intersection of image.getBBox(image::PARENT) and this->getBBox(). |
[in] | xStep | Distance between grid points in X to evaluate; values between grid points will be linearly interpolated. |
[in] | yStep | Distance between grid points in Y to evaluate; values between grid points will be linearly interpolated. |
pex::exceptions::RuntimeError | if the bounding boxes do not overlap and overlapOnly=false. |
Definition at line 264 of file BoundedField.cc.
|
inherited |
Divide an image by the field in-place.
[out] | image | Image to fill. |
[in] | overlapOnly | If true, only modify the region in the intersection of image.getBBox(image::PARENT) and this->getBBox(). |
[in] | xStep | Distance between grid points in X to evaluate; values between grid points will be linearly interpolated. |
[in] | yStep | Distance between grid points in Y to evaluate; values between grid points will be linearly interpolated. |
pex::exceptions::RuntimeError | if the bounding boxes do not overlap and overlapOnly=false. |
Definition at line 275 of file BoundedField.cc.
|
staticinherited |
Dynamically cast a shared_ptr.
Dynamically cast a shared pointer and raise on failure.
You must provide an explicit template instantiation in the .cc file for each class that inherits from PersistableFacade. Designed to work around RTTI issues on macOS with hidden symbols;
lsst::pex::exceptions::LogicError | if the cast fails |
param[in] ptr The pointer to be cast.
lsst::pex::exceptions::TypeError | If the dynamic cast fails. |
Definition at line 218 of file Persistable.cc.
|
staticinherited |
Dynamically cast a shared_ptr.
Dynamically cast a shared pointer and raise on failure.
You must provide an explicit template instantiation in the .cc file for each class that inherits from PersistableFacade. Designed to work around RTTI issues on macOS with hidden symbols;
lsst::pex::exceptions::LogicError | if the cast fails |
param[in] ptr The pointer to be cast.
lsst::pex::exceptions::TypeError | If the dynamic cast fails. |
Definition at line 218 of file Persistable.cc.
|
inline |
Evaluate the field at the given point.
This delegates to the evaluate() method that takes lsst::geom::Point2D.
There is no bounds-checking on the given position; this is the responsibility of the user, who can almost always do it more efficiently.
Definition at line 75 of file BoundedField.h.
|
overridevirtual |
Evaluate the field at the given point.
This is the only abstract method to be implemented by subclasses.
Subclasses should not provide bounds checking on the given position; this is the responsibility of the user, who can almost always do it more efficiently.
Implements lsst::afw::math::BoundedField.
Definition at line 53 of file TransformBoundedField.cc.
|
virtual |
Evaluate the field at the given point.
This is the only abstract method to be implemented by subclasses.
Subclasses should not provide bounds checking on the given position; this is the responsibility of the user, who can almost always do it more efficiently.
Implements lsst::afw::math::BoundedField.
|
virtual |
Evaluate the field at multiple arbitrary points.
[in] | x | array of x coordinates, same shape as y |
[in] | y | array of y coordinates, same shape as x |
There is no bounds-checking on the given positions; this is the responsibility of the user, who can almost always do it more efficiently.
Reimplemented from lsst::afw::math::BoundedField.
Definition at line 87 of file BoundedField.cc.
|
overridevirtual |
Evaluate the field at the given point.
This is the only abstract method to be implemented by subclasses.
Subclasses should not provide bounds checking on the given position; this is the responsibility of the user, who can almost always do it more efficiently.
Reimplemented from lsst::afw::math::BoundedField.
Definition at line 57 of file TransformBoundedField.cc.
|
inherited |
Assign the field to an image, overwriting values already present.
[out] | image | Image to fill. |
[in] | overlapOnly | If true, only modify the region in the intersection of image.getBBox(image::PARENT) and this->getBBox(). |
[in] | xStep | Distance between grid points in X to evaluate; values between grid points will be linearly interpolated. |
[in] | yStep | Distance between grid points in Y to evaluate; values between grid points will be linearly interpolated. |
pex::exceptions::RuntimeError | if the bounding boxes do not overlap and overlapOnly=false. |
Definition at line 259 of file BoundedField.cc.
|
inlineinherited |
Return the bounding box that defines the region where the field is valid.
Because this is an integer bounding box, its minimum and maximum positions are the centers of the pixels where the field is valid, but the field can be assumed to be valid to the edges of those pixels, which is the boundary you'd get by converting the returned lsst::geom::Box2I into a lsst::geom::Box2D.
Definition at line 112 of file BoundedField.h.
|
overrideprotectedvirtual |
Return the unique name used to persist this object and look up its factory.
Must be less than ArchiveIndexSchema::MAX_NAME_LENGTH characters.
Reimplemented from lsst::afw::table::io::Persistable.
Definition at line 126 of file TransformBoundedField.cc.
|
overrideprotectedvirtual |
Return the fully-qualified Python module that should be imported to guarantee that its factory is registered.
Must be less than ArchiveIndexSchema::MAX_MODULE_LENGTH characters.
Will be ignored if empty.
Reimplemented from lsst::afw::table::io::Persistable.
Definition at line 130 of file TransformBoundedField.cc.
|
inline |
Get the contained Transform.
Definition at line 61 of file TransformBoundedField.h.
|
virtualinherited |
Compute the integral of this function over its bounding-box.
Reimplemented in lsst::afw::math::ChebyshevBoundedField.
Definition at line 49 of file BoundedField.cc.
|
inlineoverridevirtualnoexcept |
TransformBoundedField is always persistable.
Reimplemented from lsst::afw::table::io::Persistable.
Definition at line 73 of file TransformBoundedField.h.
|
virtualinherited |
Compute the mean of this function over its bounding-box.
Reimplemented in lsst::afw::math::ChebyshevBoundedField.
Definition at line 51 of file BoundedField.cc.
|
inherited |
Multiply an image by the field in-place.
[out] | image | Image to fill. |
[in] | overlapOnly | If true, only modify the region in the intersection of image.getBBox(image::PARENT) and this->getBBox(). |
[in] | xStep | Distance between grid points in X to evaluate; values between grid points will be linearly interpolated. |
[in] | yStep | Distance between grid points in Y to evaluate; values between grid points will be linearly interpolated. |
pex::exceptions::RuntimeError | if the bounding boxes do not overlap and overlapOnly=false. |
Definition at line 270 of file BoundedField.cc.
|
inlineinherited |
BoundedFields (of the same sublcass) are equal if their bounding boxes and parameters are equal.
Definition at line 195 of file BoundedField.h.
|
overridevirtual |
Return a scaled BoundedField.
[in] | scale | Scaling factor |
Implements lsst::afw::math::BoundedField.
Definition at line 141 of file TransformBoundedField.cc.
|
inlineinherited |
Definition at line 190 of file BoundedField.h.
|
delete |
|
delete |
|
overridevirtual |
BoundedFields (of the same sublcass) are equal if their bounding boxes and parameters are equal.
Implements lsst::afw::math::BoundedField.
Definition at line 148 of file TransformBoundedField.cc.
|
inlinestaticinherited |
Read an object from an already open FITS object.
[in] | fitsfile | FITS object to read from, already positioned at the desired HDU. |
Definition at line 183 of file Persistable.h.
|
inlinestaticinherited |
Read an object from an already open FITS object.
[in] | fitsfile | FITS object to read from, already positioned at the desired HDU. |
Definition at line 183 of file Persistable.h.
|
inlinestaticinherited |
Read an object from a FITS file in memory.
[in] | manager | Manager for the memory to read from. |
[in] | hdu | HDU to read, where 0 is the primary. The special value of afw::fits::DEFAULT_HDU skips the primary HDU if it is empty. |
Definition at line 205 of file Persistable.h.
|
inlinestaticinherited |
Read an object from a FITS file in memory.
[in] | manager | Manager for the memory to read from. |
[in] | hdu | HDU to read, where 0 is the primary. The special value of afw::fits::DEFAULT_HDU skips the primary HDU if it is empty. |
Definition at line 205 of file Persistable.h.
|
inlinestaticinherited |
Read an object from a regular FITS file.
[in] | fileName | Name of the file to read. |
[in] | hdu | HDU to read, where 0 is the primary. The special value of afw::fits::DEFAULT_HDU skips the primary HDU if it is empty. |
Definition at line 194 of file Persistable.h.
|
inlinestaticinherited |
Read an object from a regular FITS file.
[in] | fileName | Name of the file to read. |
[in] | hdu | HDU to read, where 0 is the primary. The special value of afw::fits::DEFAULT_HDU skips the primary HDU if it is empty. |
Definition at line 194 of file Persistable.h.
|
overrideprivatevirtual |
Implements lsst::afw::math::BoundedField.
Definition at line 156 of file TransformBoundedField.cc.
|
overrideprotectedvirtual |
Write the object to one or more catalogs.
The handle object passed to this function provides an interface for adding new catalogs and adding nested objects to the same archive (while checking for duplicates). See OutputArchiveHandle for more information.
Reimplemented from lsst::afw::table::io::Persistable.
Definition at line 132 of file TransformBoundedField.cc.
|
inherited |
Write the object to an already-open FITS object.
[in] | fitsfile | Open FITS object to write to. |
Definition at line 18 of file Persistable.cc.
|
inherited |
Write the object to a FITS image in memory.
[in] | manager | Name of the file to write to. |
[in] | mode | If "w", any existing file with the given name will be overwritten. If "a", new HDUs will be appended to an existing file. |
Definition at line 29 of file Persistable.cc.
|
inherited |
Write the object to a regular FITS file.
[in] | fileName | Name of the file to write to. |
[in] | mode | If "w", any existing file with the given name will be overwritten. If "a", new HDUs will be appended to an existing file. |
Definition at line 24 of file Persistable.cc.