SourceXtractorPlusPlus  0.11
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 
SourceXtractor::IsophotalFlux
Computes the isophotal flux and magnitude.
Definition: IsophotalFlux.h:36
SourceXtractor::SeFloat
SeFloat32 SeFloat
Definition: Types.h:32
SNRRatio.h
SourceXtractor
Definition: Aperture.h:30
IsophotalFlux.h
SourceXtractor::SourceTask
A Task that acts on a Source to compute one or more properties.
Definition: SourceTask.h:36
SourceXtractor::SNRRatio
Definition: SNRRatio.h:32
SourceXtractor::SNRRatioSourceTask::~SNRRatioSourceTask
virtual ~SNRRatioSourceTask()=default
SourceXtractor::SourceInterface::getProperty
const PropertyType & getProperty(unsigned int index=0) const
Convenience template method to call getProperty() with a more user-friendly syntax.
Definition: SourceInterface.h:57
SourceXtractor::SourceInterface
The SourceInterface is an abstract "source" that has properties attached to it.
Definition: SourceInterface.h:46
SourceXtractor::SNRRatioSourceTask
Definition: SNRRatioSourceTask.h:33
SourceTask.h
SourceXtractor::SourceInterface::setProperty
void setProperty(Args... args)
Definition: SourceInterface.h:72
SourceXtractor::SNRRatioSourceTask::computeProperties
virtual void computeProperties(SourceInterface &source) const
Computes one or more properties for the Source.
Definition: SNRRatioSourceTask.h:37