lsst.meas.base
ga44f29b7aa+21155385c5
Toggle main menu visibility
Loading...
Searching...
No Matches
include
lsst
meas
base
PsfFlux.h
Go to the documentation of this file.
1
// -*- lsst-c++ -*-
2
/*
3
* LSST Data Management System
4
* Copyright 2008-2015 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_PsfFlux_h_INCLUDED
25
#define LSST_MEAS_BASE_PsfFlux_h_INCLUDED
26
27
#include "lsst/pex/config.h"
28
#include "
lsst/meas/base/Algorithm.h
"
29
#include "
lsst/meas/base/FluxUtilities.h
"
30
#include "
lsst/meas/base/FlagHandler.h
"
31
#include "
lsst/meas/base/InputUtilities.h
"
32
#include "
lsst/meas/base/Transform.h
"
33
34
namespace
lsst
{
35
namespace
meas
{
36
namespace
base
{
37
48
class
PsfFluxControl
{
49
public
:
50
LSST_CONTROL_FIELD(
badMaskPlanes
,
std::vector<std::string>
,
51
"Mask planes that indicate pixels that should be excluded from the fit"
);
52
58
PsfFluxControl
() {}
59
};
60
69
class
PsfFluxAlgorithm
:
public
SimpleAlgorithm
{
70
public
:
71
// Structures and routines to manage flaghandler
72
static
FlagDefinitionList
const
&
getFlagDefinitions
();
73
static
FlagDefinition
const
FAILURE
;
74
static
FlagDefinition
const
NO_GOOD_PIXELS
;
75
static
FlagDefinition
const
EDGE
;
76
79
typedef
PsfFluxControl
Control
;
80
81
PsfFluxAlgorithm
(
Control
const
& ctrl,
std::string
const
& name,
afw::table::Schema
& schema,
82
std::string
const
& logName =
""
);
83
84
virtual
void
measure
(
afw::table::SourceRecord
& measRecord,
85
afw::image::Exposure<float>
const
& exposure)
const
;
86
87
virtual
void
fail
(
afw::table::SourceRecord
& measRecord,
MeasurementError
* error =
nullptr
)
const
;
88
89
private
:
90
Control
_ctrl;
91
FluxResultKey
_instFluxResultKey;
92
afw::table::Key<float>
_areaKey;
// effective area of PSF
93
afw::table::Key<float>
_chi2Key;
// chi2 of the fitted PSF
94
afw::table::Key<int>
_npixelsKey;
// number of pixels that were included in the PSF fit
95
FlagHandler
_flagHandler;
96
SafeCentroidExtractor
_centroidExtractor;
97
};
98
99
class
PsfFluxTransform
:
public
FluxTransform
{
100
public
:
101
typedef
PsfFluxControl
Control
;
102
PsfFluxTransform
(
Control
const
& ctrl,
std::string
const
& name,
afw::table::SchemaMapper
& mapper);
103
};
104
105
}
// namespace base
106
}
// namespace meas
107
}
// namespace lsst
108
109
#endif
// !LSST_MEAS_BASE_PsfFlux_h_INCLUDED
Algorithm.h
FlagHandler.h
FluxUtilities.h
InputUtilities.h
Transform.h
This defines the base of measurement transformations.
std::string
lsst::afw::image::Exposure
lsst::afw::table::Key
lsst::afw::table::Schema
lsst::afw::table::SchemaMapper
lsst::afw::table::SourceRecord
lsst::meas::base::FlagDefinitionList
vector-type utility class to build a collection of FlagDefinitions
Definition
FlagHandler.h:60
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::PsfFluxAlgorithm::measure
virtual void measure(afw::table::SourceRecord &measRecord, afw::image::Exposure< float > const &exposure) const
Called to measure a single child source in an image.
Definition
PsfFlux.cc:67
lsst::meas::base::PsfFluxAlgorithm::Control
PsfFluxControl Control
A typedef to the Control object for this algorithm, defined above.
Definition
PsfFlux.h:79
lsst::meas::base::PsfFluxAlgorithm::FAILURE
static FlagDefinition const FAILURE
Definition
PsfFlux.h:73
lsst::meas::base::PsfFluxAlgorithm::fail
virtual void fail(afw::table::SourceRecord &measRecord, MeasurementError *error=nullptr) const
Handle an exception thrown by the current algorithm by setting flags in the given record.
Definition
PsfFlux.cc:129
lsst::meas::base::PsfFluxAlgorithm::NO_GOOD_PIXELS
static FlagDefinition const NO_GOOD_PIXELS
Definition
PsfFlux.h:74
lsst::meas::base::PsfFluxAlgorithm::EDGE
static FlagDefinition const EDGE
Definition
PsfFlux.h:75
lsst::meas::base::PsfFluxAlgorithm::getFlagDefinitions
static FlagDefinitionList const & getFlagDefinitions()
Definition
PsfFlux.cc:49
lsst::meas::base::PsfFluxAlgorithm::PsfFluxAlgorithm
PsfFluxAlgorithm(Control const &ctrl, std::string const &name, afw::table::Schema &schema, std::string const &logName="")
Definition
PsfFlux.cc:53
lsst::meas::base::PsfFluxControl
A C++ control class to handle PsfFluxAlgorithm's configuration.
Definition
PsfFlux.h:48
lsst::meas::base::PsfFluxControl::badMaskPlanes
std::vector< std::string > badMaskPlanes
"Mask planes that indicate pixels that should be excluded from the fit" ;
Definition
PsfFlux.h:51
lsst::meas::base::PsfFluxControl::PsfFluxControl
PsfFluxControl()
Default constructor.
Definition
PsfFlux.h:58
lsst::meas::base::PsfFluxTransform::Control
PsfFluxControl Control
Definition
PsfFlux.h:101
lsst::meas::base::PsfFluxTransform::PsfFluxTransform
PsfFluxTransform(Control const &ctrl, std::string const &name, afw::table::SchemaMapper &mapper)
Definition
PsfFlux.cc:133
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::SimpleAlgorithm
An abstract base classes for which the same implementation can be used for both SingleFrameAlgorithm ...
Definition
Algorithm.h:170
lsst::meas::base.plugins.PsfFluxAlgorithm
PsfFluxAlgorithm
Definition
plugins.py:82
lsst::meas::base.plugins.PsfFluxTransform
PsfFluxTransform
Definition
plugins.py:83
lsst::meas::base
Definition
Algorithm.h:37
lsst::meas
Definition
Algorithm.h:36
lsst
lsst::meas::base::FlagDefinition
Simple class used to define and document flags The name and doc constitute the identity of the FlagDe...
Definition
FlagHandler.h:40
std::vector
Generated on
for lsst.meas.base by
1.17.0