Contenuto principale

addWavefrontPeakToValley

R2026b

Add peak‑to‑valley 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.

addWavefrontPeakToValley(mf) adds a peak‑to‑valley wavefront error metric with default properties to the optical merit function mf.

example

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

Examples

collapse all

Create an optical merit function.

mf = opticalMeritFunction;

Add a peak‑to‑valley wavefront error metric to the optical merit function.

addWavefrontPeakToValley(mf)
ans = 
  opticalMeritFunction with properties:

         Metrics: [1×1 optics.metric.WavefrontPeakToValley]
         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: addWavefrontPeakToValley(mf,Target=[0 0.25]) specifies a target peak-to-valley wavefront error range of 0 to 0.25 waves.

Target peak-to-valley wavefront 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 wavefront, 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 peak-to-valley 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