Best Fit Ray Aberration Fan

This analysis calculates ray aberrations relative to the center of the wavefront’s best-fit sphere. This provides a measure of performance referenced to the point of optimal focus for the entire pupil, rather than to a single ray.

How it Differs from Standard RayFan

The standard RayFan calculation references aberrations to the chief ray intercept on the image plane. This reference is typically determined by tracing a paraxial chief ray.

The BestFitRayFan instead determines its reference by tracing a grid of real rays across the pupil to find the center of the best-fit sphere for the resulting wavefront. This makes it particularly useful for systems where paraxial rays cannot be traced or where paraxial calculations are otherwise invalid, offering a more robust measure of the true optimal focus. Unlike the standard RayFan, this analysis does not recenter the plot on the chief ray. The origin (0,0) is the location of the best-fit sphere center. Therefore, the plot shows all aberrations, including distortion, relative to this optimal focal point.

[1]:
from optiland.analysis import BestFitRayFan
from optiland.samples.objectives import Telephoto
[2]:
lens = Telephoto()
[3]:
_ = lens.draw()
../../_images/gallery_analysis_ray_fan_best_fit_3_0.png
[4]:
bf_ray_fan = BestFitRayFan(lens, fields=[(0, 1)])
_ = bf_ray_fan.view()
../../_images/gallery_analysis_ray_fan_best_fit_4_0.png
[5]:
ray_fan = BestFitRayFan(lens)  # plots all fields by default
_ = ray_fan.view()
../../_images/gallery_analysis_ray_fan_best_fit_5_0.png