lsst.geom g19811a7679+fd0852f7a0
Loading...
Searching...
No Matches
lsst::geom::SphereTransform Class Reference

A rigid 3-d transform on the sphere. More...

#include <SphereTransform.h>

Public Types

using Matrix = Eigen::Matrix<double, 3, 3, Eigen::DontAlign>
 

Public Member Functions

 SphereTransform () noexcept
 Construct an empty (identity) SphereTransform.
 
 SphereTransform (Matrix const &matrix) noexcept
 Construct an SphereTransform from a matrix.
 
 SphereTransform (SphereTransform const &other) noexcept=default
 
 SphereTransform (SphereTransform &&other) noexcept=default
 
 ~SphereTransform () noexcept=default
 
Matrix const & getMatrix () const noexcept
 Return the matrix representation of the transform.
 
SphereTransform operator* (SphereTransform const &other) const noexcept
 Compose two transforms.
 
SpherePoint operator() (SpherePoint const &point) const noexcept
 Apply the transform to a SpherePoint.
 
sphgeom::UnitVector3d operator() (sphgeom::UnitVector3d const &vector) const noexcept
 Apply the transform to a unit vector.
 
double applyX (double x, double y, double z) const noexcept
 Transform a 3-d unit vector given and returned as separate double values.
 
double applyY (double x, double y, double z) const noexcept
 
double applyZ (double x, double y, double z) const noexcept
 
SphereTransform const inverted () const noexcept
 Return the inverse transform.
 

Static Public Member Functions

static SphereTransform fit_unit_vectors (ndarray::Array< double const, 2 > const &from, ndarray::Array< double const, 2 > const &to, ndarray::Array< double const, 1 > const &weights=ndarray::Array< double const, 1 >())
 Fit for the transform that best maps (in a least-squares sense) one set of unit vectors onto another.
 

Detailed Description

A rigid 3-d transform on the sphere.

Definition at line 38 of file SphereTransform.h.

Member Typedef Documentation

◆ Matrix

using lsst::geom::SphereTransform::Matrix = Eigen::Matrix<double, 3, 3, Eigen::DontAlign>

Definition at line 40 of file SphereTransform.h.

Constructor & Destructor Documentation

◆ SphereTransform() [1/4]

lsst::geom::SphereTransform::SphereTransform ( )
noexcept

Construct an empty (identity) SphereTransform.

Definition at line 36 of file SphereTransform.cc.

◆ SphereTransform() [2/4]

lsst::geom::SphereTransform::SphereTransform ( Matrix const & matrix)
explicitnoexcept

Construct an SphereTransform from a matrix.

The caller is responsible for ensuring that this is an orthogonal matrix with positive determinant.

Definition at line 38 of file SphereTransform.cc.

◆ SphereTransform() [3/4]

lsst::geom::SphereTransform::SphereTransform ( SphereTransform const & other)
defaultnoexcept

◆ SphereTransform() [4/4]

lsst::geom::SphereTransform::SphereTransform ( SphereTransform && other)
defaultnoexcept

◆ ~SphereTransform()

lsst::geom::SphereTransform::~SphereTransform ( )
defaultnoexcept

Member Function Documentation

◆ applyX()

double lsst::geom::SphereTransform::applyX ( double x,
double y,
double z ) const
noexcept

Transform a 3-d unit vector given and returned as separate double values.

This interface is intended primarily for use in Python (where it is vectorized to support NumPy array arguments).

Definition at line 94 of file SphereTransform.cc.

◆ applyY()

double lsst::geom::SphereTransform::applyY ( double x,
double y,
double z ) const
noexcept

Definition at line 97 of file SphereTransform.cc.

◆ applyZ()

double lsst::geom::SphereTransform::applyZ ( double x,
double y,
double z ) const
noexcept

Definition at line 100 of file SphereTransform.cc.

◆ fit_unit_vectors()

SphereTransform lsst::geom::SphereTransform::fit_unit_vectors ( ndarray::Array< double const, 2 > const & from,
ndarray::Array< double const, 2 > const & to,
ndarray::Array< double const, 1 > const & weights = ndarray::Array<double const, 1>() )
static

Fit for the transform that best maps (in a least-squares sense) one set of unit vectors onto another.

Parameters
[in]fromUnit vectors the returned transform would take as inputs, with shape (N, 3).
[in]toUnit vectors the returned transform would return as output, with shape (N, 3).
[in]weightsWeights for the vectors, with shape (N,).

Definition at line 40 of file SphereTransform.cc.

◆ getMatrix()

Matrix const & lsst::geom::SphereTransform::getMatrix ( ) const
inlinenoexcept

Return the matrix representation of the transform.

This is an orthogonal matrix with positive determinant that acts on 3-d unit vectors.

Definition at line 77 of file SphereTransform.h.

◆ inverted()

SphereTransform const lsst::geom::SphereTransform::inverted ( ) const
noexcept

Return the inverse transform.

Definition at line 104 of file SphereTransform.cc.

◆ operator()() [1/2]

SpherePoint lsst::geom::SphereTransform::operator() ( SpherePoint const & point) const
noexcept

Apply the transform to a SpherePoint.

Definition at line 85 of file SphereTransform.cc.

◆ operator()() [2/2]

sphgeom::UnitVector3d lsst::geom::SphereTransform::operator() ( sphgeom::UnitVector3d const & vector) const
noexcept

Apply the transform to a unit vector.

Definition at line 89 of file SphereTransform.cc.

◆ operator*()

SphereTransform lsst::geom::SphereTransform::operator* ( SphereTransform const & other) const
noexcept

Compose two transforms.

The returned transform first applies other and then this (i.e. transform multiply just like their matrices do).

Definition at line 81 of file SphereTransform.cc.


The documentation for this class was generated from the following files: