LSSTApplications
21.0.0+75b29a8a7f,21.0.0+e70536a077,21.0.0-1-ga51b5d4+62c747d40b,21.0.0-11-ga6ea59e8e+47cba9fc36,21.0.0-2-g103fe59+914993bf7c,21.0.0-2-g1367e85+e2614ded12,21.0.0-2-g45278ab+e70536a077,21.0.0-2-g4bc9b9f+7b2b5f8678,21.0.0-2-g5242d73+e2614ded12,21.0.0-2-g54e2caa+6403186824,21.0.0-2-g7f82c8f+3ac4acbffc,21.0.0-2-g8dde007+04a6aea1af,21.0.0-2-g8f08a60+9402881886,21.0.0-2-ga326454+3ac4acbffc,21.0.0-2-ga63a54e+81dd751046,21.0.0-2-gc738bc1+5f65c6e7a9,21.0.0-2-gde069b7+26c92b3210,21.0.0-2-gecfae73+0993ddc9bd,21.0.0-2-gfc62afb+e2614ded12,21.0.0-21-gba890a8+5a4f502a26,21.0.0-23-g9966ff26+03098d1af8,21.0.0-3-g357aad2+8ad216c477,21.0.0-3-g4be5c26+e2614ded12,21.0.0-3-g6d51c4a+4d2fe0280d,21.0.0-3-g7d9da8d+75b29a8a7f,21.0.0-3-gaa929c8+522e0f12c2,21.0.0-3-ge02ed75+4d2fe0280d,21.0.0-4-g3300ddd+e70536a077,21.0.0-4-gc004bbf+eac6615e82,21.0.0-4-gccdca77+f94adcd104,21.0.0-4-gd1c1571+18b81799f9,21.0.0-5-g7b47fff+4d2fe0280d,21.0.0-5-gb155db7+d2632f662b,21.0.0-5-gdf36809+637e4641ee,21.0.0-6-g722ad07+28c848f42a,21.0.0-7-g959bb79+522e0f12c2,21.0.0-7-gfd72ab2+cf01990774,21.0.0-9-g87fb7b8d+e2ab11cdd6,w.2021.04
LSSTDataManagementBasePackage
|
Go to the documentation of this file.
79 "uncertainty covariance in x and y",
"pixel^2"));
124 mapper.addMapping(
mapper.getInputSchema().find<afw::table::Flag>(
name +
"_flag").key);
127 auto &s =
mapper.editOutputSchema();
136 sigma[0] = s.addField<
ErrElement>(s.join(
name,
"raErr"),
"1-sigma uncertainty on RA",
"rad");
137 sigma[1] = s.addField<
ErrElement>(s.join(
name,
"decErr"),
"1-sigma uncertainty on dec",
"rad");
138 cov[0] = s.addField<
ErrElement>(s.join(
name,
"ra_dec_Cov"),
"Uncertainty covariance in RA and dec",
153 for (; inSrc != inputCatalog.end() && outSrc != outputCatalog.
end(); ++inSrc, ++outSrc) {
175 double maxDistFromPeak)
176 : _doFootprintCheck(doFootprintCheck), _maxDistFromPeak(maxDistFromPeak) {
177 _resetKey =
schema.addField<afw::table::Flag>(
schema.join(
name,
"flag_resetToPeak"),
178 "set if CentroidChecker reset the centroid");
192 _badErrorKey =
schema.addField<afw::table::Flag>(
schema.join(
name,
"flag_badError"),
193 "Error on x and/or y position is NaN");
204 record.
set(_badErrorKey,
true);
205 record.
set(_failureKey,
true);
209 if (!_doFootprintCheck && _maxDistFromPeak < 0.0) {
218 if (footprint->getPeaks().empty()) {
226 double distsq = (
x - footX) * (
x - footX) + (
y - footY) * (
y - footY);
228 ((_maxDistFromPeak > 0) && (distsq > _maxDistFromPeak * _maxDistFromPeak))) {
229 record.
set(_xKey, footX);
230 record.
set(_yKey, footY);
231 record.
set(_failureKey,
true);
232 record.
set(_resetKey,
true);
void setCentroidErr(CentroidCov const &matrix)
Set the struct uncertainty fields from the given matrix, with rows and columns ordered (x,...
@ FULL_COVARIANCE
The full covariance matrix is provided.
virtual void set(afw::table::BaseRecord &record, CentroidResult const &value) const
Set a CentroidResult in the given record.
UncertaintyEnum
An enum used to specify how much uncertainty information measurement algorithms provide.
Record class that contains measurements made on a single exposure.
Field< T >::Value get(Key< T > const &key) const
Return the value of a field for the given key.
@ NO_UNCERTAINTY
Algorithm provides no uncertainy information at all.
table::Key< table::Array< std::uint8_t > > wcs
void setCentroid(Centroid const ¢roid)
Set the struct fields from the given Point object.
static PointKey addFields(Schema &schema, std::string const &name, std::string const &doc, std::string const &unit)
Add a pair of _x, _y fields to a Schema, and return a PointKey that points to them.
Reports attempts to access elements using an invalid key.
afw::table::Key< double > sigma
geom::Point< CentroidElement, 2 > Centroid
Defines the fields and offsets for a table.
A 2-dimensional celestial WCS that transform pixels to ICRS RA/Dec, using the LSST standard for pixel...
A FunctorKey for CentroidResult.
afw::table::CovarianceMatrixKey< ErrElement, 2 > getCentroidErr() const
Return a FunctorKey to just the uncertainty matrix.
CentroidElement x
x (column) coordinate of the measured position
A reusable struct for centroid measurements.
CentroidResult()
Constructor; initializes everything to NaN.
ErrElement x_y_Cov
x,y term in the uncertainty convariance matrix
static CentroidResultKey addFields(afw::table::Schema &schema, std::string const &name, std::string const &doc, UncertaintyEnum uncertainty)
Add the appropriate fields to a Schema, and return a CentroidResultKey that manages them.
virtual CentroidResult get(afw::table::BaseRecord const &record) const
Get a CentroidResult from the given record.
std::shared_ptr< Footprint > getFootprint() const
ErrElement xErr
standard deviation of x
bool isValid() const noexcept
Return True if all the constituent error Keys are valid.
UnitVector3d centroid(VertexIterator const begin, VertexIterator const end)
CentroidChecker(afw::table::Schema &schema, std::string const &name, bool inside=true, double maxDistFromPeak=-1.0)
Check source record produced by a centroid algorithm called "name".
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)
bool operator()(afw::table::SourceRecord &record) const
Set the centroid to the first footprint if the centroid is either more than _dist pixels from the foo...
Base class for all records.
A mapping between the keys of two Schemas, used to copy data between them.
bool isValid() const noexcept
Return true if the key was initialized to valid offset.
Eigen::Matrix< ErrElement, 2, 2, Eigen::DontAlign > CentroidCov
Iterator class for CatalogT.
The photometric calibration of an exposure.
A base class for image defects.
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
CentroidElement y
y (row) coordinate of the measured position
CentroidCov const getCentroidErr() const
Return the 2x2 symmetric covariance matrix, with rows and columns ordered (x, y)
A proxy type for name lookups in a Schema.
A coordinate class intended to represent absolute positions.
CentroidResultKey()
Default constructor; instance will not be usuable unless subsequently assigned to.
constexpr AngleUnit radians
constant with units of radians
void set(BaseRecord &record, lsst::geom::SpherePoint const &value) const override
Set an lsst::geom::SpherePoint in the given record.
void set(Key< T > const &key, U const &value)
Set value of a field for the given key.
iterator begin()
Iterator access.
Centroid const getCentroid() const
Return a Point object containing the measured x and y.
ErrElement yErr
standard deviation of y
Reports errors that are due to events beyond the control of the program.
static CoordKey addFields(afw::table::Schema &schema, std::string const &name, std::string const &doc)
Add a pair of _ra, _dec fields to a Schema, and return a CoordKey that points to them.