メインコンテンツ

addWavefrontRMS

R2026b

Add RMS wavefront error metric to merit function

Since R2026b

Description

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

addWavefrontRMS(mf) adds a root-mean-square (RMS) wavefront error metric with default properties to the optical merit function mf.

addWavefrontRMS(mf,Name=Value) adds an RMS wavefront error metric with properties specified by one or more name-value arguments. For example, Target=[0 0.1] specifies a target RMS wavefront error range of 0 to 0.1 waves.

example

Examples

collapse all

Create an optical merit function.

mf = opticalMeritFunction;

Add an RMS wavefront error metric with a target RMS wavefront range of 0 to 0.1 waves to the optical merit function.

addWavefrontRMS(mf,Target=[0 0.1])
ans = 
  opticalMeritFunction with properties:

         Metrics: [1×1 optics.metric.WavefrontRMS]
         Weights: 1
    MetricsTable: [1×4 table]

Input Arguments

collapse all

Optical merit function, specified as an opticalMeritFunction 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: addWavefrontRMS(mf,Target=[0 0.1]) specifies a target RMS wavefront error range of 0 to 0.1 waves.

Target RMS wavefront error value, specified as a numeric scalar or 1-by-2 vector. The vector is of the form [lower upper], where lower and upper are the lower and upper bounds of the target RMS wavefront error, respectively. If you specify this argument as a scalar, the object considers the target metric as the upper bound. Units are in waves.

Relative weight of the metric in the merit function, specified as a positive scalar. Increase this value to increase emphasis on this metric during optimization.

Indices of the wavelengths in the optical system to evaluate, specified as a vector of positive integers. By default, the value is an empty array, and the function evaluates the metric at all wavelengths in the optical system.

Indices of the field points in the optical system to evaluate, specified as a vector of positive integers. By default, the value is an empty array, and the function evaluates the metric at all field points in the optical system.

Ray sampling pattern for RMS wavefront computation, specified as a samplingGrid object.

Descriptive name for the metric, specified as a string scalar or character vector.

Version History

Introduced in R2026b