SourceXtractorPlusPlus 0.21
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
MoffatCriteria.cpp
Go to the documentation of this file.
1
17/*
18 * MoffatCriteria.cpp
19 *
20 * Created on: 2019 M01 25
21 * Author: mschefer
22 */
23
27
30
31namespace SourceXtractor {
32
33using namespace ModelFitting;
34
36 auto& extended_model = impactor.getProperty<MoffatModelEvaluator>();
37 if (extended_model.getIterations() == 0) {
38 return false;
39 }
40
41 auto& centroid = impactee.getProperty<PixelCentroid>();
42 auto& other_centroid = impactor.getProperty<PixelCentroid>();
43
44 auto dx = centroid.getCentroidX() - other_centroid.getCentroidX();
45 auto dy = centroid.getCentroidY() - other_centroid.getCentroidY();
47 return false;
48 }
49
50 auto max_value = impactee.getProperty<PeakValue>().getMaxValue();
51
52 double model_value = extended_model.getValue(centroid.getCentroidX(), centroid.getCentroidY());
53
55}
56
58 return doesImpact(first, second) || doesImpact(second, first);
59}
60
62 return {
63 PropertyId::create<PixelCentroid>(),
64 PropertyId::create<PeakValue>(),
65 PropertyId::create<MoffatModelEvaluator>(),
66 };
67}
68
69} // SourceXtractor namespace
70
71
std::shared_ptr< EngineParameter > dx
std::shared_ptr< EngineParameter > dy
bool shouldGroup(const SourceInterface &, const SourceInterface &) const override
Determines if the two sources should be grouped together.
bool doesImpact(const SourceInterface &impactor, const SourceInterface &impactee) const
std::set< PropertyId > requiredProperties() const override
Return a set of used properties so they can be pre-fetched.
The centroid of all the pixels in the source, weighted by their DetectionImage pixel values.
The SourceInterface is an abstract "source" that has properties attached to it.