LSST Applications g063fba187b+cac8b7c890,g0f08755f38+6aee506743,g1653933729+a8ce1bb630,g168dd56ebc+a8ce1bb630,g1a2382251a+b4475c5878,g1dcb35cd9c+8f9bc1652e,g20f6ffc8e0+6aee506743,g217e2c1bcf+73dee94bd0,g28da252d5a+1f19c529b9,g2bbee38e9b+3f2625acfc,g2bc492864f+3f2625acfc,g3156d2b45e+6e55a43351,g32e5bea42b+1bb94961c2,g347aa1857d+3f2625acfc,g35bb328faa+a8ce1bb630,g3a166c0a6a+3f2625acfc,g3e281a1b8c+c5dd892a6c,g3e8969e208+a8ce1bb630,g414038480c+5927e1bc1e,g41af890bb2+8a9e676b2a,g7af13505b9+809c143d88,g80478fca09+6ef8b1810f,g82479be7b0+f568feb641,g858d7b2824+6aee506743,g89c8672015+f4add4ffd5,g9125e01d80+a8ce1bb630,ga5288a1d22+2903d499ea,gb58c049af0+d64f4d3760,gc28159a63d+3f2625acfc,gcab2d0539d+b12535109e,gcf0d15dbbd+46a3f46ba9,gda6a2b7d83+46a3f46ba9,gdaeeff99f8+1711a396fd,ge79ae78c31+3f2625acfc,gef2f8181fd+0a71e47438,gf0baf85859+c1f95f4921,gfa517265be+6aee506743,gfa999e8aa5+17cd334064,w.2024.51
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. | |
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. | |
virtual std::shared_ptr< Storable > | cloneStorable () const |
Create a new object that is a copy of this one (optional operation). | |
virtual std::string | toString () const |
Create a string representation of this object (optional operation). | |
virtual std::size_t | hash_value () const |
Return a hash of this object (optional operation). | |
virtual bool | equals (Storable const &other) const noexcept |
Compare this object to another Storable. | |
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. | |
virtual bool | isPersistable () const noexcept |
Return true if this particular object can be persisted using afw::table::io. | |
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 > | readFits (std::string const &fileName, int hdu=fits::DEFAULT_HDU) |
Read an object from a regular FITS file. | |
static std::shared_ptr< TransmissionCurve > | readFits (fits::MemFileManager &manager, int hdu=fits::DEFAULT_HDU) |
Read an object from a FITS file in memory. | |
static std::shared_ptr< TransmissionCurve > | dynamicCast (std::shared_ptr< Persistable > const &ptr) |
Dynamically cast a shared_ptr. | |
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(). | |
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 |
Return the fully-qualified Python module that should be imported to guarantee that its factory is registered. | |
virtual std::string | getPersistenceName () const |
Return the unique name used to persist this object and look up its factory. | |
virtual void | write (OutputArchiveHandle &handle) const |
Write the object to one or more catalogs. | |
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. | |
Related Symbols | |
(Note that these are not member symbols.) | |
std::ostream & | operator<< (std::ostream &os, Storable const &storable) |
Output operator for Storable. | |
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::detection::Psf, lsst::afw::geom::polygon::Polygon, lsst::afw::geom::SkyWcs, lsst::afw::image::ApCorrMap, lsst::afw::image::CoaddInputs, lsst::afw::image::FilterLabel, lsst::afw::image::PhotoCalib, lsst::afw::image::VisitInfo, and lsst::afw::typehandling::StorableHelper< Base >.
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::typehandling::StorableHelper< Base >, lsst::afw::geom::polygon::Polygon, lsst::afw::geom::SkyWcs, lsst::afw::image::PhotoCalib, and lsst::afw::image::VisitInfo.
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::afw::image::FilterLabel, lsst::afw::cameraGeom::Camera, lsst::afw::cameraGeom::Detector, lsst::afw::cameraGeom::DetectorCollection, lsst::afw::cameraGeom::TransformMap, lsst::afw::detection::Footprint, lsst::afw::detection::GaussianPsf, lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >, lsst::afw::geom::polygon::Polygon, lsst::afw::geom::SkyWcs, lsst::afw::geom::SpanSet, lsst::afw::geom::Transform< FromEndpoint, ToEndpoint >, lsst::afw::geom::Transform< afw::geom::Point2Endpoint, afw::geom::GenericEndpoint >, lsst::afw::image::ApCorrMap, lsst::afw::image::CoaddInputs, lsst::afw::image::PhotoCalib, lsst::afw::image::VisitInfo, lsst::afw::math::ChebyshevBoundedField, lsst::afw::math::GaussianFunction2< ReturnT >, lsst::afw::math::DoubleGaussianFunction2< ReturnT >, lsst::afw::math::PolynomialFunction2< ReturnT >, lsst::afw::math::Chebyshev1Function2< ReturnT >, lsst::afw::math::FixedKernel, lsst::afw::math::AnalyticKernel, lsst::afw::math::DeltaFunctionKernel, lsst::afw::math::LinearCombinationKernel, lsst::afw::math::PixelAreaBoundedField, lsst::afw::math::ProductBoundedField, lsst::afw::math::TransformBoundedField, lsst::afw::math::LanczosWarpingKernel, lsst::afw::math::BilinearWarpingKernel, lsst::afw::math::NearestWarpingKernel, lsst::afw::math::WarpingControl, lsst::afw::typehandling::StorableHelper< Base >, lsst::meas::algorithms::CoaddBoundedField, lsst::meas::algorithms::CoaddPsf, lsst::meas::algorithms::DoubleGaussianPsf, lsst::meas::algorithms::KernelPsf, lsst::meas::algorithms::PcaPsf, lsst::meas::algorithms::SingleGaussianPsf, lsst::meas::algorithms::WarpedPsf, lsst::meas::extensions::psfex::PsfexPsf, and lsst::meas::modelfit::Mixture.
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::geom::polygon::Polygon, lsst::afw::image::FilterLabel, lsst::afw::image::VisitInfo, and lsst::afw::typehandling::StorableHelper< Base >.
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::afw::cameraGeom::Camera, lsst::afw::cameraGeom::Detector, lsst::afw::cameraGeom::DetectorCollection, lsst::afw::cameraGeom::TransformMap, lsst::afw::detection::Footprint, lsst::afw::detection::GaussianPsf, lsst::afw::geom::polygon::Polygon, lsst::afw::geom::SkyWcs, lsst::afw::geom::SpanSet, lsst::afw::geom::Transform< FromEndpoint, ToEndpoint >, lsst::afw::geom::Transform< afw::geom::Point2Endpoint, afw::geom::GenericEndpoint >, lsst::afw::image::ApCorrMap, lsst::afw::image::CoaddInputs, lsst::afw::image::FilterLabel, lsst::afw::image::PhotoCalib, lsst::afw::image::VisitInfo, lsst::afw::math::ChebyshevBoundedField, lsst::afw::math::GaussianFunction2< ReturnT >, lsst::afw::math::DoubleGaussianFunction2< ReturnT >, lsst::afw::math::PolynomialFunction2< ReturnT >, lsst::afw::math::Chebyshev1Function2< ReturnT >, lsst::afw::math::FixedKernel, lsst::afw::math::AnalyticKernel, lsst::afw::math::DeltaFunctionKernel, lsst::afw::math::LinearCombinationKernel, lsst::afw::math::PixelAreaBoundedField, lsst::afw::math::ProductBoundedField, lsst::afw::math::TransformBoundedField, lsst::afw::math::LanczosWarpingKernel, lsst::afw::math::BilinearWarpingKernel, lsst::afw::math::NearestWarpingKernel, lsst::afw::math::WarpingControl, lsst::afw::typehandling::StorableHelper< Base >, lsst::meas::algorithms::CoaddBoundedField, lsst::meas::algorithms::CoaddPsf, lsst::meas::algorithms::DoubleGaussianPsf, lsst::meas::algorithms::KernelPsf, lsst::meas::algorithms::SingleGaussianPsf, lsst::meas::algorithms::WarpedPsf, lsst::meas::extensions::psfex::PsfexPsf, and lsst::meas::modelfit::Mixture.
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::geom::polygon::Polygon, lsst::afw::geom::SkyWcs, lsst::afw::image::FilterLabel, lsst::afw::image::PhotoCalib, lsst::afw::image::VisitInfo, and lsst::afw::typehandling::StorableHelper< Base >.
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::math::GaussianFunction2< ReturnT >, lsst::afw::math::DoubleGaussianFunction2< ReturnT >, lsst::afw::math::PolynomialFunction2< ReturnT >, lsst::afw::math::Chebyshev1Function2< ReturnT >, lsst::meas::extensions::psfex::PsfexPsf, lsst::afw::cameraGeom::Camera, lsst::afw::cameraGeom::Detector, lsst::afw::cameraGeom::DetectorCollection, lsst::afw::cameraGeom::TransformMap, lsst::afw::detection::Footprint, lsst::afw::detection::GaussianPsf, lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >, lsst::afw::geom::polygon::Polygon, lsst::afw::geom::SkyWcs, lsst::afw::geom::SpanSet, lsst::afw::geom::Transform< FromEndpoint, ToEndpoint >, lsst::afw::geom::Transform< afw::geom::Point2Endpoint, afw::geom::GenericEndpoint >, lsst::afw::image::ApCorrMap, lsst::afw::image::CoaddInputs, lsst::afw::image::PhotoCalib, lsst::afw::image::VisitInfo, lsst::afw::math::ChebyshevBoundedField, lsst::afw::math::FixedKernel, lsst::afw::math::AnalyticKernel, lsst::afw::math::DeltaFunctionKernel, lsst::afw::math::LinearCombinationKernel, lsst::afw::math::PixelAreaBoundedField, lsst::afw::math::ProductBoundedField, lsst::afw::math::TransformBoundedField, lsst::afw::math::LanczosWarpingKernel, lsst::afw::math::BilinearWarpingKernel, lsst::afw::math::NearestWarpingKernel, lsst::afw::math::WarpingControl, lsst::meas::algorithms::CoaddBoundedField, lsst::meas::algorithms::CoaddPsf, lsst::meas::algorithms::DoubleGaussianPsf, lsst::meas::algorithms::KernelPsf, lsst::meas::algorithms::SingleGaussianPsf, lsst::meas::algorithms::WarpedPsf, lsst::meas::modelfit::Mixture, lsst::afw::image::FilterLabel, and lsst::afw::typehandling::StorableHelper< Base >.
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.