SourceXtractorPlusPlus  0.16
Please provide a description of the project.
Public Types | Public Member Functions | List of all members
ModelFitting::SharpRegionManager Class Referenceabstract

#include <SharpRegionManager.h>

Inheritance diagram for ModelFitting::SharpRegionManager:
[legend]

Public Types

using Profile = std::function< double(double)>
 

Public Member Functions

virtual ~SharpRegionManager ()=default
 
virtual void updateRasterizationInfo (double scale, double r_max, Profile profile)=0
 
virtual bool insideSharpRegion (double r)=0
 
virtual std::pair< double, int > nextRadiusAndAngleNo (double prev_r)=0
 

Detailed Description

Interface for sampling strategies.

@description For relatively flat portions of a function, just getting the value of the function at the center of a pixel and multiplying by its area can be a good enough estimation, but for sharp "peaky" areas this approach is not good, as we may be over or under estimating the integrated value for the area of that pixel.

Note
This assumes a circular, symmetric profile

Definition at line 44 of file SharpRegionManager.h.

Member Typedef Documentation

◆ Profile

Profile of the sampled function.

Definition at line 51 of file SharpRegionManager.h.

Constructor & Destructor Documentation

◆ ~SharpRegionManager()

virtual ModelFitting::SharpRegionManager::~SharpRegionManager ( )
virtualdefault

Destructor

Member Function Documentation

◆ insideSharpRegion()

virtual bool ModelFitting::SharpRegionManager::insideSharpRegion ( double  r)
pure virtual
Parameters
rDistance to the origin of the function
Returns
True if the distance falls within the sharp region

Implemented in ModelFitting::OnlySmooth, ModelFitting::OldSharp, and ModelFitting::AutoSharp.

◆ nextRadiusAndAngleNo()

virtual std::pair<double, int> ModelFitting::SharpRegionManager::nextRadiusAndAngleNo ( double  prev_r)
pure virtual

Computes the next sampling distance, and how many points around the circumference must be sampled at this distance.

Parameters
prev_rPrevious sampling distance. 0 for the first call.
Returns
A pair, where the first element is the distance from the center (radius), and the second is the number of sample points are to be taken: if, for instance, it were 4, then four samples must be taken at angles 0, pi/4, pi and pi*3/4

Implemented in ModelFitting::OnlySmooth, ModelFitting::OldSharp, and ModelFitting::AutoSharp.

◆ updateRasterizationInfo()

virtual void ModelFitting::SharpRegionManager::updateRasterizationInfo ( double  scale,
double  r_max,
Profile  profile 
)
pure virtual

Allows the region manager to update whatever internal information it needs to decide on the sharp region that needs sampling.

Parameters
scalePixel scale
r_maxLimit the sampling region to this value
profileProfile to be oversampled. It can be used to adjust to the actual function.

Implemented in ModelFitting::OnlySmooth, ModelFitting::OldSharp, and ModelFitting::AutoSharp.


The documentation for this class was generated from the following file: