lsst.meas.base
ga44f29b7aa+acb932b993
Toggle main menu visibility
Loading...
Searching...
No Matches
include
lsst
meas
base
SdssCentroid.h
Go to the documentation of this file.
1
// -*- lsst-c++ -*-
2
/*
3
* LSST Data Management System
4
* Copyright 2008-2013 LSST Corporation.
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_SdssCentroid_h_INCLUDED
25
#define LSST_MEAS_BASE_SdssCentroid_h_INCLUDED
26
33
34
#include "lsst/pex/config.h"
35
#include "
lsst/meas/base/Algorithm.h
"
36
#include "
lsst/meas/base/CentroidUtilities.h
"
37
#include "
lsst/meas/base/FlagHandler.h
"
38
#include "
lsst/meas/base/InputUtilities.h
"
39
40
namespace
lsst
{
41
namespace
meas
{
42
namespace
base
{
43
48
class
SdssCentroidControl
{
49
public
:
50
LSST_CONTROL_FIELD(
binmax
,
int
,
"maximum allowed binning"
);
51
LSST_CONTROL_FIELD(
peakMin
,
double
,
"if the peak's less than this insist on binning at least once"
);
52
LSST_CONTROL_FIELD(
wfac
,
double
,
"fiddle factor for adjusting the binning"
);
53
LSST_CONTROL_FIELD(
doFootprintCheck
,
bool
,
"Do check that the centroid is contained in footprint."
);
54
LSST_CONTROL_FIELD(
55
maxDistToPeak
,
double
,
56
"If >0; maximum distance in pixels between the footprint peak and centroid allowed before "
57
"resetToPeak flag is set."
);
63
64
SdssCentroidControl
()
65
:
binmax
(16),
peakMin
(-1.0),
wfac
(1.5),
doFootprintCheck
(true),
maxDistToPeak
(1.) {}
66
};
67
71
class
SdssCentroidAlgorithm
:
public
SimpleAlgorithm
{
72
public
:
73
// Structures and routines to manage flaghandler
74
static
FlagDefinitionList
const
&
getFlagDefinitions
();
75
static
FlagDefinition
const
FAILURE
;
76
static
FlagDefinition
const
EDGE
;
77
static
FlagDefinition
const
NO_SECOND_DERIVATIVE
;
78
static
FlagDefinition
const
ALMOST_NO_SECOND_DERIVATIVE
;
79
static
FlagDefinition
const
NOT_AT_MAXIMUM
;
80
static
FlagDefinition
const
NEAR_EDGE
;
81
84
typedef
SdssCentroidControl
Control
;
85
86
SdssCentroidAlgorithm
(
Control
const
& ctrl,
std::string
const
& name,
afw::table::Schema
& schema);
87
88
virtual
void
measure
(
afw::table::SourceRecord
& measRecord,
89
afw::image::Exposure<float>
const
& exposure)
const
;
90
91
virtual
void
fail
(
afw::table::SourceRecord
& measRecord,
MeasurementError
* error =
nullptr
)
const
;
92
93
private
:
94
Control
_ctrl;
95
CentroidResultKey
_centroidKey;
96
FlagHandler
_flagHandler;
97
SafeCentroidExtractor
_centroidExtractor;
98
CentroidChecker
_centroidChecker;
99
};
100
101
class
SdssCentroidTransform
:
public
CentroidTransform
{
102
public
:
103
typedef
SdssCentroidControl
Control
;
104
105
SdssCentroidTransform
(
Control
const
& ctrl,
std::string
const
& name,
afw::table::SchemaMapper
& mapper);
106
};
107
108
}
// namespace base
109
}
// namespace meas
110
}
// namespace lsst
111
112
#endif
// !LSST_MEAS_BASE_SdssCentroid_h_INCLUDED
Algorithm.h
CentroidUtilities.h
FlagHandler.h
InputUtilities.h
std::string
lsst::afw::image::Exposure
lsst::afw::table::Schema
lsst::afw::table::SchemaMapper
lsst::afw::table::SourceRecord
lsst::meas::base::CentroidChecker
Definition
CentroidUtilities.h:192
lsst::meas::base::CentroidResultKey
A FunctorKey for CentroidResult.
Definition
CentroidUtilities.h:90
lsst::meas::base::CentroidTransform::CentroidTransform
CentroidTransform(std::string const &name, afw::table::SchemaMapper &mapper)
Definition
CentroidUtilities.cc:126
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::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::SdssCentroidAlgorithm::NOT_AT_MAXIMUM
static FlagDefinition const NOT_AT_MAXIMUM
Definition
SdssCentroid.h:79
lsst::meas::base::SdssCentroidAlgorithm::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
SdssCentroid.cc:417
lsst::meas::base::SdssCentroidAlgorithm::SdssCentroidAlgorithm
SdssCentroidAlgorithm(Control const &ctrl, std::string const &name, afw::table::Schema &schema)
Definition
SdssCentroid.cc:286
lsst::meas::base::SdssCentroidAlgorithm::NO_SECOND_DERIVATIVE
static FlagDefinition const NO_SECOND_DERIVATIVE
Definition
SdssCentroid.h:77
lsst::meas::base::SdssCentroidAlgorithm::Control
SdssCentroidControl Control
A typedef to the Control object for this algorithm, defined above.
Definition
SdssCentroid.h:84
lsst::meas::base::SdssCentroidAlgorithm::FAILURE
static FlagDefinition const FAILURE
Definition
SdssCentroid.h:75
lsst::meas::base::SdssCentroidAlgorithm::NEAR_EDGE
static FlagDefinition const NEAR_EDGE
Definition
SdssCentroid.h:80
lsst::meas::base::SdssCentroidAlgorithm::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
SdssCentroid.cc:294
lsst::meas::base::SdssCentroidAlgorithm::getFlagDefinitions
static FlagDefinitionList const & getFlagDefinitions()
Definition
SdssCentroid.cc:55
lsst::meas::base::SdssCentroidAlgorithm::ALMOST_NO_SECOND_DERIVATIVE
static FlagDefinition const ALMOST_NO_SECOND_DERIVATIVE
Definition
SdssCentroid.h:78
lsst::meas::base::SdssCentroidAlgorithm::EDGE
static FlagDefinition const EDGE
Definition
SdssCentroid.h:76
lsst::meas::base::SdssCentroidControl
A C++ control class to handle SdssCentroidAlgorithm's configuration.
Definition
SdssCentroid.h:48
lsst::meas::base::SdssCentroidControl::wfac
double wfac
"fiddle factor for adjusting the binning" ;
Definition
SdssCentroid.h:52
lsst::meas::base::SdssCentroidControl::SdssCentroidControl
SdssCentroidControl()
Default constructor.
Definition
SdssCentroid.h:64
lsst::meas::base::SdssCentroidControl::doFootprintCheck
bool doFootprintCheck
"Do check that the centroid is contained in footprint." ;
Definition
SdssCentroid.h:53
lsst::meas::base::SdssCentroidControl::binmax
int binmax
"maximum allowed binning" ;
Definition
SdssCentroid.h:50
lsst::meas::base::SdssCentroidControl::maxDistToPeak
double maxDistToPeak
"If >0; maximum distance in pixels between the footprint peak and centroid allowed before " "resetToP...
Definition
SdssCentroid.h:57
lsst::meas::base::SdssCentroidControl::peakMin
double peakMin
"if the peak's less than this insist on binning at least once" ;
Definition
SdssCentroid.h:51
lsst::meas::base::SdssCentroidTransform::Control
SdssCentroidControl Control
Definition
SdssCentroid.h:103
lsst::meas::base::SdssCentroidTransform::SdssCentroidTransform
SdssCentroidTransform(Control const &ctrl, std::string const &name, afw::table::SchemaMapper &mapper)
Definition
SdssCentroid.cc:421
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.SdssCentroidTransform
SdssCentroidTransform
Definition
plugins.py:91
lsst::meas::base.plugins.SdssCentroidAlgorithm
SdssCentroidAlgorithm
Definition
plugins.py:90
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
Generated on
for lsst.meas.base by
1.17.0