PCL
pcl::PSFData Class Reference

PSF fit parameters. More...

#include <PSFFit.h>

Public Types

typedef PSFFitStatus::value_type psf_fit_status
 
typedef PSFunction::value_type psf_function
 

Public Member Functions

 PSFData ()=default
 
 PSFData (const PSFData &)=default
 
 PSFData (PSFData &&)=default
 
DRect Bounds () const
 
String FunctionToString () const
 
double FWHMx () const
 
double FWHMy () const
 
bool HasCelestialCoordinates () const
 
 operator bool () const
 
PSFDataoperator= (const PSFData &)=default
 
PSFDataoperator= (PSFData &&)=default
 
String StatusToString () const
 
void ToImage (Image &) const
 

Static Public Member Functions

static double FWHM (psf_function function, double sigma, double beta=2)
 

Public Attributes

double A = 0
 Function amplitude (or estimated maximum) in pixel value units.
 
double B = 0
 Local background estimate in pixel value units.
 
double beta = 0
 Moffat beta or shape parameter (dimensionless).
 
DPoint c0 = 0.0
 Centroid position in image coordinates.
 
bool celestial = false
 True iff celestial coordinates are available.
 
bool circular = false
 Circular or elliptical PSF.
 
psf_function function = PSFunction::Invalid
 Point spread function type (PSFunction namespace).
 
double mad = 0
 Goodness of fit estimate. A robust, normalized mean absolute deviation of the fitted function with respect to image pixel values over the fitting region.
 
DPoint q0 = 0.0
 Centroid equatorial coordinates, when celestial=true.
 
psf_fit_status status = PSFFitStatus::NotFitted
 Status code (PSFFitStatus namespace).
 
double sx = 0
 Function width in pixels on the X axis, sx >= sy.
 
double sy = 0
 Function width in pixels on the Y axis, sx >= sy.
 
double theta = 0
 Rotation angle of the sx axis in degrees, in the [0,180) range.
 

Detailed Description

Definition at line 147 of file PSFFit.h.

Member Typedef Documentation

◆ psf_fit_status

typedef PSFFitStatus::value_type pcl::PSFData::psf_fit_status

Represents a PSF fitting process status.

Definition at line 157 of file PSFFit.h.

◆ psf_function

typedef PSFunction::value_type pcl::PSFData::psf_function

Represents a point spread function type.

Definition at line 152 of file PSFFit.h.

Constructor & Destructor Documentation

◆ PSFData() [1/3]

pcl::PSFData::PSFData ( )
default

Default constructor.

◆ PSFData() [2/3]

pcl::PSFData::PSFData ( const PSFData )
default

Copy constructor.

◆ PSFData() [3/3]

pcl::PSFData::PSFData ( PSFData &&  )
default

Move constructor.

Member Function Documentation

◆ Bounds()

DRect pcl::PSFData::Bounds ( ) const
inline

Returns the PSF bounding rectangle. The coordinates of the bounding rectangle r are calculated as follows:

r.x0 = c0.x - d
r.y0 = c0.y - d
r.x1 = c0.x + d
r.y1 = c0.y + d
where d is equal to:

FWHMx()/2 for a circular PSF,
Max( FWHMx(), FWHMy() )/2 for an elliptic PSF.

Definition at line 288 of file PSFFit.h.

References pcl::Max().

◆ FunctionToString()

String pcl::PSFData::FunctionToString ( ) const
inline

Returns the name of the fitted PSF function. See the PSFunction namespace for supported functions.

Definition at line 212 of file PSFFit.h.

◆ FWHM()

static double pcl::PSFData::FWHM ( psf_function  function,
double  sigma,
double  beta = 2 
)
inlinestatic

Returns the full width at half maximum (FWHM) corresponding to a supported function with the specified parameters.

Parameters
functionThe type of point spread function. See the PSFunction namespace for supported functions.
sigmaEstimated function width.
betaMoffat beta or VariableShape shape parameter. Must be > 0.

The returned value is the FWHM in sigma units, or zero if an invalid or unsupported function type has been specified.

Definition at line 325 of file PSFFit.h.

References pcl::Pow(), pcl::Pow2(), and pcl::Sqrt().

◆ FWHMx()

double pcl::PSFData::FWHMx ( ) const
inline

Returns the full width at half maximum (FWHM) on the X axis in pixels.

For an elliptic PSF, the X axis corresponds to the orientation of the major function axis as projected on the image.

For a circular PSF, FWHMx() and FWHMy() are equivalent.

Definition at line 256 of file PSFFit.h.

◆ FWHMy()

double pcl::PSFData::FWHMy ( ) const
inline

Returns the full width at half maximum (FWHM) on the Y axis in pixels.

For an elliptic PSF, the Y axis corresponds to the orientation of the minor function axis as projected on the image.

For a circular PSF, FWHMx() and FWHMy() are equivalent.

Definition at line 269 of file PSFFit.h.

◆ HasCelestialCoordinates()

bool pcl::PSFData::HasCelestialCoordinates ( ) const
inline

Returns true iff this object contains valid equatorial coordinates computed by an astrometric solution of the image for the centroid coordinates.

Definition at line 299 of file PSFFit.h.

◆ operator bool()

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

Returns true iff this object contained valid PSF fitting parameters. This happens (or should happen, under normal conditions) when the status data member is equal to PSFFitStatus::FittedOk.

Definition at line 203 of file PSFFit.h.

◆ operator=() [1/2]

PSFData& pcl::PSFData::operator= ( const PSFData )
default

Copy assignment operator. Returns a reference to this object.

◆ operator=() [2/2]

PSFData& pcl::PSFData::operator= ( PSFData &&  )
default

Move assignment operator. Returns a reference to this object.

◆ StatusToString()

String pcl::PSFData::StatusToString ( ) const
inline

Returns a string with a brief description of the current fitting status.

Definition at line 233 of file PSFFit.h.

◆ ToImage()

void pcl::PSFData::ToImage ( Image ) const

Returns an image representation (in 32-bit floating point format) of the fitted point spread function.


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