Class ProductBoundedField

Inheritance Relationships

Base Types

Class Documentation

class ProductBoundedField : public lsst::afw::table::io::PersistableFacade<ProductBoundedField>, public lsst::afw::math::BoundedField

A BoundedField that lazily multiplies a sequence of other BoundedFields.

Public Functions

ProductBoundedField(std::vector<std::shared_ptr<BoundedField const>> const &factors)

Construct from a sequence of BoundedField factors.

Parameters
  • [in] factors: BoundedFields to be multiplied together. All bounding boxes must be the same.

Exceptions
  • pex::exceptions::LengthError: Thrown if factors.size() < 1

  • pex::exceptions::InvalidParameterError: Thrown if the bounding boxes of the factors are inconsistent.

ProductBoundedField(ProductBoundedField const&)
ProductBoundedField(ProductBoundedField&&)
ProductBoundedField &operator=(ProductBoundedField const&)
ProductBoundedField &operator=(ProductBoundedField&&)
~ProductBoundedField()
double evaluate(lsst::geom::Point2D const &position) const

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.

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

There is no bounds-checking on the given positions; this is the responsibility of the user, who can almost always do it more efficiently.

Return

an array of output values, same shape as x and y

Parameters
  • [in] x: array of x coordinates, same shape as y

  • [in] y: array of y coordinates, same shape as x

bool isPersistable() const

ProductBoundedField is persistable if and only if all of its factors are.

std::shared_ptr<BoundedField> operator*(double const scale) const

Return a scaled BoundedField

Parameters
  • [in] scale: Scaling factor

bool operator==(BoundedField const &rhs) const

BoundedFields (of the same sublcass) are equal if their bounding boxes and parameters are equal.

Protected Functions

std::string getPersistenceName() const

Return the unique name used to persist this object and look up its factory.

Must be less than ArchiveIndexSchema::MAX_NAME_LENGTH characters.

std::string getPythonModule() const

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.

void write(OutputArchiveHandle &handle) const

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.