zospy.analyses.reports.cardinal_points_fromcfg

zospy.analyses.reports.cardinal_points_fromcfg#

zospy.analyses.reports.cardinal_points_fromcfg(oss: OpticStudioSystem, cfgfile: str, oncomplete: OnComplete | str = OnComplete.Close, txtoutfile: str | None = None) AnalysisResult#

Wrapper around the OpticStudio Cardinal Point Analysis that uses a predefined configuration file.

Parameters:
oss: zospy.zpcore.OpticStudioSystem

A ZOSPy OpticStudioSystem instance. Should be sequential.

cfgfile: str

The configuration file that is to be used. Should be a full system path with ‘.CFG’ as extension.

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

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 used cfgfile will be present under ‘UsedCfgFile’, raw text return under ‘RawTextData’ and the txtoutfile under ‘TxtOutFile’.