lsst.meas.base
16.0-13-gd9b1b71+7
include
lsst
meas
base
Transform.h
Go to the documentation of this file.
1
// -*- lsst-c++ -*-
2
/*
3
* LSST Data Management System
4
* Copyright 2008-2015 AURA/LSST.
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_Transform_h_INCLUDED
25
#define LSST_MEAS_BASE_Transform_h_INCLUDED
26
32
#include <string>
33
#include "
lsst/afw/geom.h
"
34
#include "
lsst/afw/image.h
"
35
#include "
lsst/afw/table.h
"
36
#include "
lsst/pex/exceptions.h
"
37
38
namespace
lsst
{
39
namespace
meas {
40
namespace
base {
41
85
class
BaseTransform
{
86
public
:
87
explicit
BaseTransform
(
std::string
const
& name) :
_name
(name) {}
88
virtual
~BaseTransform
() {}
89
virtual
void
operator()
(
afw::table::SourceCatalog
const
& inputCatalog,
90
afw::table::BaseCatalog
& outputCatalog,
afw::geom::SkyWcs
const
&
wcs
,
91
afw::image::Calib
const
&
calib
)
const
= 0;
92
93
protected
:
101
void
checkCatalogSize
(
afw::table::BaseCatalog
const
& cat1,
afw::table::BaseCatalog
const
& cat2)
const
{
102
if
(cat1.
size
() != cat2.
size
()) {
103
throw
LSST_EXCEPT
(
pex::exceptions::LengthError
,
"Catalog size mismatch"
);
104
}
105
}
106
std::string
_name
;
107
};
108
109
}
// namespace base
110
}
// namespace meas
111
}
// namespace lsst
112
113
#endif // !LSST_MEAS_BASE_Transform_h_INCLUDED
geom.h
lsst::afw::geom::SkyWcs
calib
Key< int > calib
CatalogT< BaseRecord >
lsst::pex::exceptions::LengthError
lsst::afw::image::Calib
lsst::meas::base::BaseTransform::BaseTransform
BaseTransform(std::string const &name)
Definition:
Transform.h:87
std::string
STL class.
wcs
table::Key< table::Array< std::uint8_t > > wcs
lsst
lsst::afw::table::SortedCatalogT
exceptions.h
image.h
lsst::meas::base::BaseTransform::_name
std::string _name
Definition:
Transform.h:106
LSST_EXCEPT
#define LSST_EXCEPT(type,...)
lsst::meas::base::BaseTransform
Abstract base class for all C++ measurement transformations.
Definition:
Transform.h:85
table.h
CatalogT< BaseRecord >::size
size_type size() const
lsst::meas::base::BaseTransform::checkCatalogSize
void checkCatalogSize(afw::table::BaseCatalog const &cat1, afw::table::BaseCatalog const &cat2) const
Ensure that catalogs have the same size.
Definition:
Transform.h:101
lsst::meas::base::BaseTransform::~BaseTransform
virtual ~BaseTransform()
Definition:
Transform.h:88
lsst::meas::base::BaseTransform::operator()
virtual void operator()(afw::table::SourceCatalog const &inputCatalog, afw::table::BaseCatalog &outputCatalog, afw::geom::SkyWcs const &wcs, afw::image::Calib const &calib) const =0
Generated on Fri Sep 28 2018 04:57:22 for lsst.meas.base by
1.8.13