メインコンテンツ

radiusAtEncircledEnergy

R2026b

Compute radius at encircled PSF energy

Since R2026b

Description

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

radii = radiusAtEncircledEnergy(psfr,energyFractions) computes the radius that contains each specified fraction of total point spread function (PSF) energy. The function returns radius values for each PSF object, wavelength, and energy fraction.

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 radius that encapsulates 80% (0.8) of the total intensity distribution using the radiusAtEncircledEnergy function.

radii = radiusAtEncircledEnergy(psfr, 0.8)
radii = 
0.0061

Load the sample Double Gauss lens system using zmximport. Define a field point at an angle of 4 degrees along the x-axis and specify an array of three wavelengths (486.13 nm, 587.56 nm, and 656.28 nm).

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 radiusAtEncircledEnergy function to calculate the radial distances that encapsulate 50%, 80%, and 90% of the total energy.

psfr = psf(opsys, FieldPoints=fp, Wavelengths=lambdas, Method="Huygens");
radii = radiusAtEncircledEnergy(psfr, [0.5 0.8 0.9])
radii = 
radii(:,:,1) =

    0.0102    0.0038    0.0065


radii(:,:,2) =

    0.0156    0.0072    0.0102


radii(:,:,3) =

    0.0172    0.0132    0.0148

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.

Encircled energy fractions, specified as a real scalar or row vector of real values in the range [0, 1]. A value of 0 requests the radius for no enclosed energy, and a value of 1 requests the radius for all enclosed energy.

Data Types: double

Output Arguments

collapse all

Radii at specified encircled energy fractions, returned as an N-by-M-by-K numeric array. N is the number of PSF objects in psfr, M is the number of wavelengths, and K is the number of energy fractions in energyFractions. Units are in millimeters.

Smaller radius values for the same energy fraction indicate that more PSF energy is concentrated near the centroid.

If a PSF object contains an empty Image value, the corresponding radius values are NaN.

Data Types: double

Algorithms

The radiusAtEncircledEnergy object function computes the radius that encloses each specified fraction of normalized PSF intensity. The radius is measured from the PSF centroid for each wavelength. Use this value as an energy-based measure of PSF size, where smaller radii indicate more concentrated image energy.

Version History

Introduced in R2026b