主要内容

rayAberration

Compute tangential and sagittal ray aberration of optical system

Since R2026a

Description

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

rayab = rayAberration(opsys) computes the tangential and sagittal ray aberration for the optical system opsys.

example

rayab = rayAberration(opsys,Name=Value) specifies options for computing ray aberration using one or more name-value arguments. For example, NumSamples=200 specifies to compute the ray aberration at 200 evenly spaced coordinate points.

Examples

collapse all

Create an optical system that contains a double Gauss lens using the helper function createDoubleGauss. The function is attached to this example as a supporting file.

opsys = createDoubleGauss;

Compute the tangential and sagittal ray aberrations using the rayAberration object function. Display the lens distortion chart using the show object function.

rt = rayAberration(opsys);
plot_rt = show(rt);

Input Arguments

collapse all

Optical system for which to compute the ray aberration, specified as an opticalSystem object.

Name-Value Arguments

collapse all

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Example: rayAberration(NumSamples=200) specifies to compute the ray aberration at 200 evenly spaced coordinate points.

Wavelengths for which to trace rays and compute the ray aberration, specified as an M-element numeric vector. M is the number of wavelengths, and each element of the vector represents a wavelength, in nanometers. By default, the ray aberration is computed at the wavelengths specified by the Wavelengths property of the opticalSystem object opsys.

Index of the reference wavelength at which to compute the ray aberration, specified as a positive integer.

If you specify the Wavelengths name-value argument, the default index of the reference wavelength is M/2, rounded up to the nearest integer. M is the number of wavelengths in Wavelengths. If you do not specify the Wavelengths name-value argument, the default reference wavelength is the primary wavelength specified by the PrimaryWavelengthIndex property of the opticalSystem object opsys.

Field point representation of the light source for which to compute the ray aberration, specified as a FieldAngle object or a FieldPosition object.

FieldPoint valueField Point Type

FieldAngle object

Field point represents a light source that is at an infinite distance.

FieldPosition object

Field point represents a light source that is at a finite distance.

By default, the FieldPoint value is the first element of the FieldPoints property of the opticalSystem object opsys. To learn more about creating field points, see Create Field Points.

Number of evenly sampled points at which to compute ray aberration, specified as a positive integer. To produce a smoother curve, increase the number of sampled points at the expense of increased computation time.

Output Arguments

collapse all

Tangential and sagittal ray aberration values, returned as a RayAberration object. The distance between the tangential and sagittal foci points along the optical axis represents the longitudinal astigmatism.

More About

collapse all

Algorithms

collapse all

Version History

Introduced in R2026a