SourceXtractorPlusPlus  0.15
Please provide a description of the project.
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 
32 
34 
35 namespace SourceXtractor {
36 
37 using namespace ModelFitting;
38 
40  auto check_image = CheckImages::getInstance().getMoffatImage();
41  ImageAccessor<SeFloat> check_accessor(check_image);
42 
43  if (check_image != nullptr) {
44  for (auto& source : *group) {
45  auto& model = source.getProperty<MoffatModelEvaluator>();
46 
47  if (model.getIterations() == 0) {
48  continue;
49  }
50 
51  for (int y=0; y<check_image->getHeight(); y++) {
52  for (int x=0; x<check_image->getWidth(); x++) {
53  check_image->setValue(x, y, check_accessor.getValue(x, y) + model.getValue(x - 0.5, y - 0.5));
54  }
55  }
56  }
57  }
58 }
59 
60 }
61 
62 
63 
PixelCoordinateList.h
SourceXtractor::CheckImages::getMoffatImage
std::shared_ptr< WriteableImage< SeFloat > > getMoffatImage() const
Definition: CheckImages.h:94
SourceXtractor::ImageAccessor
Definition: ImageAccessor.h:41
std::shared_ptr< SourceGroupInterface >
CheckImages.h
SourceGroupInterface.h
SourceXtractor::CheckImages::getInstance
static CheckImages & getInstance()
Definition: CheckImages.h:136
SourceXtractor
Definition: Aperture.h:30
SourceXtractor::MoffatModelEvaluator
Definition: MoffatModelEvaluator.h:35
MoffatCheckImage.h
MoffatModelFitting.h
SourceXtractor::ImageAccessor::getValue
T getValue(int x, int y)
Definition: ImageAccessor.h:100
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:94
y
std::shared_ptr< DependentParameter< std::shared_ptr< EngineParameter > > > y
Definition: MoffatModelFittingTask.cpp:94
ImageAccessor.h
ModelFitting
Definition: AsinhChiSquareComparator.h:30
MoffatModelEvaluator.h