8 #ifndef _MODELFITTING_MODELS_COMPACTMODELBASE_H_
9 #define _MODELFITTING_MODELS_COMPACTMODELBASE_H_
16 namespace ModelFitting {
20 template <
typename ImageType>
34 template<
typename ModelEvaluator>
35 float samplePixel(
const ModelEvaluator& model_eval,
int x,
int y,
unsigned int subsampling)
const;
37 template<
typename ModelEvaluator>
38 float sampleStochastic(
const ModelEvaluator& model_eval,
int x,
int y,
unsigned int samples=100)
const;
40 template<
typename ModelEvaluator>
41 float adaptiveSamplePixel(
const ModelEvaluator& model_eval,
int x,
int y,
unsigned int max_subsampling,
float threshold=1.1)
const;
45 void renormalize(ImageType& image,
double flux)
const;
float samplePixel(const ModelEvaluator &model_eval, int x, int y, unsigned int subsampling) const
std::shared_ptr< BasicParameter > m_x_scale
std::shared_ptr< BasicParameter > m_rotation
double getMaxRadiusSqr(std::size_t size_x, std::size_t size_y, const Mat22 &transform) const
Mat22 getCombinedTransform(double pixel_scale) const
float adaptiveSamplePixel(const ModelEvaluator &model_eval, int x, int y, unsigned int max_subsampling, float threshold=1.1) const
std::shared_ptr< BasicParameter > m_y_scale
void renormalize(ImageType &image, double flux) const
virtual ~CompactModelBase()=default
float sampleStochastic(const ModelEvaluator &model_eval, int x, int y, unsigned int samples=100) const
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)