SourceXtractorPlusPlus  0.13
Please provide a description of the project.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 
26 
29 
32 
34 
35 namespace SourceXtractor {
36 
37 using namespace ModelFitting;
38 
40  auto check_image = CheckImages::getInstance().getMoffatImage();
41  if (check_image != nullptr) {
42  for (auto& source : *group) {
43  auto& model = source.getProperty<MoffatModelEvaluator>();
44 
45  if (model.getIterations() == 0) {
46  continue;
47  }
48 
49  for (int y=0; y<check_image->getHeight(); y++) {
50  for (int x=0; x<check_image->getWidth(); x++) {
51  check_image->setValue(x, y, check_image->getValue(x, y) + model.getValue(x - 0.5, y - 0.5));
52  }
53  }
54  }
55  }
56 }
57 
58 }
59 
60 
61 
std::shared_ptr< WriteableImage< SeFloat > > getMoffatImage() const
Definition: CheckImages.h:94
std::shared_ptr< DependentParameter< std::shared_ptr< EngineParameter > > > x
virtual void handleMessage(const std::shared_ptr< SourceGroupInterface > &group)
std::shared_ptr< DependentParameter< std::shared_ptr< EngineParameter > > > y
static CheckImages & getInstance()
Definition: CheckImages.h:136