SourceXtractorPlusPlus
0.11
Please provide a description of the project.
SEImplementation
src
lib
CheckImages
MoffatCheckImage.cpp
Go to the documentation of this file.
1
17
/*
18
* MoffatCheckImage.cpp
19
*
20
* Created on: 2019 M02 5
21
* Author: mschefer
22
*/
23
24
25
#include "
SEFramework/Source/SourceGroupInterface.h
"
26
27
#include "
SEImplementation/Property/PixelCoordinateList.h
"
28
#include "
SEImplementation/CheckImages/CheckImages.h
"
29
30
#include "
SEImplementation/Plugin/MoffatModelFitting/MoffatModelFitting.h
"
31
#include "
SEImplementation/Plugin/MoffatModelFitting/MoffatModelEvaluator.h
"
32
33
#include "
SEImplementation/CheckImages/MoffatCheckImage.h
"
34
35
namespace
SourceXtractor
{
36
37
using namespace
ModelFitting
;
38
39
void
MoffatCheckImage::handleMessage
(
const
std::shared_ptr<SourceGroupInterface>
& group) {
40
if
(m_check_image) {
41
42
for
(
auto
& source : *group) {
43
auto
& model = source.getProperty<
MoffatModelEvaluator
>();
44
45
if
(model.getIterations() == 0) {
46
continue
;
47
}
48
49
std::lock_guard<std::mutex>
lock
(
CheckImages::getInstance
().m_access_mutex);
50
for
(
int
y
=0;
y
<m_check_image->getHeight();
y
++) {
51
for
(
int
x
=0;
x
<m_check_image->getWidth();
x
++) {
52
m_check_image->setValue(
x
,
y
, m_check_image->getValue(
x
,
y
) + model.getValue(
x
- 0.5,
y
- 0.5));
53
}
54
}
55
}
56
}
57
}
58
59
}
60
61
62
PixelCoordinateList.h
std::lock
T lock(T... args)
std::shared_ptr< SourceGroupInterface >
CheckImages.h
SourceGroupInterface.h
std::lock_guard
STL class.
SourceXtractor::CheckImages::getInstance
static CheckImages & getInstance()
Definition:
CheckImages.h:114
SourceXtractor
Definition:
Aperture.h:30
SourceXtractor::MoffatModelEvaluator
Definition:
MoffatModelEvaluator.h:35
MoffatCheckImage.h
MoffatModelFitting.h
SourceXtractor::MoffatCheckImage::handleMessage
virtual void handleMessage(const std::shared_ptr< SourceGroupInterface > &group)
Definition:
MoffatCheckImage.cpp:39
x
std::shared_ptr< DependentParameter< std::shared_ptr< EngineParameter > > > x
Definition:
MoffatModelFittingTask.cpp:93
y
std::shared_ptr< DependentParameter< std::shared_ptr< EngineParameter > > > y
Definition:
MoffatModelFittingTask.cpp:93
ModelFitting
Definition:
AsinhChiSquareComparator.h:30
MoffatModelEvaluator.h
Generated by
1.8.18