SourceXtractorPlusPlus  0.15
Please provide a description of the project.
SNRRatioSourceTask.h
Go to the documentation of this file.
1 
25 #ifndef _SEIMPLEMENTATION_PLUGIN_SNRRATIOSOURCETASK_H_
26 #define _SEIMPLEMENTATION_PLUGIN_SNRRATIOSOURCETASK_H_
27 
31 
32 namespace SourceXtractor {
34 public:
35  virtual ~SNRRatioSourceTask() = default;
36 
37  virtual void computeProperties(SourceInterface& source) const {
38  // get the input quantities
39  const auto& iso_flux = source.getProperty<IsophotalFlux>().getFlux();
40  const auto& iso_flux_error = source.getProperty<IsophotalFlux>().getFluxError();
41 
42  // compute and store the property
43  SeFloat snr_ratio = iso_flux / iso_flux_error;
44  source.setProperty<SNRRatio>(snr_ratio);
45  };
46 private:
47 }; // End of SNRRatioSourceTask class
48 } // namespace SourceXtractor
49 
50 #endif /* _SEIMPLEMENTATION_PLUGIN_SNRRATIOSOURCETASK_H_ */
51 
52 
Computes the isophotal flux and magnitude.
Definition: IsophotalFlux.h:36
virtual void computeProperties(SourceInterface &source) const
Computes one or more properties for the Source.
virtual ~SNRRatioSourceTask()=default
The SourceInterface is an abstract "source" that has properties attached to it.
const PropertyType & getProperty(unsigned int index=0) const
Convenience template method to call getProperty() with a more user-friendly syntax.
A Task that acts on a Source to compute one or more properties.
Definition: SourceTask.h:36
SeFloat32 SeFloat
Definition: Types.h:32