lsst.meas.base  14.0-21-gb9e430a+6
ScaledApertureFlux.h
Go to the documentation of this file.
1 // -*- lsst-c++ -*-
2 /*
3  * LSST Data Management System
4  * Copyright 2008-2016 AURA/LSST.
5  *
6  * This product includes software developed by the
7  * LSST Project (http://www.lsst.org/).
8  *
9  * This program is free software: you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation, either version 3 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the LSST License Statement and
20  * the GNU General Public License along with this program. If not,
21  * see <http://www.lsstcorp.org/LegalNotices/>.
22  */
23 
24 #ifndef LSST_MEAS_BASE_ScaledApertureFlux_h_INCLUDED
25 #define LSST_MEAS_BASE_ScaledApertureFlux_h_INCLUDED
26 
27 #include "lsst/afw/table.h"
34 #include "lsst/pex/config.h"
35 
36 namespace lsst { namespace meas { namespace base {
37 
39 public:
42  "Warping kernel used to shift Sinc photometry coefficients to different center positions"
43  );
44  LSST_CONTROL_FIELD(scale, double, "Scaling factor of PSF FWHM for aperture radius.");
45 
46  // The default scaling factor is chosen such that scaled aperture
47  // magnitudes are expected to be equal to Kron magnitudes, based on
48  // measurements performed by Stephen Gwyn on WIRCam. See:
49  // http://www.cadc-ccda.hia-iha.nrc-cnrc.gc.ca/en/wirwolf/docs/proc.html#photcal
50  // http://www.cfht.hawaii.edu/fr/news/UM2013/presentations/Session10-SGwyn.pdf
51  ScaledApertureFluxControl() : shiftKernel("lanczos5"), scale(3.14) {}
52 };
53 
54 
63 public:
64 
67 
68  ScaledApertureFluxAlgorithm(Control const & control, std::string const & name,
69  afw::table::Schema & schema);
70 
79  virtual void measure(
80  afw::table::SourceRecord & measRecord,
81  afw::image::Exposure<float> const & exposure
82  ) const override;
83 
84  virtual void fail(afw::table::SourceRecord & measRecord, MeasurementError * error=nullptr) const override;
85 
86 private:
87  Control _ctrl;
88  FluxResultKey _fluxResultKey;
89  FlagHandler _flagHandler;
90  SafeCentroidExtractor _centroidExtractor;
91 };
92 
94 public:
96  ScaledApertureFluxTransform(Control const & ctrl, std::string const & name,
97  afw::table::SchemaMapper & mapper);
98 };
99 
100 }}} // namespace lsst::meas::base
101 
102 #endif // !LSST_MEAS_BASE_ScaledApertureFlux_h_INCLUDED
double scale
"Scaling factor of PSF FWHM for aperture radius." ;
Utility class for measurement algorithms that extracts a position from the Centroid slot and handles ...
Exception to be thrown when a measurement algorithm experiences a known failure mode.
Definition: exceptions.h:48
#define LSST_CONTROL_FIELD(NAME, TYPE, DOC)
Base for flux measurement transformations.
STL class.
std::string shiftKernel
"Warping kernel used to shift Sinc photometry coefficients to different center positions" ; ...
Utility class for handling flag fields that indicate the failure modes of an algorithm.
Definition: FlagHandler.h:156
A FunctorKey for FluxResult.
Definition: FluxUtilities.h:58
Measure the flux in an aperture scaled to the PSF.
An abstract base classes for which the same implementation can be used for both SingleFrameAlgorithm ...
Definition: Algorithm.h:185
A Result struct for running an aperture flux algorithm with a single radius.
Definition: ApertureFlux.h:251