SourceXtractorPlusPlus 0.21
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
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
29
33
35
36namespace SourceXtractor {
37
38using namespace ModelFitting;
39
41 auto hdu_index = group.cbegin()->getProperty<DetectionFrameInfo>().getHduIndex();
42 auto check_image = CheckImages::getInstance().getMoffatImage(hdu_index);
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
std::shared_ptr< DependentParameter< std::shared_ptr< EngineParameter > > > x
std::shared_ptr< DependentParameter< std::shared_ptr< EngineParameter > > > y
static CheckImages & getInstance()
void handleMessage(const SourceGroupInterface &group) override
Defines the interface used to group sources.