zospy.analyses.systemviewers.cross_section

Contents

zospy.analyses.systemviewers.cross_section#

zospy.analyses.systemviewers.cross_section(oss: OpticStudioSystem, oncomplete: OnComplete | str = OnComplete.Release) AnalysisResult#

Wrapper around the OpticStudio Cross-Section viewer.

Parameters:
oss: zospy.zpcore.OpticStudioSystem

A ZOSPy OpticStudioSystem instance. Should be sequential.

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

Returns:
AnalysisResult

A Cross-Section analysis result. As the viewers do not return data, the AnalysisResult can mainly be used to further control the analysis when oncomplete is set to Sustain.