LSSTApplications
10.0-2-g4f67435,11.0.rc2+1,11.0.rc2+12,11.0.rc2+3,11.0.rc2+4,11.0.rc2+5,11.0.rc2+6,11.0.rc2+7,11.0.rc2+8
LSSTDataManagementBasePackage
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
home
lsstsw
stack
Linux64
meas_base
11.0.rc2+12
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
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 {
namespace
meas {
namespace
base {
41
46
class
SdssCentroidControl
{
47
public
:
48
49
LSST_CONTROL_FIELD
(
binmax
,
int
,
"maximum allowed binning"
);
50
LSST_CONTROL_FIELD
(
peakMin
,
double
,
"if the peak's less than this insist on binning at least once"
);
51
LSST_CONTROL_FIELD
(
wfac
,
double
,
"fiddle factor for adjusting the binning"
);
52
59
SdssCentroidControl
() :
binmax
(16),
peakMin
(-1.0),
wfac
(1.5) {}
60
};
61
65
class
SdssCentroidAlgorithm
:
public
SimpleAlgorithm
{
66
public
:
67
68
enum
{
69
FAILURE
=
FlagHandler::FAILURE
,
70
EDGE
,
71
NO_SECOND_DERIVATIVE
,
72
ALMOST_NO_SECOND_DERIVATIVE
,
73
NOT_AT_MAXIMUM
,
74
N_FLAGS
75
};
76
79
typedef
SdssCentroidControl
Control
;
80
81
SdssCentroidAlgorithm
(
Control
const
& ctrl, std::string
const
&
name
,
afw::table::Schema
&
schema
);
82
83
virtual
void
measure
(
84
afw::table::SourceRecord
& measRecord,
85
afw::image::Exposure<float>
const
& exposure
86
)
const
;
87
88
virtual
void
fail
(
89
afw::table::SourceRecord
& measRecord,
90
MeasurementError
*
error
=NULL
91
)
const
;
92
93
private
:
94
95
Control
_ctrl
;
96
CentroidResultKey
_centroidKey
;
97
FlagHandler
_flagHandler
;
98
SafeCentroidExtractor
_centroidExtractor
;
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 lsst::meas::base
109
110
#endif // !LSST_MEAS_BASE_SdssCentroid_h_INCLUDED
lsst.afw.table::Schema
Defines the fields and offsets for a table.
Definition:
Schema.h:46
lsst::meas::base::SdssCentroidAlgorithm::SdssCentroidAlgorithm
SdssCentroidAlgorithm(Control const &ctrl, std::string const &name, afw::table::Schema &schema)
Definition:
SdssCentroid.cc:423
lsst::meas::base::SdssCentroidAlgorithm::_flagHandler
FlagHandler _flagHandler
Definition:
SdssCentroid.h:97
lsst::meas::base::SdssCentroidAlgorithm
The Sdss Centroid Algorithm.
Definition:
SdssCentroid.h:65
lsst::meas::base::SdssCentroidTransform
Definition:
SdssCentroid.h:101
name
table::Key< std::string > name
Definition:
ApCorrMap.cc:71
lsst::meas::base::FlagHandler::FAILURE
Definition:
FlagHandler.h:49
lsst.afw.table::SchemaMapper
A mapping between the keys of two Schemas, used to copy data between them.
Definition:
SchemaMapper.h:19
lsst.afw.image::Exposure< float >
lsst::meas::base::SdssCentroidAlgorithm::FAILURE
Definition:
SdssCentroid.h:69
FlagHandler.h
config.h
lsst::meas::base::SdssCentroidControl
A C++ control class to handle SdssCentroidAlgorithm's configuration.
Definition:
SdssCentroid.h:46
lsst::meas::base::SdssCentroidControl::binmax
int binmax
"maximum allowed binning" ;
Definition:
SdssCentroid.h:49
lsst::meas::base::SafeCentroidExtractor
Definition:
InputUtilities.h:37
lsst::meas::base::MeasurementError
Exception to be thrown when a measurement algorithm experiences a known failure mode.
Definition:
exceptions.h:48
LSST_CONTROL_FIELD
#define LSST_CONTROL_FIELD(NAME, TYPE, DOC)
Definition:
config.h:36
lsst::meas::base::SdssCentroidAlgorithm::NO_SECOND_DERIVATIVE
Definition:
SdssCentroid.h:71
lsst::meas::base::SdssCentroidAlgorithm::_centroidKey
CentroidResultKey _centroidKey
Definition:
SdssCentroid.h:96
lsst::meas::base::SdssCentroidTransform::Control
SdssCentroidControl Control
Definition:
SdssCentroid.h:103
lsst.log.log.error
def error
Definition:
log.py:108
InputUtilities.h
lsst::meas::base::FlagHandler
Definition:
FlagHandler.h:46
lsst::meas::base::SdssCentroidAlgorithm::EDGE
Definition:
SdssCentroid.h:70
Algorithm.h
lsst::meas::base::SdssCentroidAlgorithm::_centroidExtractor
SafeCentroidExtractor _centroidExtractor
Definition:
SdssCentroid.h:98
CentroidUtilities.h
schema
tbl::Schema schema
Definition:
CoaddBoundedField.cc:98
lsst::meas::base::SdssCentroidControl::peakMin
double peakMin
"if the peak's less than this insist on binning at least once" ;
Definition:
SdssCentroid.h:50
lsst::meas::base::SdssCentroidControl::wfac
double wfac
"fiddle factor for adjusting the binning" ;
Definition:
SdssCentroid.h:51
lsst::meas::base::SimpleAlgorithm
Definition:
Algorithm.h:177
lsst::meas::base::SdssCentroidAlgorithm::measure
virtual void measure(afw::table::SourceRecord &measRecord, afw::image::Exposure< float > const &exposure) const
Definition:
SdssCentroid.cc:436
lsst::meas::base::SdssCentroidAlgorithm::Control
SdssCentroidControl Control
Definition:
SdssCentroid.h:79
lsst::meas::base::SdssCentroidAlgorithm::N_FLAGS
Definition:
SdssCentroid.h:74
lsst::meas::base::CentroidResultKey
A FunctorKey for CentroidResult.
Definition:
CentroidUtilities.h:94
lsst.afw.table::SourceRecord
Record class that contains measurements made on a single exposure.
Definition:
Source.h:81
lsst::meas::base::SdssCentroidAlgorithm::_ctrl
Control _ctrl
Definition:
SdssCentroid.h:95
lsst::meas::base::SdssCentroidControl::SdssCentroidControl
SdssCentroidControl()
Default constructor.
Definition:
SdssCentroid.h:59
lsst::meas::base::SdssCentroidAlgorithm::ALMOST_NO_SECOND_DERIVATIVE
Definition:
SdssCentroid.h:72
lsst::meas::base::SdssCentroidAlgorithm::fail
virtual void fail(afw::table::SourceRecord &measRecord, MeasurementError *error=NULL) const
Definition:
SdssCentroid.cc:536
lsst::meas::base::CentroidTransform
Definition:
CentroidUtilities.h:182
lsst::meas::base::SdssCentroidAlgorithm::NOT_AT_MAXIMUM
Definition:
SdssCentroid.h:73
lsst::meas::base::SdssCentroidTransform::SdssCentroidTransform
SdssCentroidTransform(Control const &ctrl, std::string const &name, afw::table::SchemaMapper &mapper)
Definition:
SdssCentroid.cc:540
Generated on Wed Sep 16 2015 13:35:32 for LSSTApplications by
1.8.5