LSSTApplications  8.0.0.0+107,8.0.0.1+13,9.1+18,9.2,master-g084aeec0a4,master-g0aced2eed8+6,master-g15627eb03c,master-g28afc54ef9,master-g3391ba5ea0,master-g3d0fb8ae5f,master-g4432ae2e89+36,master-g5c3c32f3ec+17,master-g60f1e072bb+1,master-g6a3ac32d1b,master-g76a88a4307+1,master-g7bce1f4e06+57,master-g8ff4092549+31,master-g98e65bf68e,master-ga6b77976b1+53,master-gae20e2b580+3,master-gb584cd3397+53,master-gc5448b162b+1,master-gc54cf9771d,master-gc69578ece6+1,master-gcbf758c456+22,master-gcec1da163f+63,master-gcf15f11bcc,master-gd167108223,master-gf44c96c709
LSSTDataManagementBasePackage
Public Member Functions | Private Member Functions | Private Attributes | List of all members
lsst::ip::diffim::NaiveDipoleFlux Class Reference
Inheritance diagram for lsst::ip::diffim::NaiveDipoleFlux:
lsst::ip::diffim::DipoleFluxAlgorithm lsst::meas::algorithms::Algorithm

Public Member Functions

 NaiveDipoleFlux (NaiveDipoleFluxControl const &ctrl, afw::table::Schema &schema)
 
- Public Member Functions inherited from lsst::ip::diffim::DipoleFluxAlgorithm
DipoleFluxControl const & getControl () const
 Return a clone of the control object used to construct the algorithm. More...
 
KeyTuple const & getPositiveKeys () const
 Return the standard flux keys registered by this algorithm. More...
 
KeyTuple const & getNegativeKeys () const
 
- Public Member Functions inherited from lsst::meas::algorithms::Algorithm
 Algorithm (AlgorithmControl const &ctrl)
 
virtual ~Algorithm ()
 
AlgorithmControl const & getControl () const
 Return a clone of the control object used to construct the algorithm. More...
 
template<typename PixelT >
void apply (afw::table::SourceRecord &source, afw::image::Exposure< PixelT > const &exposure, afw::geom::Point2D const &center) const
 Run the algorithm, filling appropriate fields in the given source. More...
 

Private Member Functions

template<typename PixelT >
void _apply (afw::table::SourceRecord &source, afw::image::Exposure< PixelT > const &exposure, afw::geom::Point2D const &center) const
 
 LSST_MEAS_ALGORITHM_PRIVATE_INTERFACE (NaiveDipoleFlux)
 

Private Attributes

afw::table::Key< int > _numPositiveKey
 
afw::table::Key< int > _numNegativeKey
 

Additional Inherited Members

- Public Types inherited from lsst::ip::diffim::DipoleFluxAlgorithm
typedef afw::table::KeyTuple
< afw::table::Flux
KeyTuple
 Tuple type that holds the keys that define a standard flux algorithm. More...
 
- Protected Member Functions inherited from lsst::ip::diffim::DipoleFluxAlgorithm
 DipoleFluxAlgorithm (DipoleFluxControl const &ctrl, KeyTuple const &positiveKeys, KeyTuple const &negativeKeys)
 Initialize with a manually-constructed key tuple. More...
 
 DipoleFluxAlgorithm (DipoleFluxControl const &ctrl, afw::table::Schema &schema, char const *doc)
 Initialize using afw::table::addFlux field to fill out repetitive descriptions. More...
 
- Protected Member Functions inherited from lsst::meas::algorithms::Algorithm
template<typename PixelT >
void _apply (afw::table::SourceRecord &source, afw::image::Exposure< PixelT > const &exposure, afw::geom::Point2D const &center) const
 Simulated virtual function that all algorithms must implement. More...
 

Detailed Description

A class that knows how to calculate centroids as a simple unweighted first moment of the 3x3 region around the peaks

Definition at line 102 of file dipoleAlgorithm.cc.

Constructor & Destructor Documentation

lsst::ip::diffim::NaiveDipoleFlux::NaiveDipoleFlux ( NaiveDipoleFluxControl const &  ctrl,
afw::table::Schema schema 
)
inline

Definition at line 105 of file dipoleAlgorithm.cc.

105  :
106  DipoleFluxAlgorithm(ctrl, schema, "raw flux counts"),
107  _numPositiveKey(schema.addField<int>(ctrl.name+".npos", "number of positive pixels", "dn")),
108  _numNegativeKey(schema.addField<int>(ctrl.name+".nneg", "number of negative pixels", "dn"))
109  {}
afw::table::Key< int > _numNegativeKey
DipoleFluxAlgorithm(DipoleFluxControl const &ctrl, KeyTuple const &positiveKeys, KeyTuple const &negativeKeys)
Initialize with a manually-constructed key tuple.
tbl::Schema schema
Definition: CoaddPsf.cc:324
afw::table::Key< int > _numPositiveKey

Member Function Documentation

template<typename PixelT >
void lsst::ip::diffim::NaiveDipoleFlux::_apply ( afw::table::SourceRecord source,
afw::image::Exposure< PixelT > const &  exposure,
afw::geom::Point2D const &  center 
) const
private

Given an image and a pixel position, return a Centroid using a naive 3x3 weighted moment

Definition at line 282 of file dipoleAlgorithm.cc.

286  {
287  source.set(getPositiveKeys().flag, true); // say we've failed so that's the result if we throw
288  source.set(getNegativeKeys().flag, true); // say we've failed so that's the result if we throw
289 
290  typedef typename afw::image::Exposure<PixelT>::MaskedImageT MaskedImageT;
291 
292  NaiveDipoleFootprinter<MaskedImageT> functor(exposure.getMaskedImage());
293  functor.apply(*source.getFootprint());
294 
295  source.set(getPositiveKeys().meas, functor.getSumPositive());
296  source.set(getPositiveKeys().err, ::sqrt(functor.getVarPositive()));
297  source.set(_numPositiveKey, functor.getNumPositive());
298  source.set(getPositiveKeys().flag, false);
299 
300  source.set(getNegativeKeys().meas, functor.getSumNegative());
301  source.set(getNegativeKeys().err, ::sqrt(functor.getVarNegative()));
302  source.set(_numNegativeKey, functor.getNumNegative());
303  source.set(getNegativeKeys().flag, false);
304 }
afw::table::Key< int > _numNegativeKey
KeyTuple const & getNegativeKeys() const
MaskedImage< PixelT, lsst::afw::image::MaskPixel, lsst::afw::image::VariancePixel > MaskedImageT
Definition: Exposure.h:51
afw::table::Key< int > _numPositiveKey
KeyTuple const & getPositiveKeys() const
Return the standard flux keys registered by this algorithm.
lsst::ip::diffim::NaiveDipoleFlux::LSST_MEAS_ALGORITHM_PRIVATE_INTERFACE ( NaiveDipoleFlux  )
private

Member Data Documentation

afw::table::Key<int> lsst::ip::diffim::NaiveDipoleFlux::_numNegativeKey
private

Definition at line 122 of file dipoleAlgorithm.cc.

afw::table::Key<int> lsst::ip::diffim::NaiveDipoleFlux::_numPositiveKey
private

Definition at line 121 of file dipoleAlgorithm.cc.


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