SourceXtractorPlusPlus 0.21
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
IsophotalFluxTask.cpp
Go to the documentation of this file.
1
17/*
18 * IsophotalTask.cpp
19 *
20 * Created on: Sep 28, 2016
21 * Author: mschefer
22 */
23
28
30
31namespace SourceXtractor {
32
34 const auto& detection_frame_info = source.getProperty<DetectionFrameInfo>();
35 const auto& pixel_values = source.getProperty<DetectionFramePixelValues>().getValues();
36 const auto& pixel_variances = source.getProperty<DetectionFramePixelValues>().getVariances();
37
38 SeFloat total_flux = 0.0;
40
41 auto variance_iter = pixel_variances.begin();
42 for (auto value : pixel_values) {
43 auto variance = *variance_iter++;
44
45 total_flux += value;
47 }
48
49 // Add variance from gain
50 SeFloat gain = detection_frame_info.getGain();
51 if (gain > 0.0) {
52 total_variance += total_flux / gain;
53 }
54
56
58 auto mag_error = 1.0857 * flux_error / total_flux;
59
61}
62
63}
64
65
The values of a Source's pixels in the detection image. They are returned as a vector in the same ord...
void computeProperties(SourceInterface &source) const override
Computes one or more properties for the Source.
Computes the isophotal flux and magnitude.
The SourceInterface is an abstract "source" that has properties attached to it.
T log10(T... args)
T quiet_NaN(T... args)
T sqrt(T... args)