LSST Applications g02d81e74bb+86cf3d8bc9,g180d380827+7a4e862ed4,g2079a07aa2+86d27d4dc4,g2305ad1205+e1ca1c66fa,g29320951ab+012e1474a1,g295015adf3+341ea1ce94,g2bbee38e9b+0e5473021a,g337abbeb29+0e5473021a,g33d1c0ed96+0e5473021a,g3a166c0a6a+0e5473021a,g3ddfee87b4+c429d67c83,g48712c4677+f88676dd22,g487adcacf7+27e1e21933,g50ff169b8f+96c6868917,g52b1c1532d+585e252eca,g591dd9f2cf+b41db86c35,g5a732f18d5+53520f316c,g64a986408d+86cf3d8bc9,g858d7b2824+86cf3d8bc9,g8a8a8dda67+585e252eca,g99cad8db69+84912a7fdc,g9ddcbc5298+9a081db1e4,ga1e77700b3+15fc3df1f7,ga8c6da7877+a2b54eae19,gb0e22166c9+60f28cb32d,gba4ed39666+c2a2e4ac27,gbb8dafda3b+6681f309db,gc120e1dc64+f0fcc2f6d8,gc28159a63d+0e5473021a,gcf0d15dbbd+c429d67c83,gdaeeff99f8+f9a426f77a,ge6526c86ff+0433e6603d,ge79ae78c31+0e5473021a,gee10cc3b42+585e252eca,gff1a9f87cc+86cf3d8bc9,w.2024.17
LSST Data Management Base Package
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
lsst::meas::base::LocalBackgroundTransform Class Reference

#include <LocalBackground.h>

Inheritance diagram for lsst::meas::base::LocalBackgroundTransform:
lsst::meas::base::FluxTransform lsst::meas::base::BaseTransform

Public Types

typedef LocalBackgroundControl Control
 

Public Member Functions

 LocalBackgroundTransform (Control const &ctrl, std::string const &name, afw::table::SchemaMapper &mapper)
 
virtual void operator() (afw::table::SourceCatalog const &inputCatalog, afw::table::BaseCatalog &outputCatalog, afw::geom::SkyWcs const &wcs, afw::image::PhotoCalib const &photoCalib) const
 

Protected Member Functions

void checkCatalogSize (afw::table::BaseCatalog const &cat1, afw::table::BaseCatalog const &cat2) const
 Ensure that catalogs have the same size.
 

Protected Attributes

std::string _name
 

Detailed Description

Definition at line 90 of file LocalBackground.h.

Member Typedef Documentation

◆ Control

Definition at line 92 of file LocalBackground.h.

Constructor & Destructor Documentation

◆ LocalBackgroundTransform()

lsst::meas::base::LocalBackgroundTransform::LocalBackgroundTransform ( Control const & ctrl,
std::string const & name,
afw::table::SchemaMapper & mapper )

Definition at line 115 of file LocalBackground.cc.

119 FlagDefinition const& flag = LocalBackgroundAlgorithm::getFlagDefinitions()[i];
120 if (flag == LocalBackgroundAlgorithm::FAILURE) continue;
121 if (mapper.getInputSchema().getNames().count(mapper.getInputSchema().join(name, flag.name)) == 0)
122 continue;
123 afw::table::Key<afw::table::Flag> key =
124 mapper.getInputSchema().find<afw::table::Flag>(name + "_" + flag.name).key;
125 mapper.addMapping(key);
126 }
127}
table::Key< std::string > name
Definition Amplifier.cc:116
SchemaMapper * mapper
std::size_t size() const
return the current size (number of defined elements) of the collection
FluxTransform(std::string const &name, afw::table::SchemaMapper &mapper)
static FlagDefinitionList const & getFlagDefinitions()

Member Function Documentation

◆ checkCatalogSize()

void lsst::meas::base::BaseTransform::checkCatalogSize ( afw::table::BaseCatalog const & cat1,
afw::table::BaseCatalog const & cat2 ) const
inlineprotectedinherited

Ensure that catalogs have the same size.

Parameters
[in]cat1Catalog for comparison
[in]cat2Catalog for comparison
Exceptions
LengthErrorCatalog sizes do not match

Definition at line 102 of file Transform.h.

102 {
103 if (cat1.size() != cat2.size()) {
104 throw LSST_EXCEPT(pex::exceptions::LengthError, "Catalog size mismatch");
105 }
106 }
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
Definition Exception.h:48

◆ operator()()

void lsst::meas::base::FluxTransform::operator() ( afw::table::SourceCatalog const & inputCatalog,
afw::table::BaseCatalog & outputCatalog,
afw::geom::SkyWcs const & wcs,
afw::image::PhotoCalib const & photoCalib ) const
virtualinherited

Implements lsst::meas::base::BaseTransform.

Definition at line 88 of file FluxUtilities.cc.

90 {
91 checkCatalogSize(inputCatalog, outputCatalog);
92 FluxResultKey instFluxKey(inputCatalog.getSchema()[_name]);
93 afw::table::SourceCatalog::const_iterator inSrc = inputCatalog.begin();
94 afw::table::BaseCatalog::iterator outSrc = outputCatalog.begin();
95 {
96 for (; inSrc != inputCatalog.end() && outSrc != outputCatalog.end(); ++inSrc, ++outSrc) {
97 FluxResult instFluxResult = instFluxKey.get(*inSrc);
98 _magKey.set(*outSrc,
99 photoCalib.instFluxToMagnitude(instFluxResult.instFlux, instFluxResult.instFluxErr));
100 }
101 }
102}
CatalogIterator< typename Internal::iterator > iterator
Definition Catalog.h:110
typename Base::const_iterator const_iterator
void checkCatalogSize(afw::table::BaseCatalog const &cat1, afw::table::BaseCatalog const &cat2) const
Ensure that catalogs have the same size.
Definition Transform.h:102
virtual void set(afw::table::BaseRecord &record, MagResult const &magResult) const
Set a MagResult in the given record.

Member Data Documentation

◆ _name

std::string lsst::meas::base::BaseTransform::_name
protectedinherited

Definition at line 107 of file Transform.h.


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