SourceXtractorPlusPlus  0.15
Please provide a description of the project.
CompactModelBase.h
Go to the documentation of this file.
1 /*
2  * CompactModelBase.h
3  *
4  * Created on: Aug 19, 2019
5  * Author: mschefer
6  */
7 
8 #ifndef _MODELFITTING_MODELS_COMPACTMODELBASE_H_
9 #define _MODELFITTING_MODELS_COMPACTMODELBASE_H_
10 
13 
14 #include "SEUtils/Mat22.h"
15 
16 namespace ModelFitting {
17 
18 using SExtractor::Mat22;
19 
20 template <typename ImageType>
21 class CompactModelBase : public ExtendedModel<ImageType> {
22 
23 public:
25  std::shared_ptr<BasicParameter> rotation, double width, double height,
28 
29  virtual ~CompactModelBase() = default;
30 
31 protected:
33 
34  template<typename ModelEvaluator>
35  float samplePixel(const ModelEvaluator& model_eval, int x, int y, unsigned int subsampling) const;
36 
37  template<typename ModelEvaluator>
38  float sampleStochastic(const ModelEvaluator& model_eval, int x, int y, unsigned int samples=100) const;
39 
40  template<typename ModelEvaluator>
41  float adaptiveSamplePixel(const ModelEvaluator& model_eval, int x, int y, unsigned int max_subsampling, float threshold=1.1) const;
42 
43  double getMaxRadiusSqr(std::size_t size_x, std::size_t size_y, const Mat22& transform) const;
44 
45  void renormalize(ImageType& image, double flux) const;
46 
47  // Jacobian transform
50 
51 private:
55 };
56 
57 }
58 
60 
61 
62 #endif /* _MODELFITTING_MODELS_COMPACTMODELBASE_H_ */
ModelFitting::CompactModelBase::m_jacobian
Mat22 m_jacobian
Definition: CompactModelBase.h:48
ModelFitting::CompactModelBase::adaptiveSamplePixel
float adaptiveSamplePixel(const ModelEvaluator &model_eval, int x, int y, unsigned int max_subsampling, float threshold=1.1) const
std::shared_ptr
STL class.
ModelFitting::CompactModelBase::m_y_scale
std::shared_ptr< BasicParameter > m_y_scale
Definition: CompactModelBase.h:53
std::tuple< double, double, double, double >
Mat22.h
CompactModelBase.icpp
ModelFitting::CompactModelBase::sampleStochastic
float sampleStochastic(const ModelEvaluator &model_eval, int x, int y, unsigned int samples=100) const
ModelFitting::CompactModelBase
Definition: CompactModelBase.h:21
pixel_scale
const double pixel_scale
Definition: TestImage.cpp:74
ModelFitting::CompactModelBase::samplePixel
float samplePixel(const ModelEvaluator &model_eval, int x, int y, unsigned int subsampling) const
ModelFitting::CompactModelBase::m_inv_jacobian
Mat22 m_inv_jacobian
Definition: CompactModelBase.h:49
BasicParameter.h
ModelFitting::CompactModelBase::getCombinedTransform
Mat22 getCombinedTransform(double pixel_scale) const
ModelFitting::CompactModelBase::renormalize
void renormalize(ImageType &image, double flux) const
ModelFitting::CompactModelBase::~CompactModelBase
virtual ~CompactModelBase()=default
x
std::shared_ptr< DependentParameter< std::shared_ptr< EngineParameter > > > x
Definition: MoffatModelFittingTask.cpp:94
ModelFitting::CompactModelBase::m_x_scale
std::shared_ptr< BasicParameter > m_x_scale
Definition: CompactModelBase.h:52
ModelFitting::ExtendedModel
Definition: ExtendedModel.h:39
SourceXtractor::transform
std::pair< double, double > transform(int x, int y, const std::array< double, 4 > &t)
Definition: TransformedAperture.cpp:46
std::size_t
ModelFitting::CompactModelBase::m_rotation
std::shared_ptr< BasicParameter > m_rotation
Definition: CompactModelBase.h:54
y
std::shared_ptr< DependentParameter< std::shared_ptr< EngineParameter > > > y
Definition: MoffatModelFittingTask.cpp:94
ModelFitting
Definition: AsinhChiSquareComparator.h:30
ModelFitting::CompactModelBase::CompactModelBase
CompactModelBase(std::shared_ptr< BasicParameter > x_scale, std::shared_ptr< BasicParameter > y_scale, std::shared_ptr< BasicParameter > rotation, double width, double height, std::shared_ptr< BasicParameter > x, std::shared_ptr< BasicParameter > y, std::tuple< double, double, double, double > transform)
SExtractor::Mat22
Definition: Mat22.h:19
PositionedModel.h
ModelFitting::CompactModelBase::getMaxRadiusSqr
double getMaxRadiusSqr(std::size_t size_x, std::size_t size_y, const Mat22 &transform) const