PCL
pcl::PSFFit Class Reference

Numerical Point Spread Function (PSF) fit to a source in an image. More...

#include <PSFFit.h>

Public Types

using psf_fit_status = PSFData::psf_fit_status
 
using psf_function = PSFData::psf_function
 

Public Member Functions

 PSFFit (const ImageVariant &image, const DPoint &center, const DRect &rect, psf_function function=PSFunction::Gaussian, bool circular=false, float betaMin=1.0F, float betaMax=4.0F, double tolerance=1.0e-08, float bkgMaxVar=0.1F, float growthForFlux=1.0F)
 
 PSFFit (const PSFFit &)=default
 
 PSFFit (PSFFit &&)=default
 
 operator bool () const
 
PSFFitoperator= (const PSFFit &x)=default
 
PSFFitoperator= (PSFFit &&x)=default
 

Public Attributes

PSFData psf
 

Detailed Description

See also
StarDetector, PSFSignalEstimator, PSFScaleEstimator

Definition at line 492 of file PSFFit.h.

Member Typedef Documentation

◆ psf_fit_status

using pcl::PSFFit::psf_fit_status = PSFData::psf_fit_status

Represents a PSF fitting process status.

Definition at line 504 of file PSFFit.h.

◆ psf_function

using pcl::PSFFit::psf_function = PSFData::psf_function

Represents a point spread function type.

Definition at line 499 of file PSFFit.h.

Constructor & Destructor Documentation

◆ PSFFit() [1/3]

pcl::PSFFit::PSFFit ( const ImageVariant image,
const DPoint center,
const DRect rect,
psf_function  function = PSFunction::Gaussian,
bool  circular = false,
float  betaMin = 1.0F,
float  betaMax = 4.0F,
double  tolerance = 1.0e-08,
float  bkgMaxVar = 0.1F,
float  growthForFlux = 1.0F 
)

Fits a point spread function to a source in the specified image.

Parameters
imageThe source image.
centerThe intial search point in image coordinates. For consistent results, these coordinates must be the result of a robust object detection process.
rectThe PSF sampling region in image coordinates. This is the rectangular region of the image where the function fitting process will take place. PSF parameters will be evaluated from source pixel values acquired exclusively from this region.
functionThe point spread function type to be fitted. A Gaussian PSF is fitted by default.
circularWhether to fit a circular or an elliptical PSF. Elliptical functions are fitted by default.
betaMin,betaMaxThe range of shape parameter values when function is PSFunction::VariableShape; ignored for other point spread functions. When the values of these parameters are such that betaMin < betaMax, an optimal value of the beta (shape) PSF parameter will be searched for iteratively within the specified range. The shape parameter will be optimized for minimization of the absolute difference between the estimated PSF and the sample of source image pixels. When betaMinbetaMax, the shape parameter will stay constant and equal to the specified betaMin value during the entire PSF fitting process, and the rest of PSF parameters will be estimated accordingly. The valid range of beta parameter values is [1.0,6.0]. Values outside this range may lead to numerically unstable PSF fitting processes.
toleranceTolerance of the Levenberg-Marquardt algorithm. The default value is 1.0e-08. The valid range is from 1.0e-12 to 0.001.
bkgMaxVarMaximum relative difference allowed between the fitted local background (the B PSF parameter) and the initial local background estimated as a robust mean pixel value within the sampling region. The default value is 0.1, meaning that a maximum relative difference of 10% will be allowed. This parameter is useful to enforce stability of the PSF fitting task by constraining the range of variation of the B local background parameter with respect to a robust and efficient initial estimate.
growthForFluxGrowing factor in units of the Full Width at Tenth Maximum (FWTM) for extension/contraction of the PSF flux measurement region. The default value is 1.0.

The implementation of the Levenberg-Marquardt algorithm used internally by this function is extremely sensitive to the specified center and rect parameters. These starting parameters should always be calculated using robust procedures to achieve consistent results.

In the most frequent use case, where a star detection procedure is typically used to obtain these starting parameters, robustness to poorly sampled data and resilience to outlier pixels and noise are particularly important to this task.

◆ PSFFit() [2/3]

pcl::PSFFit::PSFFit ( const PSFFit )
default

Copy constructor.

◆ PSFFit() [3/3]

pcl::PSFFit::PSFFit ( PSFFit &&  )
default

Move constructor.

Member Function Documentation

◆ operator bool()

pcl::PSFFit::operator bool ( ) const
inline

Returns true iff this object contains a valid PSF fit, i.e. valid PSF fitted parameters.

Definition at line 605 of file PSFFit.h.

References psf.

◆ operator=() [1/2]

PSFFit& pcl::PSFFit::operator= ( const PSFFit x)
default

Copy assignment opèrator. Returns a reference to this object.

◆ operator=() [2/2]

PSFFit& pcl::PSFFit::operator= ( PSFFit &&  x)
default

Move assignment operator. Returns a reference to this object.

Member Data Documentation

◆ psf

PSFData pcl::PSFFit::psf

Fitted PSF parameters.

Definition at line 509 of file PSFFit.h.

Referenced by operator bool().


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