|
LSST Applications g00d0e8bbd7+edbf708997,g03191d30f7+9ce8016dbd,g1955dfad08+0bd186d245,g199a45376c+5137f08352,g1fd858c14a+a888a50aa2,g262e1987ae+45f9aba685,g29ae962dfc+1c7d47a24f,g2cef7863aa+73c82f25e4,g35bb328faa+edbf708997,g3fd5ace14f+eed17d2c67,g47891489e3+6dc8069a4c,g53246c7159+edbf708997,g64539dfbff+c4107e45b5,g67b6fd64d1+6dc8069a4c,g74acd417e5+f452e9c21a,g786e29fd12+af89c03590,g7ae74a0b1c+a25e60b391,g7aefaa3e3d+2025e9ce17,g7cc15d900a+2d158402f9,g87389fa792+a4172ec7da,g89139ef638+6dc8069a4c,g8d4809ba88+c4107e45b5,g8d7436a09f+e96c132b44,g8ea07a8fe4+db21c37724,g98df359435+aae6d409c1,ga2180abaac+edbf708997,gac66b60396+966efe6077,gb632fb1845+88945a90f8,gbaa8f7a6c5+38b34f4976,gbf99507273+edbf708997,gca7fc764a6+6dc8069a4c,gd7ef33dd92+6dc8069a4c,gda68eeecaf+7d1e613a8d,gdab6d2f7ff+f452e9c21a,gdbb4c4dda9+c4107e45b5,ge410e46f29+6dc8069a4c,ge41e95a9f2+c4107e45b5,geaed405ab2+e194be0d2b,w.2025.47
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 |
| The data type for get and set. | |
Public Member Functions | |
| CovarianceMatrixKey () | |
| Construct an invalid instance; must assign before subsequent use. | |
| CovarianceMatrixKey (ErrKeyArray const &err, CovarianceKeyArray const &cov=CovarianceKeyArray()) | |
| Construct a from arrays of per-element Keys. | |
| CovarianceMatrixKey (SubSchema const &s, NameArray const &names) | |
| Construct from a subschema and an array of names for each parameter of the matrix. | |
| 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. | |
| 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) | |
| T | getElement (BaseRecord const &record, int i, int j) const |
| Return the element in row i and column j. | |
| void | setElement (BaseRecord &record, int i, int j, T value) const |
| Set the element in row i and column j. | |
| bool | isValid () const noexcept |
| Return True if all the constituent error Keys are valid. | |
| bool | operator== (CovarianceMatrixKey const &other) const noexcept |
| Compare the FunctorKey for equality with another, using its constituent Keys. | |
| bool | operator!= (CovarianceMatrixKey const &other) const noexcept |
| std::size_t | hash_value () const noexcept |
| Return a hash of this object. | |
| 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. | |
| 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. | |
Definition at line 519 of file aggregates.h.
| using lsst::afw::table::CovarianceMatrixKey< T, N >::CovarianceKeyArray = std::vector<Key<T>> |
Definition at line 522 of file aggregates.h.
| using lsst::afw::table::CovarianceMatrixKey< T, N >::ErrKeyArray = std::vector<Key<T>> |
Definition at line 521 of file aggregates.h.
| using lsst::afw::table::CovarianceMatrixKey< T, N >::NameArray = std::vector<std::string> |
Definition at line 523 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 222 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 240 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 183 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 175 of file aggregates.cc.
|
overridevirtual |
Get a covariance matrix from the given record.
Implements lsst::afw::table::OutputFunctorKey< T >.
Definition at line 293 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 370 of file aggregates.cc.
|
noexcept |
Return a hash of this object.
Definition at line 363 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 328 of file aggregates.cc.
|
inlinenoexcept |
Definition at line 624 of file aggregates.h.
|
default |
|
default |
|
noexcept |
Compare the FunctorKey for equality with another, using its constituent Keys.
Definition at line 338 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 312 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 383 of file aggregates.cc.