SourceXtractorPlusPlus
0.19
SourceXtractor++, the next generation SExtractor
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
SEImplementation
SEImplementation
PythonConfig
PythonInterpreter.h
Go to the documentation of this file.
1
/*
2
* Copyright © 2019-2022 Université de Genève, LMU Munich - Faculty of Physics, IAP-CNRS/Sorbonne Université
3
*
4
* This library is free software; you can redistribute it and/or modify it under
5
* the terms of the GNU Lesser General Public License as published by the Free
6
* Software Foundation; either version 3.0 of the License, or (at your option)
7
* any later version.
8
*
9
* This library is distributed in the hope that it will be useful, but WITHOUT
10
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12
* details.
13
*
14
* You should have received a copy of the GNU Lesser General Public License
15
* along with this library; if not, write to the Free Software Foundation, Inc.,
16
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17
*/
18
/*
19
* @file PythonInterpreter.h
20
* @author Nikolaos Apostolakos <nikoapos@gmail.com>
21
*/
22
23
#ifndef _SEIMPLEMENTATION_PYTHONINTERPRETER_H
24
#define _SEIMPLEMENTATION_PYTHONINTERPRETER_H
25
26
#include <string>
27
#include <map>
28
#include <vector>
29
#include <
SEFramework/CoordinateSystem/CoordinateSystem.h
>
30
#include <
SEImplementation/PythonConfig/PyMeasurementImage.h
>
31
#include <
SEImplementation/PythonConfig/PyAperture.h
>
32
#include <
SEImplementation/PythonConfig/PyOutputWrapper.h
>
33
34
namespace
SourceXtractor {
35
36
class
PythonInterpreter
{
37
38
public
:
39
40
static
PythonInterpreter
&
getSingleton
();
41
42
void
runFile
(
const
std::string
&
filename
,
const
std::vector<std::string>
& argv);
43
44
void
setupContext
();
45
46
virtual
~PythonInterpreter
();
47
48
std::map<int, PyMeasurementImage>
getMeasurementImages
();
49
50
std::map<int, PyAperture>
getApertures
();
51
52
std::vector<std::pair<std::string, std::vector<int>
>>
getModelFittingOutputColumns
();
53
54
std::map<std::string, std::vector<int>
>
getApertureOutputColumns
();
55
56
std::map<int, boost::python::object>
getConstantParameters
();
57
58
std::map<int, boost::python::object>
getFreeParameters
();
59
60
std::map<int, boost::python::object>
getDependentParameters
();
61
62
std::map<int, boost::python::object>
getPriors
();
63
64
std::map<int, boost::python::object>
getConstantModels
();
65
66
std::map<int, boost::python::object>
getPointSourceModels
();
67
68
std::map<int, boost::python::object>
getSersicModels
();
69
70
std::map<int, boost::python::object>
getExponentialModels
();
71
72
std::map<int, boost::python::object>
getDeVaucouleursModels
();
73
74
std::map<int, boost::python::object>
getOnnxModels
();
75
76
std::map<int, std::vector<int>
>
getFrameModelsMap
();
77
78
std::map<std::string, boost::python::object>
getModelFittingParams
();
79
80
private
:
81
82
PythonInterpreter
();
83
84
std::map<int, boost::python::object>
getMapFromDict
(
const
char
* object_name,
85
const
char
* dict_name);
86
87
PyOutputWrapper
m_out_wrapper
,
m_err_wrapper
;
88
boost::python::object
m_measurement_config
;
89
};
90
91
}
// end of namespace SourceXtractor
92
93
#endif // _SEIMPLEMENTATION_PYTHONINTERPRETER_H
94
SourceXtractor::PythonInterpreter::getConstantModels
std::map< int, boost::python::object > getConstantModels()
Definition:
PythonInterpreter.cpp:264
SourceXtractor::PythonInterpreter::getFreeParameters
std::map< int, boost::python::object > getFreeParameters()
Definition:
PythonInterpreter.cpp:252
SourceXtractor::PythonInterpreter::getMeasurementImages
std::map< int, PyMeasurementImage > getMeasurementImages()
Definition:
PythonInterpreter.cpp:133
PyOutputWrapper.h
SourceXtractor::PythonInterpreter::getPointSourceModels
std::map< int, boost::python::object > getPointSourceModels()
Definition:
PythonInterpreter.cpp:268
SourceXtractor::PythonInterpreter::m_out_wrapper
PyOutputWrapper m_out_wrapper
Definition:
PythonInterpreter.h:87
PyAperture.h
SourceXtractor::PythonInterpreter::m_measurement_config
boost::python::object m_measurement_config
Definition:
PythonInterpreter.h:88
SourceXtractor::PythonInterpreter::getApertureOutputColumns
std::map< std::string, std::vector< int > > getApertureOutputColumns()
Definition:
PythonInterpreter.cpp:199
SourceXtractor::PythonInterpreter::getOnnxModels
std::map< int, boost::python::object > getOnnxModels()
Definition:
PythonInterpreter.cpp:284
SourceXtractor::PythonInterpreter::m_err_wrapper
PyOutputWrapper m_err_wrapper
Definition:
PythonInterpreter.h:87
std::map
STL class.
SourceXtractor::PythonInterpreter::getDeVaucouleursModels
std::map< int, boost::python::object > getDeVaucouleursModels()
Definition:
PythonInterpreter.cpp:280
std::string
STL class.
SourceXtractor::PythonInterpreter::getMapFromDict
std::map< int, boost::python::object > getMapFromDict(const char *object_name, const char *dict_name)
Definition:
PythonInterpreter.cpp:227
SourceXtractor::PythonInterpreter::getSersicModels
std::map< int, boost::python::object > getSersicModels()
Definition:
PythonInterpreter.cpp:272
SourceXtractor::PythonInterpreter::runFile
void runFile(const std::string &filename, const std::vector< std::string > &argv)
Definition:
PythonInterpreter.cpp:73
SourceXtractor::PythonInterpreter::getModelFittingParams
std::map< std::string, boost::python::object > getModelFittingParams()
Definition:
PythonInterpreter.cpp:309
SourceXtractor::PythonInterpreter::getPriors
std::map< int, boost::python::object > getPriors()
Definition:
PythonInterpreter.cpp:260
SourceXtractor::PythonInterpreter::getFrameModelsMap
std::map< int, std::vector< int > > getFrameModelsMap()
Definition:
PythonInterpreter.cpp:288
SourceXtractor::PyOutputWrapper
Definition:
PyOutputWrapper.h:36
conf.filename
string filename
Definition:
conf.py:65
SourceXtractor::PythonInterpreter::getExponentialModels
std::map< int, boost::python::object > getExponentialModels()
Definition:
PythonInterpreter.cpp:276
SourceXtractor::PythonInterpreter::getConstantParameters
std::map< int, boost::python::object > getConstantParameters()
Definition:
PythonInterpreter.cpp:248
SourceXtractor::PythonInterpreter::getModelFittingOutputColumns
std::vector< std::pair< std::string, std::vector< int > > > getModelFittingOutputColumns()
Definition:
PythonInterpreter.cpp:169
SourceXtractor::PythonInterpreter::getApertures
std::map< int, PyAperture > getApertures()
Definition:
PythonInterpreter.cpp:151
CoordinateSystem.h
std::vector< std::string >
SourceXtractor::PythonInterpreter::PythonInterpreter
PythonInterpreter()
Definition:
PythonInterpreter.cpp:52
SourceXtractor::PythonInterpreter::~PythonInterpreter
virtual ~PythonInterpreter()
Definition:
PythonInterpreter.cpp:69
PyMeasurementImage.h
SourceXtractor::PythonInterpreter::getDependentParameters
std::map< int, boost::python::object > getDependentParameters()
Definition:
PythonInterpreter.cpp:256
SourceXtractor::PythonInterpreter
Definition:
PythonInterpreter.h:36
SourceXtractor::PythonInterpreter::getSingleton
static PythonInterpreter & getSingleton()
Definition:
PythonInterpreter.cpp:47
SourceXtractor::PythonInterpreter::setupContext
void setupContext()
Definition:
PythonInterpreter.cpp:124
Generated by
1.8.5