Class TransmissionCurve

Inheritance Relationships

Base Types

  • public lsst::afw::table::io::PersistableFacade< TransmissionCurve > (Template Class PersistableFacade)

  • public Storable

  • public std::enable_shared_from_this< TransmissionCurve >

Class Documentation

class TransmissionCurve : public lsst::afw::table::io::PersistableFacade<TransmissionCurve>, public Storable, public std::enable_shared_from_this<TransmissionCurve>

A spatially-varying transmission curve as a function of wavelength.

TransmissionCurve can only be evaluated at discrete (albeit arbitrary) user-provided positions; it does not provide an interface for computing average transmission over regions or computing spatially-varying scalars from integrals over the wavelength dimension.

TransmissionCurves are immutable and are expected to be passed and held by shared_ptr<TransmissionCurve const>. As such they are neither copyable nor movable (because there should be no need to copy or move).

All wavelength values should be in Angstroms.

The flux units and overall normalization of TransmissionCurves is unspecified by the class, but their normalization and units should always be consistent throughout the spatial area over which they are defined (an implementation should not e.g. re-normalize to unit bolometric flux at each position it is evaluated at). Other classes and functions using TransmissionCurves should of course document the flux units and/or normalization expected/provided.

Public Functions

std::shared_ptr<TransmissionCurve const> multipliedBy(TransmissionCurve const &other) const

Return a new TransmissionCurve that simply multiplies the values of two others.

The new TransmissionCurve’s “natural sampling” will be defined such that the spcaing is no larger than the spacing of either of the inputs. The minimum and maximum will be set to include the minimum and maximum of both operands except where one operand is exactly zero and hence the value of the other can be ignored.

Note

This is also mapped to mul in Python (overriding operator* in C++ would be problematic due to the use of shared_ptr).

std::shared_ptr<TransmissionCurve const> transformedBy(std::shared_ptr<geom::TransformPoint2ToPoint2> transform) const

Return a view of a TransmissionCurve in a different coordinate system.

The returned TransmissionCurve will be equivalent to one whose sampleAt method calls first calls transform.applyInverse on the given point and then calls base.sampleAt on the result.

TransmissionCurve(TransmissionCurve const&)
TransmissionCurve(TransmissionCurve&&)
TransmissionCurve &operator=(TransmissionCurve const&)
TransmissionCurve &operator=(TransmissionCurve&&)
~TransmissionCurve()
virtual std::pair<double, double> getWavelengthBounds() const = 0

Return the wavelength interval on which this TransmissionCurve varies.

Throghputs beyond the min and max values will by set by sampleAt to the values returned by getThroughputAtBounds().

Min and/or max values may be infinite to indicate an analytic curve with no wavelength bounds.

virtual std::pair<double, double> getThroughputAtBounds() const = 0

Return the throughput value that will be returned for wavelengths below and above getWavelenthBounds().first and .second (respectively).

virtual void sampleAt(lsst::geom::Point2D const &position, ndarray::Array<double const, 1, 1> const &wavelengths, ndarray::Array<double, 1, 1> const &out) const = 0

Evaluate the throughput at a position into a provided output array.

Provides basic exception safety: the

out array values may be modified if an exception is thrown.
Parameters
  • [in] position: Spatial position at which to evaluate.

  • [in] wavelengths: Wavelengths at which to evaluate.

  • [inout] out: Computed throughput values. Must be pre- allocated to the same size as the wavelengths array.

Exceptions
  • Throws: pex::exceptions::LengthError if the size of the wavelengths and out arrays differ.

ndarray::Array<double, 1, 1> sampleAt(lsst::geom::Point2D const &position, ndarray::Array<double const, 1, 1> const &wavelengths) const

Evaluate the throughput at a position into a new array.

Return

Computed throughput values, in an array with the same size as wavelengths.

Parameters
  • [in] position: Spatial position at which to evaluate.

  • [in] wavelengths: Wavelengths at which to evaluate.

Public Static Functions

static std::shared_ptr<TransmissionCurve const> makeIdentity()

Create a new TranmissionCurve that has unit thoughput at all wavelengths everywhere.

static std::shared_ptr<TransmissionCurve const> makeSpatiallyConstant(ndarray::Array<double const, 1> const &throughput, ndarray::Array<double const, 1> const &wavelengths, double throughputAtMin = 0.0, double throughputAtMax = 0.0)

Create a new TransmissionCurve with spatially-constant throughput.

Throughput outside the given wavelength domain is assumed to be constant.

Parameters
  • [in] throughput: an Array of throughput values with the same size as the wavelengths Array (will be copied).

  • [in] wavelengths: an Array of wavelengths in Angstroms (will be copied). Must be monotonically increasing.

  • [in] throughputAtMin: the throughput value used for wavelengths below wavelengths.front().

  • [in] throughputAtMax: the throughput value used for wavelengths above wavelengths.back().

static std::shared_ptr<TransmissionCurve const> makeRadial(ndarray::Array<double const, 2> const &throughput, ndarray::Array<double const, 1> const &wavelengths, ndarray::Array<double const, 1> const &radii, double throughputAtMin = 0.0, double throughputAtMax = 0.0)

Create a new TransmissionCurve with throughput varying as function of radius.

Throughput outside the given wavelength or radius domain is assumed to be constant.

Parameters
  • [in] throughput: an Array of throughput values with shape (wavelengths.size(), radii.size()). Will be copied.

  • [in] wavelengths: an Array of wavelengths in Angstroms (will be copied). Must be monotonically increasing.

  • [in] radii: an Array of radii (will be copied). Must be monotonically increasing.

  • [in] throughputAtMin: the throughput value used for wavelengths below wavelengths.front().

  • [in] throughputAtMax: the throughput value used for wavelengths above wavelengths.back().

Protected Functions

virtual std::shared_ptr<TransmissionCurve const> _transformedByImpl(std::shared_ptr<geom::TransformPoint2ToPoint2> transform) const

Polymorphic implementation for transformedBy().

The default implementation of this method creates a new TransmissionCurve that lazily applies the given transform to points before evaluating the original TransmissionCurve, which should be appropriate for nearly all concrete TransmissionCurve subclases.

Parameters
  • [in] transform: A transform to that maps the coordinate system of the returned transform to that of this.

virtual std::shared_ptr<TransmissionCurve const> _multipliedByImpl(std::shared_ptr<TransmissionCurve const> other) const

One-way polymorphic implementation for multipliedBy().

The default implementation simply returns nullptr, which indicates to multiply() that it should call other->_multiplyImply(shared_from_this()). If that returns nullptr as well, multiply will construct a new TransmisionCurve whose sampleAt method delegates to both operands and then multiplies the results.

Parameters

TransmissionCurve()
std::string getPythonModule() const