SourceXtractorPlusPlus
1.0.3
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
SEImplementation
src
lib
Plugin
MoffatModelFitting
MoffatModelEvaluator.cpp
Go to the documentation of this file.
1
17
/*
18
* MoffatModelFittingUtils.cpp
19
*
20
* Created on: 2019 M02 20
21
* Author: mschefer
22
*/
23
24
25
#include "AlexandriaKernel/memory_tools.h"
26
#include "
ModelFitting/Parameters/ManualParameter.h
"
27
#include "
ModelFitting/Models/ExtendedModel.h
"
28
#include "
ModelFitting/Models/FlattenedMoffatComponent.h
"
29
30
#include "
SEImplementation/Image/ImageInterfaceTraits.h
"
31
32
#include "
SEImplementation/Plugin/MoffatModelFitting/MoffatModelFitting.h
"
33
#include "
SEImplementation/Plugin/MoffatModelFitting/MoffatModelEvaluator.h
"
34
35
namespace
SourceXtractor
{
36
37
using namespace
ModelFitting;
38
using
Euclid::make_unique
;
39
40
MoffatModelEvaluator::MoffatModelEvaluator
(
const
MoffatModelFitting
& model) {
41
m_iterations
= model.
getIterations
();
42
43
auto
x =
std::make_shared<ManualParameter>
(model.
getX
());
44
auto
y =
std::make_shared<ManualParameter>
(model.
getY
());
45
auto
moffat_i0 =
std::make_shared<ManualParameter>
(model.
getMoffatI0
());
46
auto
moffat_index =
std::make_shared<ManualParameter>
(model.
getMoffatIndex
());
47
auto
minkowski_exponent =
std::make_shared<ManualParameter>
(model.
getMinkowksiExponent
());
48
auto
flat_top_offset =
std::make_shared<ManualParameter>
(model.
getTopOffset
());
49
double
size = model.
getSize
();
50
auto
x_scale =
std::make_shared<ManualParameter>
(model.
getXScale
());
51
auto
y_scale=
std::make_shared<ManualParameter>
(model.
getYScale
());
52
auto
moffat_rotation=
std::make_shared<ManualParameter>
(model.
getMoffatRotation
());
53
54
// Moffat model
55
std::vector<std::unique_ptr<ModelComponent>
> component_list {};
56
auto
moff =
Euclid::make_unique<FlattenedMoffatComponent>
(moffat_i0, moffat_index, minkowski_exponent, flat_top_offset);
57
component_list.
clear
();
58
component_list.
emplace_back
(
std::move
(moff));
59
60
m_model
=
std::make_shared<ExtendedModel<ImageInterfaceTypePtr>
>(
61
std::move
(component_list), x_scale, y_scale, moffat_rotation, size, size, x, y);
62
}
63
64
65
}
ExtendedModel.h
FlattenedMoffatComponent.h
ImageInterfaceTraits.h
ManualParameter.h
MoffatModelEvaluator.h
MoffatModelFitting.h
SourceXtractor::MoffatModelEvaluator::MoffatModelEvaluator
MoffatModelEvaluator(const MoffatModelFitting &model)
Definition
MoffatModelEvaluator.cpp:40
SourceXtractor::MoffatModelEvaluator::m_model
std::shared_ptr< ModelFitting::ExtendedModel< ImageInterfaceTypePtr > > m_model
Definition
MoffatModelEvaluator.h:48
SourceXtractor::MoffatModelEvaluator::m_iterations
unsigned m_iterations
Definition
MoffatModelEvaluator.h:49
SourceXtractor::MoffatModelFitting
Definition
MoffatModelFitting.h:32
SourceXtractor::MoffatModelFitting::getMoffatI0
SeFloat getMoffatI0() const
Definition
MoffatModelFitting.h:69
SourceXtractor::MoffatModelFitting::getY
SeFloat getY() const
Definition
MoffatModelFitting.h:65
SourceXtractor::MoffatModelFitting::getMinkowksiExponent
SeFloat getMinkowksiExponent() const
Definition
MoffatModelFitting.h:77
SourceXtractor::MoffatModelFitting::getTopOffset
SeFloat getTopOffset() const
Definition
MoffatModelFitting.h:81
SourceXtractor::MoffatModelFitting::getMoffatRotation
SeFloat getMoffatRotation() const
Definition
MoffatModelFitting.h:97
SourceXtractor::MoffatModelFitting::getYScale
SeFloat getYScale() const
Definition
MoffatModelFitting.h:93
SourceXtractor::MoffatModelFitting::getXScale
SeFloat getXScale() const
Definition
MoffatModelFitting.h:89
SourceXtractor::MoffatModelFitting::getIterations
unsigned int getIterations() const
Definition
MoffatModelFitting.h:101
SourceXtractor::MoffatModelFitting::getMoffatIndex
SeFloat getMoffatIndex() const
Definition
MoffatModelFitting.h:73
SourceXtractor::MoffatModelFitting::getX
SeFloat getX() const
Definition
MoffatModelFitting.h:61
SourceXtractor::MoffatModelFitting::getSize
SeFloat getSize() const
Definition
MoffatModelFitting.h:85
std::vector::clear
T clear(T... args)
std::vector::emplace_back
T emplace_back(T... args)
std::make_shared
T make_shared(T... args)
std::move
T move(T... args)
Euclid::make_unique
std::unique_ptr< T > make_unique(Args &&... args)
SourceXtractor
Definition
Aperture.h:30
std::vector
Generated by
1.14.0