|
lsst.afw gba399f52f3+9b61cfce8e
|
A spatially-varying transmission curve as a function of wavelength. More...
#include <TransmissionCurve.h>
Public Member Functions | |
| std::shared_ptr< TransmissionCurve const > | multipliedBy (TransmissionCurve const &other) const |
| Return a new TransmissionCurve that simply multiplies the values of two others. | |
| std::shared_ptr< TransmissionCurve const > | transformedBy (std::shared_ptr< geom::TransformPoint2ToPoint2 > transform) const |
| Return a view of a TransmissionCurve in a different coordinate system. | |
| TransmissionCurve (TransmissionCurve const &)=delete | |
| TransmissionCurve (TransmissionCurve &&)=delete | |
| TransmissionCurve & | operator= (TransmissionCurve const &)=delete |
| TransmissionCurve & | operator= (TransmissionCurve &&)=delete |
| ~TransmissionCurve () override=default | |
| virtual std::pair< double, double > | getWavelengthBounds () const =0 |
| Return the wavelength interval on which this TransmissionCurve varies. | |
| 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. | |
| 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. | |
| T | shared_from_this (T... args) |
Static Public Member 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. | |
| 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. | |
| static std::shared_ptr< TransmissionCurve > | readFits (fits::Fits &fitsfile) |
| Read an object from an already open FITS object. | |
| static std::shared_ptr< TransmissionCurve > | dynamicCast (std::shared_ptr< Persistable > const &ptr) |
| Dynamically cast a shared_ptr. | |
Protected Member Functions | |
| virtual std::shared_ptr< TransmissionCurve const > | _transformedByImpl (std::shared_ptr< geom::TransformPoint2ToPoint2 > transform) const |
| Polymorphic implementation for transformedBy(). | |
| virtual std::shared_ptr< TransmissionCurve const > | _multipliedByImpl (std::shared_ptr< TransmissionCurve const > other) const |
| One-way polymorphic implementation for multipliedBy(). | |
| TransmissionCurve ()=default | |
| std::string | getPythonModule () const override |
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.
Definition at line 65 of file TransmissionCurve.h.
|
delete |
|
delete |
|
overridedefault |
|
protecteddefault |
|
protectedvirtual |
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.
| [in] | other | The other TransmissionCurve to multiply with self. |
Definition at line 676 of file TransmissionCurve.cc.
|
protectedvirtual |
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.
| [in] | transform | A transform to that maps the coordinate system of the returned transform to that of this. |
Definition at line 671 of file TransmissionCurve.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.
|
overrideprotected |
Definition at line 681 of file TransmissionCurve.cc.
|
pure virtual |
Return the throughput value that will be returned for wavelengths below and above getWavelenthBounds().first and .second (respectively).
|
pure virtual |
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.
|
static |
Create a new TranmissionCurve that has unit thoughput at all wavelengths everywhere.
Definition at line 609 of file TransmissionCurve.cc.
|
static |
Create a new TransmissionCurve with throughput varying as function of radius.
| [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(). |
Throughput outside the given wavelength or radius domain is assumed to be constant.
Definition at line 624 of file TransmissionCurve.cc.
|
static |
Create a new TransmissionCurve with spatially-constant throughput.
| [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(). |
Throughput outside the given wavelength domain is assumed to be constant.
Definition at line 613 of file TransmissionCurve.cc.
| std::shared_ptr< TransmissionCurve const > lsst::afw::image::TransmissionCurve::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.
Definition at line 645 of file TransmissionCurve.cc.
|
delete |
|
delete |
|
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.
| ndarray::Array< double, 1, 1 > lsst::afw::image::TransmissionCurve::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.
| [in] | position | Spatial position at which to evaluate. |
| [in] | wavelengths | Wavelengths at which to evaluate. |
Definition at line 664 of file TransmissionCurve.cc.
|
pure virtual |
Evaluate the throughput at a position into a provided output array.
| [in] | position | Spatial position at which to evaluate. |
| [in] | wavelengths | Wavelengths at which to evaluate. |
| [in,out] | out | Computed throughput values. Must be pre- allocated to the same size as the wavelengths array. |
| Throws | pex::exceptions::LengthError if the size of the wavelengths and out arrays differ. |
| std::shared_ptr< TransmissionCurve const > lsst::afw::image::TransmissionCurve::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.
Definition at line 659 of file TransmissionCurve.cc.