LSSTApplications
10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
home
lsstsw
stack
Linux64
meas_base
11.0+1
include
lsst
meas
base
GaussianCentroid.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_GaussianCentroid_h_INCLUDED
25
#define LSST_MEAS_BASE_GaussianCentroid_h_INCLUDED
26
27
#include "
lsst/afw/geom/Point.h
"
28
#include "
lsst/pex/config.h
"
29
#include "
lsst/meas/base/Algorithm.h
"
30
#include "
lsst/meas/base/CentroidUtilities.h
"
31
#include "
lsst/meas/base/FlagHandler.h
"
32
#include "
lsst/meas/base/InputUtilities.h
"
33
34
namespace
lsst {
namespace
meas {
namespace
base {
35
36
struct
FittedModel
{
37
enum
{
PEAK
= 0,
SKY
,
X0
,
Y0
,
SIGMA
,
NPARAM
};
38
39
enum
{
40
BAD_GUESS
= -11,
41
TOO_FEW
= -12,
42
CHI_SQUARED
= -13,
43
RANGE
= -14,
44
BAD_WIDTH
= -15,
45
LOST
= -16,
46
DIAGONAL
= -17,
47
BAD_A
= -18,
48
CONVERGE
= 1,
49
ITERATE
= 2,
50
ALMOST
= 3,
51
POOR
= 4
52
};
53
54
FittedModel
(
int
status_, std::vector<double> params_,
int
iter_=0,
double
flamd_=0,
double
chnew_=0) :
55
status
(status_),
params
(params_),
iter
(iter_),
flamd
(flamd_),
chnew
(chnew_) { }
56
int
status
;
57
std::vector<double>
params
;
58
int
iter
;
59
double
flamd
;
60
double
chnew
;
61
};
62
69
class
GaussianCentroidControl
{
70
public
:
76
GaussianCentroidControl
() {}
77
};
78
82
class
GaussianCentroidAlgorithm
:
public
SimpleAlgorithm
{
83
public
:
84
90
enum
{
91
FAILURE
=
FlagHandler::FAILURE
,
92
NO_PEAK
,
93
N_FLAGS
94
};
95
98
typedef
GaussianCentroidControl
Control
;
99
100
GaussianCentroidAlgorithm
(
Control
const
& ctrl, std::string
const
&
name
,
afw::table::Schema
&
schema
);
101
105
template
<
typename
PixelT>
107
static
afw::geom::Point2D
fitCentroid
(
afw::image::Image<PixelT>
const
& im,
108
double
x0
,
109
double
y0
110
);
111
112
virtual
void
measure
(
113
afw::table::SourceRecord
& measRecord,
114
afw::image::Exposure<float>
const
& exposure
115
)
const
;
116
117
virtual
void
fail
(
118
afw::table::SourceRecord
& measRecord,
119
MeasurementError
*
error
=NULL
120
)
const
;
121
122
private
:
123
124
Control
_ctrl
;
125
CentroidResultKey
_centroidKey
;
126
FlagHandler
_flagHandler
;
127
SafeCentroidExtractor
_centroidExtractor
;
128
};
129
130
class
GaussianCentroidTransform
:
public
CentroidTransform
{
131
public
:
132
typedef
GaussianCentroidControl
Control
;
133
134
GaussianCentroidTransform
(
Control
const
& ctrl, std::string
const
&
name
,
afw::table::SchemaMapper
& mapper);
135
};
136
137
}}}
// namespace lsst::meas::base
138
139
#endif // !LSST_MEAS_BASE_GaussianCentroid_h_INCLUDED
lsst::afw::table::Schema
Defines the fields and offsets for a table.
Definition:
Schema.h:46
lsst::meas::base::GaussianCentroidAlgorithm::FAILURE
Definition:
GaussianCentroid.h:91
lsst::meas::base::GaussianCentroidAlgorithm::GaussianCentroidAlgorithm
GaussianCentroidAlgorithm(Control const &ctrl, std::string const &name, afw::table::Schema &schema)
Definition:
GaussianCentroid.cc:512
lsst::meas::base::FittedModel::TOO_FEW
Definition:
GaussianCentroid.h:41
lsst::meas::base::FittedModel::LOST
Definition:
GaussianCentroid.h:45
lsst::meas::base::FittedModel::PEAK
Definition:
GaussianCentroid.h:37
Point.h
A coordinate class intended to represent absolute positions.
lsst::meas::base::FittedModel::BAD_A
Definition:
GaussianCentroid.h:47
name
table::Key< std::string > name
Definition:
ApCorrMap.cc:71
lsst::meas::base::GaussianCentroidAlgorithm::fail
virtual void fail(afw::table::SourceRecord &measRecord, MeasurementError *error=NULL) const
Definition:
GaussianCentroid.cc:573
lsst::meas::base::GaussianCentroidControl::GaussianCentroidControl
GaussianCentroidControl()
Default constructor.
Definition:
GaussianCentroid.h:76
schema
afw::table::Schema schema
Definition:
GaussianPsf.cc:41
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 >
FlagHandler.h
config.h
lsst::meas::base::GaussianCentroidAlgorithm::fitCentroid
static afw::geom::Point2D fitCentroid(afw::image::Image< PixelT > const &im, double x0, double y0)
x0, y0 is an initial guess for position, column
Definition:
GaussianCentroid.cc:528
lsst::meas::base::FittedModel::Y0
Definition:
GaussianCentroid.h:37
lsst::meas::base::SafeCentroidExtractor
Definition:
InputUtilities.h:37
lsst::meas::base::FlagHandler::FAILURE
Definition:
FlagHandler.h:49
lsst::meas::base::FittedModel::RANGE
Definition:
GaussianCentroid.h:43
lsst::meas::base::FittedModel
Definition:
GaussianCentroid.h:36
lsst::meas::base::MeasurementError
Exception to be thrown when a measurement algorithm experiences a known failure mode.
Definition:
exceptions.h:48
lsst::meas::base::FittedModel::SKY
Definition:
GaussianCentroid.h:37
lsst::meas::base::GaussianCentroidAlgorithm
A class that calculates a centroid by fitting a circular Gaussian to the image.
Definition:
GaussianCentroid.h:82
lsst::afw.display::x0
int const x0
Definition:
saturated.cc:45
lsst::afw::geom::Point< double, 2 >
lsst::meas::base::FittedModel::flamd
double flamd
Definition:
GaussianCentroid.h:59
lsst.log.log.error
def error
Definition:
log.py:108
InputUtilities.h
lsst::meas::base::FlagHandler
Definition:
FlagHandler.h:46
lsst::meas::base::FittedModel::DIAGONAL
Definition:
GaussianCentroid.h:46
lsst::meas::base::FittedModel::SIGMA
Definition:
GaussianCentroid.h:37
lsst::meas::base::FittedModel::params
std::vector< double > params
Definition:
GaussianCentroid.h:57
Algorithm.h
lsst::meas::base::FittedModel::BAD_WIDTH
Definition:
GaussianCentroid.h:44
lsst::meas::base::FittedModel::X0
Definition:
GaussianCentroid.h:37
lsst::meas::base::GaussianCentroidControl
A C++ control class to handle GaussianCentroidAlgorithm's configuration.
Definition:
GaussianCentroid.h:69
lsst::meas::base::FittedModel::FittedModel
FittedModel(int status_, std::vector< double > params_, int iter_=0, double flamd_=0, double chnew_=0)
Definition:
GaussianCentroid.h:54
CentroidUtilities.h
lsst::meas::base::GaussianCentroidAlgorithm::Control
GaussianCentroidControl Control
Definition:
GaussianCentroid.h:98
lsst::meas::base::FittedModel::CONVERGE
Definition:
GaussianCentroid.h:48
lsst::meas::base::GaussianCentroidAlgorithm::measure
virtual void measure(afw::table::SourceRecord &measRecord, afw::image::Exposure< float > const &exposure) const
Definition:
GaussianCentroid.cc:539
lsst::meas::base::FittedModel::chnew
double chnew
Definition:
GaussianCentroid.h:60
lsst::meas::base::FittedModel::NPARAM
Definition:
GaussianCentroid.h:37
lsst::meas::base::GaussianCentroidAlgorithm::_flagHandler
FlagHandler _flagHandler
Definition:
GaussianCentroid.h:126
lsst::meas::base::FittedModel::POOR
Definition:
GaussianCentroid.h:51
lsst::meas::base::GaussianCentroidTransform::GaussianCentroidTransform
GaussianCentroidTransform(Control const &ctrl, std::string const &name, afw::table::SchemaMapper &mapper)
Definition:
GaussianCentroid.cc:586
lsst::meas::base::GaussianCentroidAlgorithm::N_FLAGS
Definition:
GaussianCentroid.h:93
lsst::meas::base::FittedModel::CHI_SQUARED
Definition:
GaussianCentroid.h:42
lsst::meas::base::GaussianCentroidAlgorithm::NO_PEAK
Definition:
GaussianCentroid.h:92
lsst::meas::base::SimpleAlgorithm
Definition:
Algorithm.h:177
lsst::meas::base::FittedModel::iter
int iter
Definition:
GaussianCentroid.h:58
lsst::meas::base::GaussianCentroidTransform::Control
GaussianCentroidControl Control
Definition:
GaussianCentroid.h:132
lsst::meas::base::FittedModel::BAD_GUESS
Definition:
GaussianCentroid.h:40
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::GaussianCentroidAlgorithm::_ctrl
Control _ctrl
Definition:
GaussianCentroid.h:124
lsst::afw.display::y0
int const y0
Definition:
saturated.cc:45
lsst::meas::base::FittedModel::ITERATE
Definition:
GaussianCentroid.h:49
lsst::meas::base::FittedModel::status
int status
Definition:
GaussianCentroid.h:56
lsst::afw::image::Image
A class to represent a 2-dimensional array of pixels.
Definition:
Image.h:415
lsst::meas::base::GaussianCentroidAlgorithm::_centroidKey
CentroidResultKey _centroidKey
Definition:
GaussianCentroid.h:125
lsst::meas::base::GaussianCentroidTransform
Definition:
GaussianCentroid.h:130
lsst::meas::base::CentroidTransform
Definition:
CentroidUtilities.h:182
lsst::meas::base::FittedModel::ALMOST
Definition:
GaussianCentroid.h:50
lsst::meas::base::GaussianCentroidAlgorithm::_centroidExtractor
SafeCentroidExtractor _centroidExtractor
Definition:
GaussianCentroid.h:127
Generated on Thu Sep 24 2015 02:29:21 for LSSTApplications by
1.8.5