zospy.analyses.old.polarization.polarization_pupil_map

zospy.analyses.old.polarization.polarization_pupil_map#

zospy.analyses.old.polarization.polarization_pupil_map(oss: OpticStudioSystem, jx: float = 1, jy: float = 0, x_phase: float = 0, y_phase: float = 0, wavelength: int = 1, field: int = 1, surface: str | int = 'Image', sampling: str | int = '11x11', add_configs: str = '', sub_configs: str = '', oncomplete: OnComplete | str = OnComplete.Close, cfgoutfile: str | None = None, txtoutfile: str | None = None) AnalysisResult#

Wrapper around the OpticStudio Polarization Pupil Map Analysis.

Due to limitations in the ZOS-API, the output is obtained by writing the OpticStudio results to a file and subsequently reading in this file

Parameters:
osszospy.zpcore.OpticStudioSystem

A ZOSPy OpticStudioSystem instance. Should be sequential.

jxfloat

Jones x electric field. Defaults to 1.

jyfloat

Jones y electric field. Defaults to 0.

x_phasefloat

Phase of the X component of the Jones electric field in degrees. Defaults to 0.

y_phasefloat

Phase of the Y component of the Jones electric field in degrees. Defaults to 0.

wavelengthint

The wavelength number that is to be used. Should be an integer specifying the wavelength number. Defaults to 1.

fieldint

The field number that is to be used. Must be an integer specifying the field number. Defaults to 1.

surfacestr or int

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

samplingstr or int

The size of the used grid, either string (e.g. ‘65x65’) or int. The integer will be treated as if obtained from zospy.constants.Analysis.SampleSizes_ContrastLoss. Defaults to ‘11x11’.

add_configsstr

The add configs string.

sub_configsstr

The subtract configs string.

oncompletestr

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

cfgoutfilestr or 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. Defaults to None.

txtoutfilestr or 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 Polarization Pupil Map. Next to the standard data, the raw text return obtained from the analysis will be present under ‘RawTextData’, and the txtoutfile under ‘TxtOutFile’.