SourceXtractorPlusPlus
0.11
Please provide a description of the project.
SEImplementation
src
lib
Plugin
AutoPhotometry
AutoPhotometryPlugin.cpp
Go to the documentation of this file.
1
17
/*
18
* AutoPhotometryPlugin.cpp
19
*
20
* Created on: Jul 18, 2016
21
* Author: mkuemmel@usm.lmu.de
22
*/
23
24
#include "
SEFramework/Plugin/StaticPlugin.h
"
25
26
#include "
SEImplementation/Plugin/AutoPhotometry/AutoPhotometry.h
"
27
#include "
SEImplementation/Plugin/AutoPhotometry/AutoPhotometryFlag.h
"
28
#include "
SEImplementation/Plugin/AutoPhotometry/AutoPhotometryArray.h
"
29
#include "
SEImplementation/Plugin/AutoPhotometry/AutoPhotometryTaskFactory.h
"
30
#include "
SEImplementation/Plugin/AutoPhotometry/AutoPhotometryPlugin.h
"
31
32
namespace
SourceXtractor
{
33
34
static
StaticPlugin<AutoPhotometryPlugin>
aperture_photometry_plugin
;
35
36
void
AutoPhotometryPlugin::registerPlugin
(
PluginAPI
& plugin_api) {
37
plugin_api.
getTaskFactoryRegistry
()
38
.
registerTaskFactory
<
AutoPhotometryTaskFactory
,
AutoPhotometry
,
AutoPhotometryFlag
,
AutoPhotometryArray
>();
39
40
plugin_api.
getOutputRegistry
().
registerColumnConverter
<
AutoPhotometryArray
,
std::vector<SeFloat>
>(
41
"auto_flux"
,
42
[](
const
AutoPhotometryArray
& prop){
43
return
prop.getFluxes();
44
},
45
"count"
,
46
"Flux within a Kron-like elliptical aperture"
47
);
48
49
plugin_api.
getOutputRegistry
().
registerColumnConverter
<
AutoPhotometryArray
,
std::vector<SeFloat>
>(
50
"auto_flux_err"
,
51
[](
const
AutoPhotometryArray
& prop){
52
return
prop.getFluxErrors();
53
},
54
"count"
,
55
"Flux error within a Kron-like elliptical aperture"
56
);
57
58
plugin_api.
getOutputRegistry
().
registerColumnConverter
<
AutoPhotometryArray
,
std::vector<SeFloat>
>(
59
"auto_mag"
,
60
[](
const
AutoPhotometryArray
& prop){
61
return
prop.getMags();
62
},
63
"mag"
,
64
"Magnitude within a Kron-like elliptical aperture"
65
);
66
67
plugin_api.
getOutputRegistry
().
registerColumnConverter
<
AutoPhotometryArray
,
std::vector<SeFloat>
>(
68
"auto_mag_err"
,
69
[](
const
AutoPhotometryArray
& prop){
70
return
prop.getMagErrors();
71
},
72
"mag"
,
73
"Magnitude error within a Kron-like elliptical aperture"
74
);
75
76
plugin_api.
getOutputRegistry
().
registerColumnConverter
<
AutoPhotometryArray
,
std::vector<int64_t >
>(
77
"auto_flags"
,
78
[](
const
AutoPhotometryArray
& prop){
79
return
flags2long
(prop.getFlags());
80
},
81
""
,
82
"Flags for the Kron-like elliptical aperture photometry"
83
);
84
85
plugin_api.
getOutputRegistry
().
enableOutput
<
AutoPhotometryArray
>(
"AutoPhotometry"
);
86
}
87
88
std::string
AutoPhotometryPlugin::getIdString
()
const
{
89
return
"AutoPhotometryPlugin"
;
90
}
91
92
}
SourceXtractor::AutoPhotometryFlag
Definition:
AutoPhotometryFlag.h:34
SourceXtractor::aperture_photometry_plugin
static StaticPlugin< AperturePhotometryPlugin > aperture_photometry_plugin
Definition:
AperturePhotometryPlugin.cpp:34
std::string
STL class.
StaticPlugin.h
SourceXtractor::AutoPhotometry
Auto photometry flux and magnitude.
Definition:
AutoPhotometry.h:37
std::vector< SeFloat >
AutoPhotometryTaskFactory.h
SourceXtractor
Definition:
Aperture.h:30
SourceXtractor::AutoPhotometryTaskFactory
Definition:
AutoPhotometryTaskFactory.h:33
SourceXtractor::PluginAPI
This interface is given to the plugin to let it access object instances from the framework.
Definition:
PluginAPI.h:39
SourceXtractor::AutoPhotometryPlugin::getIdString
virtual std::string getIdString() const override
Definition:
AutoPhotometryPlugin.cpp:88
SourceXtractor::TaskFactoryRegistry::registerTaskFactory
void registerTaskFactory()
Definition:
TaskFactoryRegistry.h:51
SourceXtractor::OutputRegistry::enableOutput
void enableOutput(std::string alias_name)
Definition:
OutputRegistry.h:128
AutoPhotometryArray.h
SourceXtractor::PluginAPI::getOutputRegistry
virtual OutputRegistry & getOutputRegistry() const =0
SourceXtractor::PluginAPI::getTaskFactoryRegistry
virtual TaskFactoryRegistry & getTaskFactoryRegistry() const =0
SourceXtractor::flags2long
constexpr int64_t flags2long(const Flags &a)
Definition:
SourceFlags.h:67
SourceXtractor::StaticPlugin
Used to register compile-time (static) plugins with the PluginManager.
Definition:
StaticPlugin.h:38
AutoPhotometryFlag.h
AutoPhotometryPlugin.h
AutoPhotometry.h
SourceXtractor::OutputRegistry::registerColumnConverter
void registerColumnConverter(std::string column_name, ColumnConverter< PropertyType, OutType > converter, std::string column_unit="", std::string column_description="")
Definition:
OutputRegistry.h:46
SourceXtractor::AutoPhotometryArray
Definition:
AutoPhotometryArray.h:37
SourceXtractor::AutoPhotometryPlugin::registerPlugin
virtual void registerPlugin(PluginAPI &plugin_api) override
Definition:
AutoPhotometryPlugin.cpp:36
Generated by
1.8.18