SourceXtractorPlusPlus  0.15
Please provide a description of the project.
FlexibleModelFittingTask.h
Go to the documentation of this file.
1 
17 /*
18  * FlexibleModelFittingTask.h
19  *
20  * Created on: Sep 17, 2018
21  * Author: mschefer
22  */
23 
24 #ifndef _SEIMPLEMENTATION_PLUGIN_FLEXIBLEMODELFITTING_FLEXIBLEMODELFITTINGTASK_H_
25 #define _SEIMPLEMENTATION_PLUGIN_FLEXIBLEMODELFITTING_FLEXIBLEMODELFITTINGTASK_H_
26 
28 
30 
33 
38 
39 namespace SourceXtractor {
40 
42 
43 public:
44  FlexibleModelFittingTask(const std::string &least_squares_engine,
45  unsigned int max_iterations, double modified_chi_squared_scale,
49  double scale_factor=1.0
50  );
51 
52  virtual ~FlexibleModelFittingTask();
53 
54  virtual void computeProperties(SourceGroupInterface& group) const override;
55 
56 private:
57 
58  bool isFrameValid(SourceGroupInterface& group, int frame_index) const;
59 
62 
64  SourceGroupInterface& group,
66 
67  void createParameters() const;
68 
70  double pixel_scale, FlexibleModelFittingParameterManager& manager) const;
71 
73  std::shared_ptr<const Image<SeFloat>> model, std::shared_ptr<const Image<SeFloat>> weights, int& data_points) const;
75  double pixel_scale, FlexibleModelFittingParameterManager& manager, int& total_data_points) const;
76 
77  void setDummyProperty(SourceGroupInterface& group, FlexibleModelFittingParameterManager& parameter_manager, Flags flags) const;
78 
79  // Task configuration
81  unsigned int m_max_iterations;
83 
87 
89 };
90 
91 }
92 
93 
94 
95 #endif /* _SEIMPLEMENTATION_PLUGIN_FLEXIBLEMODELFITTING_FLEXIBLEMODELFITTINGTASK_H_ */
const double pixel_scale
Definition: TestImage.cpp:74
std::vector< std::shared_ptr< FlexibleModelFittingFrame > > m_frames
void setDummyProperty(SourceGroupInterface &group, FlexibleModelFittingParameterManager &parameter_manager, Flags flags) const
SeFloat computeChiSquared(SourceGroupInterface &group, double pixel_scale, FlexibleModelFittingParameterManager &manager, int &total_data_points) const
ModelFitting::FrameModel< ImagePsf, std::shared_ptr< VectorImage< SourceXtractor::SeFloat > > > createFrameModel(SourceGroupInterface &group, double pixel_scale, FlexibleModelFittingParameterManager &manager, std::shared_ptr< FlexibleModelFittingFrame > frame) const
std::vector< std::shared_ptr< FlexibleModelFittingPrior > > m_priors
virtual void computeProperties(SourceGroupInterface &group) const override
Computes one or more properties for the SourceGroup and/or the Sources it contains.
FlexibleModelFittingTask(const std::string &least_squares_engine, unsigned int max_iterations, double modified_chi_squared_scale, std::vector< std::shared_ptr< FlexibleModelFittingParameter >> parameters, std::vector< std::shared_ptr< FlexibleModelFittingFrame >> frames, std::vector< std::shared_ptr< FlexibleModelFittingPrior >> priors, double scale_factor=1.0)
std::shared_ptr< VectorImage< SeFloat > > createWeightImage(SourceGroupInterface &group, int frame_index) const
std::vector< std::shared_ptr< FlexibleModelFittingParameter > > m_parameters
SeFloat computeChiSquaredForFrame(std::shared_ptr< const Image< SeFloat >> image, std::shared_ptr< const Image< SeFloat >> model, std::shared_ptr< const Image< SeFloat >> weights, int &data_points) const
bool isFrameValid(SourceGroupInterface &group, int frame_index) const
std::shared_ptr< VectorImage< SeFloat > > createImageCopy(SourceGroupInterface &group, int frame_index) const
void updateCheckImages(SourceGroupInterface &group, double pixel_scale, FlexibleModelFittingParameterManager &manager) const
A Task that acts on a SourceGroup to compute one or more properties.
Definition: GroupTask.h:36
Interface representing an image.
Definition: Image.h:43
Defines the interface used to group sources.
Flags
Flagging of bad sources.
Definition: SourceFlags.h:37
SeFloat32 SeFloat
Definition: Types.h:32