zospy.analyses.raysandspots.ray_fan

Contents

zospy.analyses.raysandspots.ray_fan#

zospy.analyses.raysandspots.ray_fan(oss: OpticStudioSystem, plot_scale: float = 0, number_of_rays: int = 20, field: str | int = 'All', wavelength: str | int = 'All', tangential: constants.Analysis.Settings.Fans.TangentialAberrationComponent | str = 'Aberration_Y', sagittal: constants.Analysis.Settings.Fans.SagittalAberrationComponent | str = 'Aberration_X', surface: str | int = 'Image', use_dashes: bool = False, vignetted_pupil: bool = True, check_apertures: bool = True, oncomplete: OnComplete | str = OnComplete.Close) AnalysisResult#

Wrapper around the OpticStudio Ray Fan Analysis.

Parameters:
oss: zospy.zpcore.OpticStudioSystem

A ZOSPy OpticStudioSystem instance. Should be sequential.

plot_scale: int | float

Sets the maximum vertical scale for the plots. When 0, automatic scaling is used. Defaults to 0.

number_of_rays: int

This is the number of rays traced on each side of the origin of the plot.

field: str or int

The field number that is to be used. Either ‘All’ or an integer specifying the field number. Defaults to ‘All’.

wavelength: str | int

The wavelength number that is to be used. Either ‘All’ or an integer specifying the wavelength number. Defaults to ‘All’.

tangential: str | int

The aberration component that is plotted for the tangential fan. Accepts sting (‘Aberration_Y’ or ‘Aberration_X’) or int (respectively 0 and 1). Defaults to ‘Aberration_Y’.

sagittal: str | int

The aberration component that is plotted for the sagittal fan. Accepts sting (‘Aberration_X’ or ‘Aberration_Y’) or int (respectively 0 and 1). Defaults to ‘Aberration_X’.

surface: str | int

The surface that is to be analyzed. Either ‘Image’, ‘Object’ or an integer. Defaults to ‘Image’.

use_dashes: bool

Defines whether solid lines or dashes are used to differentiate curves. Defaults to False.

vignetted_pupil: bool

Defines whether the pupil axis is scaled to the unvignetted pupil or not. Defaults to True.

check_apertures: bool

Defines whether only rays that pass all surface apertures are drawn or not. Defaults to True.

oncomplete: OnComplete | str

Defines behaviour upon completion of the analysis. Should be one of [‘Close’, ‘Release’, ‘Sustain’]. If ‘Close’, the analysis will be closed after completion. If ‘Release’, the analysis will remain open in OpticStudio, but the link with python will be destroyed. If ‘Sustain’ the analysis will be kept open in OpticStudio and the link with python will be sustained. To enable interaction when oncomplete == ‘Sustain’, the OpticStudio Analysis instance will be available in the returned AnalysisResult through AnalysisResult.Analysis. Defaults to ‘Close’.

Returns:
AnalysisResult

A Ray Fan result.