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
|
#include <aggregates.h>
Public Types | |
using | ErrKeyArray = std::vector< Key< T > > |
using | CovarianceKeyArray = std::vector< Key< T > > |
using | NameArray = std::vector< std::string > |
using | Value = Eigen::Matrix< T, N, N > |
The data type for get and set. More... | |
Public Member Functions | |
CovarianceMatrixKey () | |
Construct an invalid instance; must assign before subsequent use. More... | |
CovarianceMatrixKey (ErrKeyArray const &err, CovarianceKeyArray const &cov=CovarianceKeyArray()) | |
Construct a from arrays of per-element Keys. More... | |
CovarianceMatrixKey (SubSchema const &s, NameArray const &names) | |
Construct from a subschema and an array of names for each parameter of the matrix. More... | |
CovarianceMatrixKey (CovarianceMatrixKey const &) | |
CovarianceMatrixKey (CovarianceMatrixKey &&) | |
CovarianceMatrixKey & | operator= (CovarianceMatrixKey const &) |
CovarianceMatrixKey & | operator= (CovarianceMatrixKey &&) |
~CovarianceMatrixKey () noexcept override | |
Eigen::Matrix< T, N, N > | get (BaseRecord const &record) const override |
Get a covariance matrix from the given record. More... | |
void | set (BaseRecord &record, Eigen::Matrix< T, N, N > const &value) const override |
Set a covariance matrix in the given record (uses only the lower triangle of the given matrix) More... | |
T | getElement (BaseRecord const &record, int i, int j) const |
Return the element in row i and column j. More... | |
void | setElement (BaseRecord &record, int i, int j, T value) const |
Set the element in row i and column j. More... | |
bool | isValid () const noexcept |
Return True if all the constituent error Keys are valid. More... | |
bool | operator== (CovarianceMatrixKey const &other) const noexcept |
Compare the FunctorKey for equality with another, using its constituent Keys. More... | |
bool | operator!= (CovarianceMatrixKey const &other) const noexcept |
std::size_t | hash_value () const noexcept |
Return a hash of this object. More... | |
virtual void | set (BaseRecord &record, T const &value) const =0 |
Static Public Member Functions | |
static CovarianceMatrixKey | addFields (Schema &schema, std::string const &prefix, NameArray const &names, std::string const &unit, bool diagonalOnly=false) |
Add covariance matrix fields to a Schema, and return a CovarianceMatrixKey to manage them. More... | |
static CovarianceMatrixKey | addFields (Schema &schema, std::string const &prefix, NameArray const &names, NameArray const &units, bool diagonalOnly=false) |
Add covariance matrix fields to a Schema, and return a CovarianceMatrixKey to manage them. More... | |
Definition at line 432 of file aggregates.h.
using lsst::afw::table::CovarianceMatrixKey< T, N >::CovarianceKeyArray = std::vector<Key<T> > |
Definition at line 435 of file aggregates.h.
using lsst::afw::table::CovarianceMatrixKey< T, N >::ErrKeyArray = std::vector<Key<T> > |
Definition at line 434 of file aggregates.h.
using lsst::afw::table::CovarianceMatrixKey< T, N >::NameArray = std::vector<std::string> |
Definition at line 436 of file aggregates.h.
|
inherited |
The data type for get and set.
Definition at line 77 of file FunctorKey.h.
|
default |
Construct an invalid instance; must assign before subsequent use.
|
explicit |
Construct a from arrays of per-element Keys.
The err array Keys should point to the square root of the diagonal of the covariance matrix. The cov array Keys should point to the off-diagonal elements of the lower-triangle, packed first in rows, then in columns (or equivalently, in the upper-triangle, packed first in columns, then in rows). For a 4x4 matrix, the order is is:
err[0]^2 cov[0] cov[1] cov[3] cov[0] err[1]^2 cov[2] cov[4] cov[1] cov[2] err[2]^2 cov[5] cov[3] cov[4] cov[5] err[3]^2
The cov array may also be empty, to indicate that no off-diagonal elements are stored, and should be set to zero. If not empty, the size of the cov matrix must be exactly n*(n-1)/2, where n is the size of the err matrix.
Definition at line 188 of file aggregates.cc.
lsst::afw::table::CovarianceMatrixKey< T, N >::CovarianceMatrixKey | ( | SubSchema const & | s, |
NameArray const & | names | ||
) |
Construct from a subschema and an array of names for each parameter of the matrix.
The field names should match the following convention:
Definition at line 206 of file aggregates.cc.
|
default |
|
default |
|
overridedefaultnoexcept |
|
static |
Add covariance matrix fields to a Schema, and return a CovarianceMatrixKey to manage them.
[out] | schema | Schema to add fields to. |
[in] | prefix | String used to form the first part of all field names. Suffixes of the form '_xErr' and '_x_y_Cov' will be added to form the full field names (using names={'x', 'y'} as an example). |
[in] | units | Vector of units for for error (standard deviation) values; covariance matrix elements will have "{units[i]} {units[j]}" or "{units[i]}^2", depending on whether units[i] == units[j]. |
[in] | names | Vector of strings containing the names of the quantities the covariance matrix represents the uncertainty of. |
[in] | diagonalOnly | If true, only create fields for the error values. |
Definition at line 149 of file aggregates.cc.
|
static |
Add covariance matrix fields to a Schema, and return a CovarianceMatrixKey to manage them.
[out] | schema | Schema to add fields to. |
[in] | prefix | String used to form the first part of all field names. Suffixes of the form '_xErr' and '_x_y_Cov' will be added to form the full field names (using names={'x', 'y'} as an example). |
[in] | unit | Unit for for error (standard deviation) values; covariance matrix elements will be unit^2. |
[in] | names | Vector of strings containing the names of the quantities the covariance matrix represents the uncertainty of. |
[in] | diagonalOnly | If true, only create fields for the error values. |
Definition at line 141 of file aggregates.cc.
|
overridevirtual |
Get a covariance matrix from the given record.
Implements lsst::afw::table::OutputFunctorKey< T >.
Definition at line 259 of file aggregates.cc.
T lsst::afw::table::CovarianceMatrixKey< T, N >::getElement | ( | BaseRecord const & | record, |
int | i, | ||
int | j | ||
) | const |
Return the element in row i and column j.
Definition at line 336 of file aggregates.cc.
|
noexcept |
Return a hash of this object.
Definition at line 329 of file aggregates.cc.
|
noexcept |
Return True if all the constituent error Keys are valid.
Note that if the only one or more off-diagonal keys are invalid, we assume that means those terms are zero, not that the whole FunctorKey is invalid.
Definition at line 294 of file aggregates.cc.
|
inlinenoexcept |
Definition at line 537 of file aggregates.h.
|
default |
|
default |
|
noexcept |
Compare the FunctorKey for equality with another, using its constituent Keys.
Definition at line 304 of file aggregates.cc.
|
override |
Set a covariance matrix in the given record (uses only the lower triangle of the given matrix)
Definition at line 278 of file aggregates.cc.
|
pure virtualinherited |
void lsst::afw::table::CovarianceMatrixKey< T, N >::setElement | ( | BaseRecord & | record, |
int | i, | ||
int | j, | ||
T | value | ||
) | const |
Set the element in row i and column j.
Definition at line 349 of file aggregates.cc.