LSST Applications
21.0.0-172-gfb10e10a+18fedfabac,22.0.0+297cba6710,22.0.0+80564b0ff1,22.0.0+8d77f4f51a,22.0.0+a28f4c53b1,22.0.0+dcf3732eb2,22.0.1-1-g7d6de66+2a20fdde0d,22.0.1-1-g8e32f31+297cba6710,22.0.1-1-geca5380+7fa3b7d9b6,22.0.1-12-g44dc1dc+2a20fdde0d,22.0.1-15-g6a90155+515f58c32b,22.0.1-16-g9282f48+790f5f2caa,22.0.1-2-g92698f7+dcf3732eb2,22.0.1-2-ga9b0f51+7fa3b7d9b6,22.0.1-2-gd1925c9+bf4f0e694f,22.0.1-24-g1ad7a390+a9625a72a8,22.0.1-25-g5bf6245+3ad8ecd50b,22.0.1-25-gb120d7b+8b5510f75f,22.0.1-27-g97737f7+2a20fdde0d,22.0.1-32-gf62ce7b1+aa4237961e,22.0.1-4-g0b3f228+2a20fdde0d,22.0.1-4-g243d05b+871c1b8305,22.0.1-4-g3a563be+32dcf1063f,22.0.1-4-g44f2e3d+9e4ab0f4fa,22.0.1-42-gca6935d93+ba5e5ca3eb,22.0.1-5-g15c806e+85460ae5f3,22.0.1-5-g58711c4+611d128589,22.0.1-5-g75bb458+99c117b92f,22.0.1-6-g1c63a23+7fa3b7d9b6,22.0.1-6-g50866e6+84ff5a128b,22.0.1-6-g8d3140d+720564cf76,22.0.1-6-gd805d02+cc5644f571,22.0.1-8-ge5750ce+85460ae5f3,master-g6e05de7fdc+babf819c66,master-g99da0e417a+8d77f4f51a,w.2021.48
LSST Data Management Base Package
|
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. More... | |
std::shared_ptr< TransmissionCurve const > | transformedBy (std::shared_ptr< geom::TransformPoint2ToPoint2 > transform) const |
Return a view of a TransmissionCurve in a different coordinate system. More... | |
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. More... | |
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). More... | |
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. More... | |
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. More... | |
virtual std::shared_ptr< Storable > | cloneStorable () const |
Create a new object that is a copy of this one (optional operation). More... | |
virtual std::string | toString () const |
Create a string representation of this object (optional operation). More... | |
virtual std::size_t | hash_value () const |
Return a hash of this object (optional operation). More... | |
virtual bool | equals (Storable const &other) const noexcept |
Compare this object to another Storable. More... | |
void | writeFits (std::string const &fileName, std::string const &mode="w") const |
Write the object to a regular FITS file. More... | |
void | writeFits (fits::MemFileManager &manager, std::string const &mode="w") const |
Write the object to a FITS image in memory. More... | |
void | writeFits (fits::Fits &fitsfile) const |
Write the object to an already-open FITS object. More... | |
virtual bool | isPersistable () const noexcept |
Return true if this particular object can be persisted using afw::table::io. More... | |
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. More... | |
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. More... | |
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. More... | |
static std::shared_ptr< TransmissionCurve > | readFits (fits::Fits &fitsfile) |
Read an object from an already open FITS object. More... | |
static std::shared_ptr< TransmissionCurve > | readFits (std::string const &fileName, int hdu=fits::DEFAULT_HDU) |
Read an object from a regular FITS file. More... | |
static std::shared_ptr< TransmissionCurve > | readFits (fits::MemFileManager &manager, int hdu=fits::DEFAULT_HDU) |
Read an object from a FITS file in memory. More... | |
static std::shared_ptr< TransmissionCurve > | dynamicCast (std::shared_ptr< Persistable > const &ptr) |
Dynamically cast a shared_ptr. More... | |
Protected Types | |
using | OutputArchiveHandle = io::OutputArchiveHandle |
Protected Member Functions | |
virtual std::shared_ptr< TransmissionCurve const > | _transformedByImpl (std::shared_ptr< geom::TransformPoint2ToPoint2 > transform) const |
Polymorphic implementation for transformedBy(). More... | |
virtual std::shared_ptr< TransmissionCurve const > | _multipliedByImpl (std::shared_ptr< TransmissionCurve const > other) const |
One-way polymorphic implementation for multipliedBy(). More... | |
TransmissionCurve ()=default | |
std::string | getPythonModule () const override |
Return the fully-qualified Python module that should be imported to guarantee that its factory is registered. More... | |
virtual std::string | getPersistenceName () const |
Return the unique name used to persist this object and look up its factory. More... | |
virtual void | write (OutputArchiveHandle &handle) const |
Write the object to one or more catalogs. More... | |
Static Protected Member Functions | |
template<class T > | |
static bool | singleClassEquals (T const &lhs, Storable const &rhs) |
Test if a Storable is of a particular class and equal to another object. More... | |
Related Functions | |
(Note that these are not member functions.) | |
std::ostream & | operator<< (std::ostream &os, Storable const &storable) |
Output operator for Storable. More... | |
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.
|
protectedinherited |
Definition at line 108 of file Persistable.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.
|
virtualinherited |
Create a new object that is a copy of this one (optional operation).
This operation is required for Storables that are stored in GenericMap by value, but not for those stored by shared pointer.
UnsupportedOperationException | Thrown if this object is not cloneable. |
clone
operation, the two should behave identically except for the formal return type.__deepcopy__
if it exists. Reimplemented in lsst::afw::typehandling::StorableHelper< Base >, lsst::afw::image::VisitInfo, lsst::afw::image::PhotoCalib, lsst::afw::image::FilterLabel, lsst::afw::image::CoaddInputs, lsst::afw::image::ApCorrMap, lsst::afw::geom::SkyWcs, lsst::afw::geom::polygon::Polygon, and lsst::afw::detection::Psf.
Definition at line 36 of file Storable.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.
|
virtualnoexceptinherited |
Compare this object to another Storable.
Subclasses that implement equality comparison must override this method to give results consistent with operator==
for all inputs that are accepted by both.
false
. If cross-class comparisons are valid, implementers should take care that they are symmetric and will give the same result no matter what the compile-time types of the left- and right-hand sides are.__eq__
if it exists. Reimplemented in lsst::afw::image::VisitInfo, lsst::afw::image::PhotoCalib, lsst::afw::geom::SkyWcs, lsst::afw::geom::polygon::Polygon, and lsst::afw::typehandling::StorableHelper< Base >.
Definition at line 48 of file Storable.cc.
|
protectedvirtualinherited |
Return the unique name used to persist this object and look up its factory.
Must be less than ArchiveIndexSchema::MAX_NAME_LENGTH characters.
Reimplemented in lsst::meas::modelfit::Mixture, lsst::meas::algorithms::WarpedPsf, lsst::meas::algorithms::SingleGaussianPsf, lsst::meas::algorithms::KernelPsf, lsst::meas::algorithms::DoubleGaussianPsf, lsst::meas::algorithms::CoaddPsf, lsst::meas::algorithms::CoaddBoundedField, lsst::afw::typehandling::StorableHelper< Base >, lsst::afw::math::WarpingControl, lsst::afw::math::NearestWarpingKernel, lsst::afw::math::BilinearWarpingKernel, lsst::afw::math::LanczosWarpingKernel, lsst::afw::math::TransformBoundedField, lsst::afw::math::ProductBoundedField, lsst::afw::math::PixelAreaBoundedField, lsst::afw::math::LinearCombinationKernel, lsst::afw::math::DeltaFunctionKernel, lsst::afw::math::AnalyticKernel, lsst::afw::math::FixedKernel, lsst::afw::math::Chebyshev1Function2< ReturnT >, lsst::afw::math::PolynomialFunction2< ReturnT >, lsst::afw::math::DoubleGaussianFunction2< ReturnT >, lsst::afw::math::GaussianFunction2< ReturnT >, lsst::afw::math::ChebyshevBoundedField, lsst::afw::image::VisitInfo, lsst::afw::image::PhotoCalib, lsst::afw::image::CoaddInputs, lsst::afw::geom::Transform< FromEndpoint, ToEndpoint >, lsst::afw::geom::Transform< afw::geom::Point2Endpoint, afw::geom::GenericEndpoint >, lsst::afw::geom::SkyWcs, lsst::afw::geom::polygon::Polygon, lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >, lsst::afw::detection::GaussianPsf, lsst::afw::detection::Footprint, lsst::afw::cameraGeom::DetectorCollection, and lsst::afw::image::FilterLabel.
Definition at line 34 of file Persistable.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 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.
|
virtualinherited |
Return a hash of this object (optional operation).
UnsupportedOperationException | Thrown if this object is not hashable. |
__hash__
if it exists. Reimplemented in lsst::afw::typehandling::StorableHelper< Base >, lsst::afw::image::VisitInfo, lsst::afw::image::FilterLabel, and lsst::afw::geom::polygon::Polygon.
Definition at line 44 of file Storable.cc.
|
inlinevirtualnoexceptinherited |
Return true if this particular object can be persisted using afw::table::io.
Reimplemented in lsst::meas::modelfit::Mixture, lsst::meas::extensions::psfex::PsfexPsf, lsst::meas::algorithms::WarpedPsf, lsst::meas::algorithms::SingleGaussianPsf, lsst::meas::algorithms::KernelPsf, lsst::meas::algorithms::DoubleGaussianPsf, lsst::meas::algorithms::CoaddPsf, lsst::meas::algorithms::CoaddBoundedField, lsst::afw::typehandling::StorableHelper< Base >, lsst::afw::math::WarpingControl, lsst::afw::math::NearestWarpingKernel, lsst::afw::math::BilinearWarpingKernel, lsst::afw::math::LanczosWarpingKernel, lsst::afw::math::TransformBoundedField, lsst::afw::math::ProductBoundedField, lsst::afw::math::PixelAreaBoundedField, lsst::afw::math::LinearCombinationKernel, lsst::afw::math::DeltaFunctionKernel, lsst::afw::math::AnalyticKernel, lsst::afw::math::FixedKernel, lsst::afw::math::Chebyshev1Function2< ReturnT >, lsst::afw::math::PolynomialFunction2< ReturnT >, lsst::afw::math::DoubleGaussianFunction2< ReturnT >, lsst::afw::math::GaussianFunction2< ReturnT >, lsst::afw::math::ChebyshevBoundedField, lsst::afw::image::VisitInfo, lsst::afw::image::PhotoCalib, lsst::afw::image::FilterLabel, lsst::afw::image::CoaddInputs, lsst::afw::image::ApCorrMap, lsst::afw::geom::Transform< FromEndpoint, ToEndpoint >, lsst::afw::geom::Transform< afw::geom::Point2Endpoint, afw::geom::GenericEndpoint >, lsst::afw::geom::SpanSet, lsst::afw::geom::SkyWcs, lsst::afw::geom::polygon::Polygon, lsst::afw::detection::GaussianPsf, lsst::afw::detection::Footprint, lsst::afw::cameraGeom::TransformMap, lsst::afw::cameraGeom::DetectorCollection, lsst::afw::cameraGeom::Detector, and lsst::afw::cameraGeom::Camera.
Definition at line 102 of file Persistable.h.
|
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.
|
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.
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. |
out
array values may be modified if an exception is thrown.
|
inlinestaticprotectedinherited |
Test if a Storable is of a particular class and equal to another object.
This method template simplifies implementations of equals that delegate to operator==
without supporting cross-class comparisons.
T | The class expected of the two objects to be compared. |
lhs,rhs | The objects to compare. Note that rhs need not be a T , while lhs must be. |
true
if rhs
is a T
and lhs == rhs
; false
otherwise.operator==
. Most implementations of operator==
do not throw.operator==
with both arguments of compile-time type T const&
. Its use is not recommended if there would be any ambiguity as to which operator==
gets picked by overload resolution.This method template is typically called from equals as:
bool MyType::equals(Storable const& other) const noexcept { return singleClassEquals(*this, other); }
Definition at line 151 of file Storable.h.
|
virtualinherited |
Create a string representation of this object (optional operation).
UnsupportedOperationException | Thrown if this object does not have a string representation. |
__repr__
. Reimplemented in lsst::afw::typehandling::StorableHelper< Base >, lsst::afw::image::VisitInfo, lsst::afw::image::PhotoCalib, lsst::afw::image::FilterLabel, lsst::afw::geom::SkyWcs, and lsst::afw::geom::polygon::Polygon.
Definition at line 40 of file Storable.cc.
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.
|
protectedvirtualinherited |
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 in lsst::afw::typehandling::StorableHelper< Base >, lsst::afw::image::FilterLabel, lsst::meas::modelfit::Mixture, lsst::meas::algorithms::WarpedPsf, lsst::meas::algorithms::SingleGaussianPsf, lsst::meas::algorithms::KernelPsf, lsst::meas::algorithms::DoubleGaussianPsf, lsst::meas::algorithms::CoaddPsf, lsst::meas::algorithms::CoaddBoundedField, lsst::afw::math::WarpingControl, lsst::afw::math::NearestWarpingKernel, lsst::afw::math::BilinearWarpingKernel, lsst::afw::math::LanczosWarpingKernel, lsst::afw::math::TransformBoundedField, lsst::afw::math::ProductBoundedField, lsst::afw::math::PixelAreaBoundedField, lsst::afw::math::LinearCombinationKernel, lsst::afw::math::DeltaFunctionKernel, lsst::afw::math::AnalyticKernel, lsst::afw::math::FixedKernel, lsst::afw::math::ChebyshevBoundedField, lsst::afw::image::VisitInfo, lsst::afw::image::PhotoCalib, lsst::afw::image::CoaddInputs, lsst::afw::geom::Transform< FromEndpoint, ToEndpoint >, lsst::afw::geom::Transform< afw::geom::Point2Endpoint, afw::geom::GenericEndpoint >, lsst::afw::geom::SkyWcs, lsst::afw::geom::polygon::Polygon, lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >, lsst::afw::detection::GaussianPsf, lsst::afw::detection::Footprint, lsst::afw::cameraGeom::DetectorCollection, lsst::afw::cameraGeom::Camera, lsst::meas::extensions::psfex::PsfexPsf, lsst::afw::math::Chebyshev1Function2< ReturnT >, lsst::afw::math::PolynomialFunction2< ReturnT >, lsst::afw::math::DoubleGaussianFunction2< ReturnT >, and lsst::afw::math::GaussianFunction2< ReturnT >.
Definition at line 38 of file Persistable.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.
|
related |
Output operator for Storable.
os | the desired output stream |
storable | the object to print |
os
UnsupportedOperationException | Thrown if storable does not have an implementation of Storable::toString. |
Definition at line 174 of file Storable.h.