LSSTApplications
16.0-10-g0ee56ad+5,16.0-11-ga33d1f2+5,16.0-12-g3ef5c14+3,16.0-12-g71e5ef5+18,16.0-12-gbdf3636+3,16.0-13-g118c103+3,16.0-13-g8f68b0a+3,16.0-15-gbf5c1cb+4,16.0-16-gfd17674+3,16.0-17-g7c01f5c+3,16.0-18-g0a50484+1,16.0-20-ga20f992+8,16.0-21-g0e05fd4+6,16.0-21-g15e2d33+4,16.0-22-g62d8060+4,16.0-22-g847a80f+4,16.0-25-gf00d9b8+1,16.0-28-g3990c221+4,16.0-3-gf928089+3,16.0-32-g88a4f23+5,16.0-34-gd7987ad+3,16.0-37-gc7333cb+2,16.0-4-g10fc685+2,16.0-4-g18f3627+26,16.0-4-g5f3a788+26,16.0-5-gaf5c3d7+4,16.0-5-gcc1f4bb+1,16.0-6-g3b92700+4,16.0-6-g4412fcd+3,16.0-6-g7235603+4,16.0-69-g2562ce1b+2,16.0-8-g14ebd58+4,16.0-8-g2df868b+1,16.0-8-g4cec79c+6,16.0-8-gadf6c7a+1,16.0-8-gfc7ad86,16.0-82-g59ec2a54a+1,16.0-9-g5400cdc+2,16.0-9-ge6233d7+5,master-g2880f2d8cf+3,v17.0.rc1
LSSTDataManagementBasePackage
|
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... | |
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 | |
typedef io::OutputArchiveHandle | 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... | |
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 58 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 682 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 677 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 18 of file Persistable.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::math::Chebyshev1Function2< ReturnT >, lsst::afw::math::LinearCombinationKernel, lsst::afw::math::DeltaFunctionKernel, lsst::afw::math::AnalyticKernel, lsst::afw::math::PolynomialFunction2< ReturnT >, lsst::afw::math::FixedKernel, lsst::afw::image::PhotoCalib, lsst::afw::geom::SkyWcs, lsst::meas::modelfit::Mixture, lsst::afw::detection::Footprint, lsst::afw::math::DoubleGaussianFunction2< ReturnT >, lsst::afw::geom::Transform< FromEndpoint, ToEndpoint >, lsst::afw::geom::Transform< afw::geom::Point2Endpoint, afw::geom::GenericEndpoint >, lsst::afw::geom::polygon::Polygon, lsst::afw::math::GaussianFunction2< ReturnT >, lsst::afw::math::ChebyshevBoundedField, lsst::afw::image::Calib, lsst::meas::algorithms::CoaddPsf, lsst::afw::image::VisitInfo, lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >, lsst::afw::cameraGeom::DetectorCollection, lsst::meas::algorithms::CoaddBoundedField, lsst::afw::detection::GaussianPsf, lsst::afw::image::CoaddInputs, lsst::afw::math::TransformBoundedField, lsst::meas::algorithms::KernelPsf, lsst::meas::algorithms::DoubleGaussianPsf, and lsst::meas::algorithms::SingleGaussianPsf.
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 687 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.
|
inlinevirtualnoexceptinherited |
Return true if this particular object can be persisted using afw::table::io.
Reimplemented in lsst::afw::math::Chebyshev1Function2< ReturnT >, lsst::afw::math::LinearCombinationKernel, lsst::afw::math::DeltaFunctionKernel, lsst::afw::geom::SpanSet, lsst::afw::math::AnalyticKernel, lsst::afw::math::PolynomialFunction2< ReturnT >, lsst::afw::math::FixedKernel, lsst::afw::image::PhotoCalib, lsst::meas::modelfit::Mixture, lsst::afw::math::DoubleGaussianFunction2< ReturnT >, lsst::afw::cameraGeom::Detector, lsst::afw::detection::Footprint, lsst::afw::geom::SkyWcs, lsst::afw::geom::Transform< FromEndpoint, ToEndpoint >, lsst::afw::geom::Transform< afw::geom::Point2Endpoint, afw::geom::GenericEndpoint >, lsst::afw::geom::polygon::Polygon, lsst::afw::math::GaussianFunction2< ReturnT >, lsst::afw::image::Calib, lsst::afw::math::ChebyshevBoundedField, lsst::meas::algorithms::CoaddPsf, lsst::afw::image::VisitInfo, lsst::afw::cameraGeom::TransformMap, lsst::afw::cameraGeom::Camera, lsst::afw::cameraGeom::DetectorCollection, lsst::meas::algorithms::CoaddBoundedField, lsst::afw::detection::GaussianPsf, lsst::afw::image::CoaddInputs, lsst::afw::image::ApCorrMap, lsst::afw::math::PixelScaleBoundedField, lsst::afw::math::TransformBoundedField, lsst::meas::extensions::psfex::PsfexPsf, lsst::meas::algorithms::KernelPsf, lsst::meas::algorithms::DoubleGaussianPsf, and lsst::meas::algorithms::SingleGaussianPsf.
Definition at line 102 of file Persistable.h.
|
static |
Create a new TranmissionCurve that has unit thoughput at all wavelengths everywhere.
Definition at line 615 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 630 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 619 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 651 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 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.
|
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.
|
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. 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 670 of file TransmissionCurve.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 665 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::Chebyshev1Function2< ReturnT >, lsst::afw::math::LinearCombinationKernel, lsst::afw::math::DeltaFunctionKernel, lsst::afw::math::AnalyticKernel, lsst::afw::math::PolynomialFunction2< ReturnT >, lsst::afw::math::FixedKernel, lsst::afw::image::PhotoCalib, lsst::afw::geom::SkyWcs, lsst::meas::modelfit::Mixture, lsst::afw::detection::Footprint, lsst::afw::math::DoubleGaussianFunction2< ReturnT >, lsst::afw::geom::Transform< FromEndpoint, ToEndpoint >, lsst::afw::geom::Transform< afw::geom::Point2Endpoint, afw::geom::GenericEndpoint >, lsst::afw::geom::polygon::Polygon, lsst::afw::math::GaussianFunction2< ReturnT >, lsst::afw::math::ChebyshevBoundedField, lsst::afw::image::Calib, lsst::meas::algorithms::CoaddPsf, lsst::afw::image::VisitInfo, lsst::afw::cameraGeom::Camera, lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT >, lsst::afw::cameraGeom::DetectorCollection, lsst::meas::algorithms::CoaddBoundedField, lsst::afw::detection::GaussianPsf, lsst::afw::math::TransformBoundedField, lsst::afw::image::CoaddInputs, lsst::meas::algorithms::KernelPsf, lsst::meas::extensions::psfex::PsfexPsf, lsst::meas::algorithms::DoubleGaussianPsf, and lsst::meas::algorithms::SingleGaussianPsf.
Definition at line 38 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.
|
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 an already-open FITS object.
[in] | fitsfile | Open FITS object to write to. |
Definition at line 18 of file Persistable.cc.