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_algorithms
11.0-2-gb8b8ce7
include
lsst
meas
algorithms
ShapeletPsfCandidate.h
Go to the documentation of this file.
1
// -*- LSST-C++ -*-
2
#ifndef LSST_MEAS_ALGORITHMS_SHAPELETPSFCANDIDATE_H
3
#define LSST_MEAS_ALGORITHMS_SHAPELETPSFCANDIDATE_H
4
/*
5
* LSST Data Management System
6
* Copyright 2008, 2009, 2010 LSST Corporation.
7
*
8
* This product includes software developed by the
9
* LSST Project (http://www.lsst.org/).
10
*
11
* This program is free software: you can redistribute it and/or modify
12
* it under the terms of the GNU General Public License as published by
13
* the Free Software Foundation, either version 3 of the License, or
14
* (at your option) any later version.
15
*
16
* This program is distributed in the hope that it will be useful,
17
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
* GNU General Public License for more details.
20
*
21
* You should have received a copy of the LSST License Statement and
22
* the GNU General Public License along with this program. If not,
23
* see <http://www.lsstcorp.org/LegalNotices/>.
24
*/
25
34
#include "
lsst/afw/math/SpatialCell.h
"
35
#include "
lsst/afw/table/Source.h
"
36
#include "boost/shared_ptr.hpp"
37
38
namespace
lsst {
39
namespace
meas {
40
namespace
algorithms {
41
42
class
ShapeletPsfCandidate
:
43
public
lsst::afw::math::SpatialCellCandidate
44
{
45
public
:
46
typedef
lsst::afw::math::SpatialCellCandidate
base
;
47
typedef
lsst::afw::table::SourceRecord
Source
;
48
49
typedef
boost::shared_ptr<ShapeletPsfCandidate>
Ptr
;
50
typedef
boost::shared_ptr<const ShapeletPsfCandidate>
ConstPtr
;
51
77
inline
ShapeletPsfCandidate
(
78
double
x
,
79
double
y
,
80
double
size,
81
PTR
(
Source
) source
82
) :
83
base
(x,y),
_size
(size),
_source
(source),
_rating
(1.)
84
{}
85
89
inline
void
setShapelet
(
Shapelet::ConstPtr
shapelet)
90
{
91
_shapelet
= shapelet;
92
if
(
_shapelet
->hasCovariance())
93
_rating
=
_shapelet
->getValues()(0) / sqrt((*
_shapelet
->getCovariance())(0,0));
94
}
95
99
inline
double
getX
()
const
{
return
base::getXCenter
(); }
100
inline
double
getY
()
const
{
return
base::getYCenter
(); }
101
105
inline
double
getSize
()
const
{
return
_size
; }
106
110
inline
PTR
(
Source
)
getSource
()
const
111
{
112
assert(
_source
);
113
return
_source
;
114
}
115
119
inline
Shapelet::ConstPtr
getShapelet
()
const
120
{
121
assert(
_shapelet
);
122
return
_shapelet
;
123
}
124
128
inline
bool
hasShapelet
()
const
{
return
static_cast<
bool
>
(
_shapelet
); }
129
133
inline
double
getCandidateRating
()
const
{
return
_rating
; }
134
143
inline
void
setBad
()
144
{
145
lsst::afw::math::SpatialCellCandidate::setStatus
(
146
lsst::afw::math::SpatialCellCandidate::BAD
);
147
}
148
149
private
:
150
151
double
_size
;
152
PTR
(
Source
)
_source
;
153
Shapelet
::
ConstPtr
_shapelet
;
154
double
_rating
;
155
};
156
157
}}}
158
159
#endif
y
int y
Definition:
GaussianCentroid.cc:36
lsst::meas::algorithms::ShapeletPsfCandidate::_source
boost::shared_ptr< Source > _source
Definition:
ShapeletPsfCandidate.h:152
lsst::afw::math::SpatialCellCandidate::setStatus
void setStatus(Status status)
Set the candidate's status.
Definition:
SpatialCell.cc:61
lsst::meas::algorithms::ShapeletPsfCandidate::getY
double getY() const
Definition:
ShapeletPsfCandidate.h:100
lsst::meas::algorithms::ShapeletPsfCandidate::base
lsst::afw::math::SpatialCellCandidate base
Definition:
ShapeletPsfCandidate.h:46
lsst::afw::math::SpatialCellCandidate::getYCenter
float getYCenter() const
Return the object's row-centre.
Definition:
SpatialCell.h:98
PTR
#define PTR(...)
Definition:
base.h:41
lsst::meas::algorithms::ShapeletPsfCandidate::getX
double getX() const
Get position.
Definition:
ShapeletPsfCandidate.h:99
lsst::meas::algorithms::ShapeletPsfCandidate::_rating
double _rating
Definition:
ShapeletPsfCandidate.h:154
lsst::afw::math::SpatialCellCandidate::ConstPtr
boost::shared_ptr< const SpatialCellCandidate > ConstPtr
Definition:
SpatialCell.h:77
Source.h
lsst::meas::algorithms::Shapelet
Definition:
Shapelet.h:50
lsst::meas::algorithms::Shapelet::ConstPtr
boost::shared_ptr< const Shapelet > ConstPtr
Definition:
Shapelet.h:95
lsst::meas::algorithms::ShapeletPsfCandidate::Source
lsst::afw::table::SourceRecord Source
Definition:
ShapeletPsfCandidate.h:47
lsst::meas::algorithms::ShapeletPsfCandidate::ShapeletPsfCandidate
ShapeletPsfCandidate(double x, double y, double size, boost::shared_ptr< Source > source)
Constructor takes position, size, and original source.
Definition:
ShapeletPsfCandidate.h:77
lsst::meas::algorithms::ShapeletPsfCandidate::setShapelet
void setShapelet(Shapelet::ConstPtr shapelet)
Set the shapelet decomposition.
Definition:
ShapeletPsfCandidate.h:89
lsst::meas::algorithms::ShapeletPsfCandidate::ConstPtr
boost::shared_ptr< const ShapeletPsfCandidate > ConstPtr
Definition:
ShapeletPsfCandidate.h:50
lsst::meas::algorithms::ShapeletPsfCandidate::_shapelet
Shapelet::ConstPtr _shapelet
Definition:
ShapeletPsfCandidate.h:153
lsst::meas::algorithms::ShapeletPsfCandidate::Ptr
boost::shared_ptr< ShapeletPsfCandidate > Ptr
Definition:
ShapeletPsfCandidate.h:49
lsst::meas::algorithms::ShapeletPsfCandidate::getShapelet
Shapelet::ConstPtr getShapelet() const
Get the shapelet decomposition.
Definition:
ShapeletPsfCandidate.h:119
lsst::afw::math::SpatialCellCandidate::getXCenter
float getXCenter() const
Return the object's column-centre.
Definition:
SpatialCell.h:95
lsst::meas::algorithms::ShapeletPsfCandidate::getSource
boost::shared_ptr< Source > getSource() const
Get source.
Definition:
ShapeletPsfCandidate.h:110
x
double x
Definition:
ChebyshevBoundedField.cc:305
lsst::meas::algorithms::ShapeletPsfCandidate::getSize
double getSize() const
Get size.
Definition:
ShapeletPsfCandidate.h:105
lsst::meas::algorithms::ShapeletPsfCandidate::getCandidateRating
double getCandidateRating() const
Define "goodness" of candidate for SpatialCell.
Definition:
ShapeletPsfCandidate.h:133
lsst::meas::algorithms::ShapeletPsfCandidate::hasShapelet
bool hasShapelet() const
Check if shapelet decomposition is set.
Definition:
ShapeletPsfCandidate.h:128
SpatialCell.h
Class to ensure constraints for spatial modeling.
lsst::afw::table::SourceRecord
Record class that contains measurements made on a single exposure.
Definition:
Source.h:81
lsst::afw::math::SpatialCellCandidate
Definition:
SpatialCell.h:74
lsst::meas::algorithms::ShapeletPsfCandidate::_size
double _size
Definition:
ShapeletPsfCandidate.h:151
lsst::meas::algorithms::ShapeletPsfCandidate
Definition:
ShapeletPsfCandidate.h:42
lsst::afw::math::SpatialCellCandidate::BAD
Definition:
SpatialCell.h:79
lsst::meas::algorithms::ShapeletPsfCandidate::setBad
void setBad()
Mark the candidate as BAD.
Definition:
ShapeletPsfCandidate.h:143
Generated on Thu Sep 24 2015 02:29:20 for LSSTApplications by
1.8.5