Contenuto principale

ellipticity

R2026b

Compute ellipticity of point spread function

Since R2026b

Description

Add-On Required: This feature requires the Optical Design and Simulation Library for Image Processing Toolbox add-on.

epsilon = ellipticity(psfr) computes the ellipticity of each point spread function (PSF) intensity distribution in psfr. The function returns an ellipticity value for each PSF object and wavelength.

example

Examples

collapse all

Load the sample Double Gauss lens system using zmximport. Define a field point at an angle of 4 degrees along the x-axis, specify a wavelength of 587.56 nm, and calculate the geometric PSF.

opsys = zmximport("DoubleGaussLens.zmx");
fp = fieldPoint(Angles=[4 0]);
lambda = 587.56;
psfr = psf(opsys, FieldPoints=fp, Wavelengths=lambda, Method="Geometric");

Calculate the ellipticity of the computed PSF profile using the ellipticity function. The output value indicates how much the geometric spot shape deviates from a perfect circle.

epsilon = ellipticity(psfr)
epsilon = 
0.0288

Compute a Huygens PSF for three wavelengths and return the ellipticity for each wavelength.

opsys = zmximport("DoubleGaussLens.zmx");
fp = fieldPoint(Angles=[4 0]);
lambdas = [486.13 587.56 656.28];

Compute the Huygens PSF across all specified wavelengths by setting the Method name-value argument to "Huygens". Use the ellipticity function to return the asymmetry metric for each wavelength result.

psfr = psf(opsys,FieldPoints=fp,Wavelengths=lambdas,Method="Huygens");
epsilon = ellipticity(psfr)
epsilon = 1×3

    0.0118    0.0474    0.0143

Input Arguments

collapse all

Point spread function results, specified as a GeometricPSF object, a HuygensPSF object, or an array of PSF result objects. Create these objects by using the psf object function.

When you specify an array of PSF result objects, all objects in the array must use the same wavelengths.

Output Arguments

collapse all

PSF ellipticity, returned as an N-by-M numeric array. N is the number of PSF objects in psfr, and M is the number of wavelengths. Each value is the magnitude of the ellipticity computed from the second central moments of the corresponding PSF intensity distribution.

Values close to 0 indicate a nearly circular PSF intensity distribution. Larger values indicate greater elongation or asymmetry.

If a PSF object contains an empty Image value, the corresponding ellipticity value is NaN.

Data Types: double

Algorithms

The ellipticity object function computes ellipticity from the intensity-weighted central second moments of the PSF image. For each wavelength, the second-moment matrix describes the spread of the PSF along its principal axes. The ellipticity is derived from these principal-axis values and indicates how much the PSF deviates from a circular intensity distribution. A value of 0 indicates a circular PSF, and larger values indicate greater elongation.

Version History

Introduced in R2026b