lsst.meas.base
ga44f29b7aa+21155385c5
Toggle main menu visibility
Loading...
Searching...
No Matches
include
lsst
meas
base
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
"
28
#include "
lsst/afw/image/Exposure.h
"
29
#include "
lsst/meas/base/Algorithm.h
"
30
#include "
lsst/meas/base/ApertureFlux.h
"
31
#include "
lsst/meas/base/FluxUtilities.h
"
32
#include "
lsst/meas/base/FlagHandler.h
"
33
#include "
lsst/meas/base/InputUtilities.h
"
34
#include "lsst/pex/config.h"
35
36
namespace
lsst
{
37
namespace
meas
{
38
namespace
base
{
39
40
class
ScaledApertureFluxControl
{
41
public
:
42
LSST_CONTROL_FIELD(
43
shiftKernel
,
std::string
,
44
"Warping kernel used to shift Sinc photometry coefficients to different center positions"
);
45
LSST_CONTROL_FIELD(
scale
,
double
,
"Scaling factor of PSF FWHM for aperture radius."
);
46
47
// The default scaling factor is chosen such that scaled aperture
48
// magnitudes are expected to be equal to Kron magnitudes, based on
49
// measurements performed by Stephen Gwyn on WIRCam. See:
50
// http://www.cadc-ccda.hia-iha.nrc-cnrc.gc.ca/en/wirwolf/docs/proc.html#photcal
51
// http://www.cfht.hawaii.edu/fr/news/UM2013/presentations/Session10-SGwyn.pdf
52
ScaledApertureFluxControl
() :
shiftKernel
(
"lanczos5"
),
scale
(3.14) {}
53
};
54
62
class
ScaledApertureFluxAlgorithm
:
public
SimpleAlgorithm
{
63
public
:
64
typedef
ScaledApertureFluxControl
Control
;
65
typedef
ApertureFluxResult
Result
;
66
67
ScaledApertureFluxAlgorithm
(
Control
const
& control,
std::string
const
& name,
afw::table::Schema
& schema);
68
77
virtual
void
measure
(
afw::table::SourceRecord
& measRecord,
78
afw::image::Exposure<float>
const
& exposure)
const override
;
79
80
virtual
void
fail
(
afw::table::SourceRecord
& measRecord,
MeasurementError
* error =
nullptr
)
const override
;
81
82
private
:
83
Control
_ctrl;
84
FluxResultKey
_instFluxResultKey;
85
FlagHandler
_flagHandler;
86
SafeCentroidExtractor
_centroidExtractor;
87
};
88
89
class
ScaledApertureFluxTransform
:
public
FluxTransform
{
90
public
:
91
typedef
ScaledApertureFluxControl
Control
;
92
ScaledApertureFluxTransform
(
Control
const
& ctrl,
std::string
const
& name,
93
afw::table::SchemaMapper
& mapper);
94
};
95
96
}
// namespace base
97
}
// namespace meas
98
}
// namespace lsst
99
100
#endif
// !LSST_MEAS_BASE_ScaledApertureFlux_h_INCLUDED
Algorithm.h
ApertureFlux.h
FlagHandler.h
FluxUtilities.h
InputUtilities.h
std::string
lsst::afw::image::Exposure
lsst::afw::table::Schema
lsst::afw::table::SchemaMapper
lsst::afw::table::SourceRecord
lsst::meas::base::FlagHandler
Utility class for handling flag fields that indicate the failure modes of an algorithm.
Definition
FlagHandler.h:149
lsst::meas::base::FluxResultKey
A FunctorKey for FluxResult.
Definition
FluxUtilities.h:61
lsst::meas::base::FluxTransform::FluxTransform
FluxTransform(std::string const &name, afw::table::SchemaMapper &mapper)
Definition
FluxUtilities.cc:84
lsst::meas::base::MeasurementError
Exception to be thrown when a measurement algorithm experiences a known failure mode.
Definition
exceptions.h:48
lsst::meas::base::SafeCentroidExtractor
Utility class for measurement algorithms that extracts a position from the Centroid slot and handles ...
Definition
InputUtilities.h:39
lsst::meas::base::ScaledApertureFluxAlgorithm::Result
ApertureFluxResult Result
Definition
ScaledApertureFlux.h:65
lsst::meas::base::ScaledApertureFluxAlgorithm::ScaledApertureFluxAlgorithm
ScaledApertureFluxAlgorithm(Control const &control, std::string const &name, afw::table::Schema &schema)
Definition
ScaledApertureFlux.cc:34
lsst::meas::base::ScaledApertureFluxAlgorithm::measure
virtual void measure(afw::table::SourceRecord &measRecord, afw::image::Exposure< float > const &exposure) const override
Measure the scaled aperture instFlux on the given image.
Definition
ScaledApertureFlux.cc:43
lsst::meas::base::ScaledApertureFluxAlgorithm::fail
virtual void fail(afw::table::SourceRecord &measRecord, MeasurementError *error=nullptr) const override
Handle an exception thrown by the current algorithm by setting flags in the given record.
Definition
ScaledApertureFlux.cc:68
lsst::meas::base::ScaledApertureFluxAlgorithm::Control
ScaledApertureFluxControl Control
Definition
ScaledApertureFlux.h:64
lsst::meas::base::ScaledApertureFluxControl
Definition
ScaledApertureFlux.h:40
lsst::meas::base::ScaledApertureFluxControl::ScaledApertureFluxControl
ScaledApertureFluxControl()
Definition
ScaledApertureFlux.h:52
lsst::meas::base::ScaledApertureFluxControl::shiftKernel
std::string shiftKernel
"Warping kernel used to shift Sinc photometry coefficients to different center positions" ;
Definition
ScaledApertureFlux.h:44
lsst::meas::base::ScaledApertureFluxControl::scale
double scale
"Scaling factor of PSF FWHM for aperture radius." ;
Definition
ScaledApertureFlux.h:45
lsst::meas::base::ScaledApertureFluxTransform::ScaledApertureFluxTransform
ScaledApertureFluxTransform(Control const &ctrl, std::string const &name, afw::table::SchemaMapper &mapper)
Definition
ScaledApertureFlux.cc:72
lsst::meas::base::ScaledApertureFluxTransform::Control
ScaledApertureFluxControl Control
Definition
ScaledApertureFlux.h:91
lsst::meas::base::SimpleAlgorithm
An abstract base classes for which the same implementation can be used for both SingleFrameAlgorithm ...
Definition
Algorithm.h:170
Exposure.h
lsst::meas::base.plugins.ScaledApertureFluxAlgorithm
ScaledApertureFluxAlgorithm
Definition
plugins.py:96
lsst::meas::base.plugins.ScaledApertureFluxTransform
ScaledApertureFluxTransform
Definition
plugins.py:97
lsst::meas::base
Definition
Algorithm.h:37
lsst::meas
Definition
Algorithm.h:36
lsst
lsst::meas::base::ApertureFluxResult
A Result struct for running an aperture flux algorithm with a single radius.
Definition
ApertureFlux.h:217
table.h
Generated on
for lsst.meas.base by
1.17.0