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
CoaddBoundedField.h
Go to the documentation of this file.
1
// -*- lsst-c++ -*-
2
/*
3
* LSST Data Management System
4
* Copyright 2008-2014 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_ALGORITHMS_CoaddBoundedField_h_INCLUDED
25
#define LSST_MEAS_ALGORITHMS_CoaddBoundedField_h_INCLUDED
26
27
#include "
lsst/afw/math/BoundedField.h
"
28
#include "
lsst/afw/image/Wcs.h
"
29
#include "
lsst/afw/geom/polygon/Polygon.h
"
30
31
namespace
lsst {
namespace
meas {
namespace
algorithms {
32
34
struct
CoaddBoundedFieldElement
{
35
36
CoaddBoundedFieldElement
(
37
PTR
(
afw::math::BoundedField
) field_,
38
PTR
(
afw::image::Wcs
const
) wcs_,
39
PTR
(
afw::geom::polygon::Polygon
const
) validPolygon_,
40
double
weight_=1.0
41
) :
field
(field_),
wcs
(wcs_),
validPolygon
(validPolygon_),
42
weight
(weight_) {}
43
44
PTR
(
afw::math::BoundedField
)
field
;
45
PTR
(afw::
image
::
Wcs
const)
wcs
;
46
PTR
(afw::geom::polygon::Polygon const)
validPolygon
;
47
double
weight
;
48
};
49
50
class
CoaddBoundedField
:
51
public afw::table::io::PersistableFacade<
CoaddBoundedField
>,
52
public afw::math::BoundedField
53
{
54
public
:
55
56
typedef
CoaddBoundedFieldElement
Element
;
57
typedef
std::vector<Element>
ElementVector
;
58
59
explicit
CoaddBoundedField(
60
afw::geom::Box2I
const
& bbox,
61
PTR
(
afw::image::Wcs
const
)
coaddWcs
,
62
ElementVector
const
& elements
63
);
64
65
explicit
CoaddBoundedField(
66
afw::geom::Box2I
const
& bbox,
67
PTR
(
afw::image::Wcs
const
)
coaddWcs
,
68
ElementVector
const
& elements,
69
double
default_
70
);
71
73
virtual
double
evaluate(
afw::geom::Point2D
const
& position)
const
;
74
78
virtual
bool
isPersistable
()
const
{
return
true
; }
79
80
// Factory used to read CoaddPsf from an InputArchive; defined only in the source file.
81
class
Factory;
82
83
virtual
PTR
(
afw::math::BoundedField
) operator*(
double
const
scale
) const;
84
85
protected:
86
87
// See afw::table::io::Persistable::getPersistenceName
88
virtual std::
string
getPersistenceName() const;
89
90
// See afw::table::io::Persistable::getPythonModule
91
virtual std::
string
getPythonModule() const;
92
93
// See afw::table::io::Persistable::write
94
virtual
void
write(OutputArchiveHandle & handle) const;
95
96
private:
97
98
bool
_throwOnMissing;
// instead of using _default, raise an exception
99
double
_default;
// when none of the elements contribute at a point, return this value
100
PTR
(afw::
image
::
Wcs
const) _coaddWcs;
// coordinate system this field is defined in
101
ElementVector _elements;
// vector of constituent fields being coadded
102
};
103
104
}}}
// namespace lsst::meas::algorithms
105
106
#endif // !LSST_MEAS_ALGORITHMS_CoaddBoundedField_h_INCLUDED
lsst::meas::algorithms::CoaddBoundedFieldElement::weight
double weight
Definition:
CoaddBoundedField.h:47
lsst::meas::algorithms::CoaddBoundedFieldElement
Struct used to hold one Exposure's data in a CoaddBoundedField.
Definition:
CoaddBoundedField.h:34
lsst::meas::algorithms::CoaddBoundedFieldElement::wcs
boost::shared_ptr< afw::image::Wcs const > wcs
Definition:
CoaddBoundedField.h:45
lsst::meas::algorithms::CoaddBoundedField::ElementVector
std::vector< Element > ElementVector
Definition:
CoaddBoundedField.h:57
lsst::meas::algorithms::CoaddBoundedField
Definition:
CoaddBoundedField.h:50
lsst::meas::algorithms::CoaddBoundedField::Element
CoaddBoundedFieldElement Element
Definition:
CoaddBoundedField.h:56
PTR
#define PTR(...)
Definition:
base.h:41
lsst::afw::image::Wcs
Implementation of the WCS standard for a any projection.
Definition:
Wcs.h:107
Wcs.h
Polygon.h
lsst::meas::algorithms::CoaddBoundedField::isPersistable
virtual bool isPersistable() const
Return true if the CoaddBoundedField persistable (always true).
Definition:
CoaddBoundedField.h:78
lsst::afw::geom::Point< double, 2 >
lsst::afw::geom::Box2I
An integer coordinate rectangle.
Definition:
Box.h:53
image
table::Key< table::Array< Kernel::Pixel > > image
Definition:
FixedKernel.cc:117
lsst::meas::algorithms::CoaddBoundedFieldElement::CoaddBoundedFieldElement
CoaddBoundedFieldElement(boost::shared_ptr< afw::math::BoundedField > field_, boost::shared_ptr< afw::image::Wcs const > wcs_, boost::shared_ptr< afw::geom::polygon::Polygon const > validPolygon_, double weight_=1.0)
Definition:
CoaddBoundedField.h:36
default_
tbl::Key< double > default_
Definition:
CoaddBoundedField.cc:103
BoundedField.h
lsst::afw.display.ds9.scale
def scale
Definition:
ds9.py:91
lsst::afw::math::BoundedField
An abstract base class for 2-d functions defined on an integer bounding boxes.
Definition:
BoundedField.h:49
lsst::afw::geom::polygon::Polygon
Definition:
Polygon.h:55
lsst::meas::algorithms::CoaddBoundedFieldElement::field
boost::shared_ptr< afw::math::BoundedField > field
Definition:
CoaddBoundedField.h:44
coaddWcs
tbl::Key< int > coaddWcs
Definition:
CoaddBoundedField.cc:101
lsst::meas::algorithms::CoaddBoundedFieldElement::validPolygon
boost::shared_ptr< afw::geom::polygon::Polygon const > validPolygon
Definition:
CoaddBoundedField.h:46
Generated on Thu Sep 24 2015 02:29:20 for LSSTApplications by
1.8.5