Point Spread Function¶
The base class of a PSF set with CameraModel::set_psf() in place of the aperture’s
diffraction pattern. See The Point Spread Function for how the camera’s PSF is made and
drawn.
-
template<IsSpectral TSpectral>
class PSF¶ Abstract base class for point spread functions (PSF) that can be set on a camera.
A PSF set with CameraModel::set_psf() takes the place of the aperture’s diffraction pattern. It is given by evaluate(), its value at an offset from the source in pixels, and is taken as complete within radius() pixels of the source: the renderer samples it on a grid out to there (see GridPsf) and normalizes what it finds, so that every source keeps all its light. A MeasuredPSF is instead sampled where its own samples lie.
- Template Parameters:
TSpectral – The spectral type (e.g., RGB, Visible8)
Subclassed by huira::AiryDisk< TSpectral >, huira::HarveyShackScatter< TSpectral >, huira::MeasuredPSF< TSpectral >
Public Functions
-
PSF() = default¶
-
virtual ~PSF() = default¶
-
inline virtual bool is_pixel_integrated() const¶
Whether evaluate() gives the light a pixel centered at (x, y) receives, rather than the PSF’s intensity at that point.
A PSF’s intensity is integrated over each pixel. One that is already integrated over a pixel (see PSFSampling::PixelIntegrated) is instead taken at each pixel’s center, so that it is not integrated twice.
-
inline virtual bool includes_defocus() const¶
Whether the PSF already holds the defocus the camera’s focus gives, rather than being a point’s in focus, which the focus then blurs as it blurs diffraction (see PSFFocus).
-
inline int radius() const¶
How far from the source, in pixels, the PSF holds light; 0 if not set, in which case CameraModel::set_psf() gives it CameraModel::DEFAULT_PSF_RADIUS.