File TransformMap.h¶
-
namespace
lsst
Class for a simple mapping implementing a generic AstrometryTransform.
Remove all non-astronomical counts from the Chunk Exposure’s pixels.
Forward declarations for lsst::utils::Cache
For details on the Cache class, see the Cache.h file.
It uses a template rather than a pointer so that the derived classes can use the specifics of the transform. The class simplePolyMapping overloads a few routines.
A base class for image defects
Numeric constants used by the Integrate.h integrator routines.
Compute Image Statistics
- Note
Gauss-Kronrod-Patterson quadrature coefficients for use in quadpack routine qng. These coefficients were calculated with 101 decimal digit arithmetic by L. W. Fullerton, Bell Labs, Nov 1981.
- Note
The Statistics class itself can only handle lsst::afw::image::MaskedImage() types. The philosophy has been to handle other types by making them look like lsst::afw::image::MaskedImage() and reusing that code. Users should have no need to instantiate a Statistics object directly, but should use the overloaded makeStatistics() factory functions.
-
namespace
afw
-
namespace
cameraGeom
Functions
-
std::ostream &
operator<<
(std::ostream &os, TransformMap::Connection const &connection)¶
-
class
TransformMap
: public lsst::afw::table::io::PersistableFacade<TransformMap>, public lsst::afw::table::io::Persistable - #include <TransformMap.h>
A registry of 2-dimensional coordinate transforms for a specific camera.
Represents the interrelationships between camera coordinate systems for a particular camera. It can be seen as a mapping between a pair of CameraSys and a Transform between them (though it does not conform to either the C++ map or Python dictionary APIs).
TransformMap supports:
Transforming between any two supported CameraSys using the transform methods.
Retrieving a transform between any two supported CameraSys using getTransform.
Iteration over supported CameraSys using begin and end in C++ and standard Python iteration in Python.
TransformMap is immutable and must always be held by shared_ptr; this is enforced by making all non-deleted constructors private, and instead providing static
make
member functions for construction (in Python, these are exposed as regular constructors).Unless otherwise specified, all methods guarantee only basic exception safety.
Unnamed Group
-
TransformMap
(TransformMap const &other) TransformMap is immutable, so both moving and copying are prohibited. It is also always held by shared_ptr, so there is no good reason to copy it.
-
TransformMap
(TransformMap &&other)
-
TransformMap &
operator=
(TransformMap const&)
-
TransformMap &
operator=
(TransformMap&&)
Public Types
-
using
Transforms
= std::unordered_map<CameraSys, std::shared_ptr<geom::TransformPoint2ToPoint2>>
-
using
CameraSysIterator
= boost::transform_iterator<GetKey, CameraSysFrameIdMap::const_iterator>
Public Functions
-
~TransformMap
()
-
lsst::geom::Point2D
transform
(lsst::geom::Point2D const &point, CameraSys const &fromSys, CameraSys const &toSys) const Convert a point from one camera coordinate system to another.
- Return
the transformed value. Equivalent to
getTransform(fromSys, toSys).applyForward(point)
.- Parameters
point
: Point from which to transformfromSystoSys
: Camera coordinate systems between which to transform
- Exceptions
lsst::pex::exceptions::InvalidParameterError
: Thrown if eitherfromSys
ortoSys
is not supported.
-
std::vector<lsst::geom::Point2D>
transform
(std::vector<lsst::geom::Point2D> const &pointList, CameraSys const &fromSys, CameraSys const &toSys) const Convert a list of points from one coordinate system to another.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
-
CameraSysIterator
begin
() const
-
CameraSysIterator
end
() const
-
bool
contains
(CameraSys const &system) const Can this transform to and from the specified coordinate system?
Shall not throw exceptions.
- Return
true
ifsystem
is supported,false
otherwise- Parameters
system
: The coordinate system to search for
-
std::shared_ptr<geom::TransformPoint2ToPoint2>
getTransform
(CameraSys const &fromSys, CameraSys const &toSys) const Get a Transform from one camera coordinate system to another.
- Return
a Transform that converts from
fromSys
totoSys
in the forward direction. The Transform will be invertible.- Parameters
fromSystoSys
: Camera coordinate systems between which to transform
- Exceptions
lsst::pex::exceptions::InvalidParameterError
: Thrown if eitherfromSys
ortoSys
is not supported.
-
size_t
size
() const Get the number of supported coordinate systems.
Shall not throw exceptions.
-
std::vector<Connection>
getConnections
() const Return the sequence of connections used to construct this Transform.
The order of the connections may differ from the original order, but is guaranteed to yield the same
TransformMap
when passed tomake
with the same reference system.
-
bool
isPersistable
() const TransformMaps should always be Persistable.
Public Static Functions
-
static std::shared_ptr<TransformMap const>
make
(CameraSys const &reference, Transforms const &transforms) Construct a TransformMap with all transforms relative to a single reference CameraSys.
This method is wrapped as a regular constructor in Python.
- Parameters
reference
: Coordinate system from which each Transform intransforms
converts.transforms
: A map whose keys are camera coordinate systems, and whose values point to Transforms that convert fromreference
to the corresponding key. All Transforms must be invertible.
- Exceptions
lsst::pex::exceptions::InvalidParameterError
: Thrown iftransforms
contains thereference
camera system as a key, or if any Transform is not invertible.
-
static std::shared_ptr<TransformMap const>
make
(CameraSys const &reference, std::vector<Connection> const &connections) Construct a TransformMap from a sequence of Connections.
This method is wrapped as a regular constructor in Python.
- Parameters
reference
: Initial coordinate system that must be connected to all other coordinate systems in the map.connections
: Sequence of Connection structs, each of which relates two CameraSys via the Transform that connects them.
- Exceptions
Private Functions
-
TransformMap
(std::vector<Connection> &&connections)¶
-
std::shared_ptr<ast::Mapping const>
_getMapping
(CameraSys const &fromSys, CameraSys const &toSys) const¶
-
std::string
getPersistenceName
() const¶ Return the unique name used to persist this object and look up its factory.
Must be less than ArchiveIndexSchema::MAX_NAME_LENGTH characters.
-
std::string
getPythonModule
() const¶ 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.
-
void
write
(OutputArchiveHandle &handle) const¶ 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.
-
struct
Connection
- #include <TransformMap.h>
Representation of a single edge in the graph defined by a TransformMap.
Public Functions
-
void
reverse
() Reverse the connection, by swapping fromSys and toSys and inverting the transform.
Public Members
-
std::shared_ptr<geom::TransformPoint2ToPoint2 const>
transform
-
CameraSys
fromSys
-
CameraSys
toSys
-
void
-
struct
GetKey
¶
-
std::ostream &
-
namespace