zospy.analyses.reports.cardinal_points

zospy.analyses.reports.cardinal_points#

zospy.analyses.reports.cardinal_points(oss: OpticStudioSystem, surface_1: int, surface_2: int, oncomplete: OnComplete | str = OnComplete.Close, cfgoutfile: str | None = None, txtoutfile: str | None = None) AnalysisResult#

Wrapper around the OpticStudio Cardinal Point Analysis.

Parameters:
oss: zospy.zpcore.OpticStudioSystem

A ZOSPy OpticStudioSystem instance. Should be sequential.

surface_1: int

The surface number corresponding to the first surface of the analyzed system

surface_2: int

The surface number corresponding to the last surface of the analyzed system

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’.

cfgoutfile: str | None

The configuration file to which the current configuration is saved. If None, a temporary file will be created and deleted. If string, it should be a full system path with ‘.CFG’ as extension, after which the file will be saved in that location. (Allowing usage of this configuration file using surface_data_fromcfg()). Defaults to None.

txtoutfile: str | None

The textfile to which the OpticStudio output is saved. If None, a temporary file will be created and deleted. If string, it should be a full system path with ‘.txt’ as extension, after which the file will be saved in that location. Defaults to None.

Returns:
AnalysisResult

A SurfaceDataSettings analysis result. Next to the standard data, the raw text return obtained from the analysis will be present under ‘RawTextData’, the cfgoutfile under ‘CfgOutFile’, and the txtoutfile under ‘TxtOutFile’.