メインコンテンツ

spot

Compute spot at which rays converge in image plane

Since R2026a

Description

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

rms = spot(opsys) computes the root mean square (RMS) spot size of the location at which rays converge in the image plane of the optical system opsys.

example

rms = spot(opsys,Name=Value) specifies options using one or more name-value arguments. For example, Wavelengths=[475 550 600] specifies the wavelengths at which to compute the RMS spot size as 475, 550, and 600 nanometers.

Examples

collapse all

Create an optical system containing a camera lens by using the createDoubleGauss helper function, attached to this example as a supporting file.

opsys = createDoubleGauss;

Trace rays through the optical system using the traceRays object function.

rb = traceRays(opsys);

Display the optical system using the view2d object function, and visualize the traced rays through the system using the addRays object function.

hv = view2d(opsys);
addRays(hv,rb)

Figure contains an object of type optics.ui.opticalsystemviewer2d. The chart of type optics.ui.opticalsystemviewer2d has title 55-mm F/1.2 for 35-mm SLR.

Compute the RMS spot size using the spot object function. Visualize the spot diagram using the spotDiagram function.

spr = spot(opsys)
spr = 
  Spot with properties:

                     RMS: [0.0110 0.0059 0.0076]
    RayBundleHitPosition: {[169×2 double]  [169×2 double]  [169×2 double]}
     ChiefRayHitPosition: [3×2 double]
              FieldPoint: [1×1 optics.fieldpoint.FieldAngle]
             Wavelengths: [486.1340 587.5618 656.2810]

spotDiagram(spr);

Figure contains an object of type optics.chart.spotdiagram. The chart of type optics.chart.spotdiagram has title Spot Diagram.

Input Arguments

collapse all

Optical system for which to compute RMS spot size, 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: spot(Wavelengths=[475 550 600]) specifies the wavelengths at which to compute the RMS spot size as 475, 550, and 600 nanometers.

Field point representation of the light source, specified as an N-by-1 vector of FieldAngle objects or an N-by-1 vector of FieldPosition objects. N is the number of field points specified using the fieldPoint function. Each field point directly or indirectly defines the location of a light source. Depending on the value of FieldPoint you specify, FieldPoint represents one of these field point types:

Field Point TypeFieldPoints value
Field points represent light sources that are at an infinite distance.

N-by-1 vector of FieldAngle objects

Field points represent light sources that are at an finite distance.

N-by-1 vector of FieldPosition objects

By default, the FieldPoint value is the first element of the FieldPoints property of the opticalSystem object opsys.

Wavelengths for which to trace rays and compute RMS spot size, specified as an M-element numeric vector. M is the number of wavelengths, and each element of the vector must be a positive numeric scalar representing the wavelength value, in nanometers. By default, function computes the RMS spot size at the primary wavelength of the optical system, represented as opsys.Wavelengths(opsys.PrimaryWavelengthIndex).

Sampling grid of the normalized coordinates at which to sample the entrance pupil, specified as a samplingGrid object. The spot function adds a ray through each coordinate point to the ray bundle. By default, the sampling grid is hexapolar with 8 concentric rings of coordinate points.

Output Arguments

collapse all

RMS spot size, returned as a Spot object.

Algorithms

The spot object function first computes the entrance pupil for each wavelength, and then computes the RMS spot size using these steps.

  1. Determine the coordinate location at which the chief ray hits the image plane.

  2. Trace rays by sampling the entrance pupil using the pupil grid specified by the SamplingGrid name-value argument, and determine the coordinate locations at which the rays hit the image plane.

  3. Compute the ray spot diagram using this equation, where (xc, yc) is the center around which to evaluate the spot size, and (xi, yi) is the location of the one of the N traced rays [1].

    RMSspot=1Ni=0i<N(xixc)2+1Ni=0i<N(yiyc)2

References

[1] "#DevOptical Part 10: RMS Spot Size." Accessed December 20, 2024. https://www.thepulsar.be/article/-devoptical-part-10--rms-spot-size/.

Version History

Introduced in R2026a