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 | List of all members
lsst::meas::algorithms::SincFlux Class Reference

A class that knows how to calculate fluxes using the SINC photometry algorithm /. More...

Inheritance diagram for lsst::meas::algorithms::SincFlux:
lsst::meas::algorithms::FluxAlgorithm lsst::meas::algorithms::Algorithm

Public Member Functions

 SincFlux (SincFluxControl const &ctrl, afw::table::Schema &schema)
 
- Public Member Functions inherited from lsst::meas::algorithms::FluxAlgorithm
FluxControl const & getControl () const
 Return a clone of the control object used to construct the algorithm. More...
 
KeyTuple const & getKeys () const
 Return the standard flux keys registered by this algorithm. More...
 
- 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 (SincFlux)
 

Additional Inherited Members

- Public Types inherited from lsst::meas::algorithms::FluxAlgorithm
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::meas::algorithms::FluxAlgorithm
 FluxAlgorithm (FluxControl const &ctrl, KeyTuple const &keys)
 Initialize with a manually-constructed key tuple. More...
 
 FluxAlgorithm (FluxControl 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 fluxes using the SINC photometry algorithm /.

Definition at line 758 of file SincFlux.cc.

Constructor & Destructor Documentation

lsst::meas::algorithms::SincFlux::SincFlux ( SincFluxControl const &  ctrl,
afw::table::Schema schema 
)
inline

Definition at line 761 of file SincFlux.cc.

761  :
762  FluxAlgorithm(ctrl, schema, "elliptical aperture photometry using sinc interpolation")
763  {
764  // calculate the needed coefficients
765  if (photometry::fuzzyCompare<float>().isEqual(ctrl.ellipticity, 0.0)) {
766  photometry::SincCoeffs<float>::cache(ctrl.radius1, ctrl.radius2);
767  }
768  }
tbl::Schema schema
Definition: CoaddPsf.cc:324
FluxAlgorithm(FluxControl const &ctrl, KeyTuple const &keys)
Initialize with a manually-constructed key tuple.
Definition: FluxControl.h:90
static void cache(float r1, float r2)
Definition: SincFlux.cc:609

Member Function Documentation

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

Calculate the desired aperture flux using the sinc algorithm

Definition at line 788 of file SincFlux.cc.

792  {
793  source.set(getKeys().flag, true); // say we've failed so that's the result if we throw
794  SincFluxControl const & ctrl = static_cast<SincFluxControl const &>(getControl());
795 
796  afw::geom::ellipses::Axes const axes(ctrl.radius2, ctrl.radius2*(1.0 - ctrl.ellipticity), ctrl.angle);
797  std::pair<double, double> fluxes =
798  photometry::calculateSincApertureFlux(exposure.getMaskedImage(),
799  afw::geom::ellipses::Ellipse(axes, center),
800  ctrl.radius1/ctrl.radius2);
801  double flux = fluxes.first;
802  double fluxErr = fluxes.second;
803  source.set(getKeys().meas, flux);
804  source.set(getKeys().err, fluxErr);
805  source.set(getKeys().flag, false);
806 }
KeyTuple const & getKeys() const
Return the standard flux keys registered by this algorithm.
Definition: FluxControl.h:58
std::pair< double, double > calculateSincApertureFlux(MaskedImageT const &mimage, afw::geom::ellipses::Ellipse const &ellipse, double const innerFactor)
Definition: SincFlux.cc:687
FluxControl const & getControl() const
Return a clone of the control object used to construct the algorithm.
Definition: FluxControl.h:100
lsst::meas::algorithms::SincFlux::LSST_MEAS_ALGORITHM_PRIVATE_INTERFACE ( SincFlux  )
private

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