SourceXtractorPlusPlus
0.21
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
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
#include "
SEFramework/Image/ImageAccessor.h
"
27
#include "
SEImplementation/Property/PixelCoordinateList.h
"
28
#include "
SEImplementation/CheckImages/CheckImages.h
"
29
30
#include "
SEImplementation/Plugin/DetectionFrameInfo/DetectionFrameInfo.h
"
31
#include "
SEImplementation/Plugin/MoffatModelFitting/MoffatModelFitting.h
"
32
#include "
SEImplementation/Plugin/MoffatModelFitting/MoffatModelEvaluator.h
"
33
34
#include "
SEImplementation/CheckImages/MoffatCheckImage.h
"
35
36
namespace
SourceXtractor
{
37
38
using namespace
ModelFitting
;
39
40
void
MoffatCheckImage::handleMessage
(
const
SourceGroupInterface
&
group
) {
41
auto
hdu_index
=
group
.cbegin()->getProperty<
DetectionFrameInfo
>().getHduIndex();
42
auto
check_image
=
CheckImages::getInstance
().getMoffatImage(
hdu_index
);
43
ImageAccessor<SeFloat>
check_accessor
(
check_image
);
44
45
if
(
check_image
!=
nullptr
) {
46
for
(
auto
&
source
:
group
) {
47
auto
& model =
source
.getProperty<
MoffatModelEvaluator
>();
48
49
if
(model.getIterations() == 0) {
50
continue
;
51
}
52
53
for
(
int
y
=0;
y
<
check_image
->getHeight();
y
++) {
54
for
(
int
x
=0;
x
<
check_image
->getWidth();
x
++) {
55
check_image
->setValue(
x
,
y
,
check_accessor
.getValue(
x
,
y
) + model.getValue(
x
- 0.5,
y
- 0.5));
56
}
57
}
58
}
59
}
60
}
61
62
}
63
64
65
CheckImages.h
DetectionFrameInfo.h
ImageAccessor.h
MoffatCheckImage.h
MoffatModelEvaluator.h
x
std::shared_ptr< DependentParameter< std::shared_ptr< EngineParameter > > > x
Definition
MoffatModelFittingTask.cpp:94
y
std::shared_ptr< DependentParameter< std::shared_ptr< EngineParameter > > > y
Definition
MoffatModelFittingTask.cpp:94
MoffatModelFitting.h
PixelCoordinateList.h
SourceGroupInterface.h
SourceXtractor::CheckImages::getInstance
static CheckImages & getInstance()
Definition
CheckImages.h:158
SourceXtractor::DetectionFrameInfo
Definition
DetectionFrameInfo.h:29
SourceXtractor::MoffatCheckImage::handleMessage
void handleMessage(const SourceGroupInterface &group) override
Definition
MoffatCheckImage.cpp:40
SourceXtractor::MoffatModelEvaluator
Definition
MoffatModelEvaluator.h:35
SourceXtractor::SourceGroupInterface
Defines the interface used to group sources.
Definition
SourceGroupInterface.h:38
std::function
ModelFitting
Definition
AsinhChiSquareComparator.h:30
SourceXtractor
Definition
Aperture.h:30
Generated by
1.10.0