zospy.analyses.old.extendedscene.geometric_image_analysis

zospy.analyses.old.extendedscene.geometric_image_analysis#

zospy.analyses.old.extendedscene.geometric_image_analysis(oss: OpticStudioSystem, wavelength: Literal['All'] | int = 'All', field: int = 1, surface: Literal['Image'] | int = 'Image', field_size: float = 0, image_size: float = 50, file: str = 'LETTERF.IMA', rotation: float = 0, rays_x_1000: int = 10, show_as: constants.Analysis.GiaShowAsTypes | str = 'Surface', source: constants.Analysis.Settings.SourceGia | str = 'Uniform', number_of_pixels: int = 100, row_column_number: Literal['Center'] | int = 'Center', na: float = 0, total_watts: float = 1, parity: constants.Analysis.Settings.Parity | str = 'Even', reference: constants.Analysis.Settings.ReferenceGia | str = 'ChiefRay', use_symbols: bool = False, use_polarization: bool = False, remove_vignetting_factors: bool = True, scatter_rays: bool = False, delete_vignetted: bool = False, use_pixel_interpolation: bool = False, save_as_bim_file: str = '', oncomplete: OnComplete | str = OnComplete.Close) AnalysisResult#

Geometric image analysis.

See the OpticStudio documentation for a more in depth description of most parameters.

Parameters:
osszospy.zpcore.OpticStudioSystem

A ZOSPy OpticStudioSystem instance. Should be sequential.

wavelengthstr | int

The wavelength to use in the analysis. Either ‘All’ or an integer specifying the wavelength number. Defaults to ‘All’.

fieldint

The field to use in the analysis. Should be an integer specifying the field number. Defaults to 1.

surfacestr | int

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

field_sizefloat

The width of the image in field coordinates. Defaults to 0.

image_sizefloat
When show_as is set to ‘SpotDiagram’, this defines the size of the scale bar superimposed on the image. Else, it

defines the size of the detector used to capture the rays. Defaults to 50.

filestr

The image file used for the analysis. Must be an .IMA of .BIM file and reside in the OpticStudio images folder. Defaults to ‘LETTERF.IMA’.

rotationfloat

The rotation angle in degrees. Defaults to 0.

rays_x_1000int

The approximate amount of rays that are traced. See OpticStudio manual for further clarification. Defaults to 10.

show_asconstants.Analysis.GiaShowAsTypes | str

Defines how the result is displayed in OpticStudio. Defaults to ‘Surface’. Note that ‘SpotDiagram’ is not implmented.

sourceconstants.Analysis.Settings.SourceGia | str

Specifies how the source is defined. Defaults to ‘Uniform’.

number_of_pixelsint

The number of pixels across the width of the image. Not used when show_as is set to ‘SpotDiagram’. Defaults to 100.

row_column_numberint | str

An integer defining the row or column number used when show_as is either ‘CrossX’ or ‘CrossY’. Also accepts ‘Center’. Defaults to ‘Center’.

nafloat

The numerical aperture cut-off. Ignored if set to 0. Defaults to 0.

total_wattsfloat

The total power in watts. Defaults to 1.

parityconstants.Analysis.Settings.Parity | str

Defines how the object would appear in object space. Defaults to ‘Even’.

referenceconstants.Analysis.Settings.ReferenceGia | str

Defines the reference coordinate for the center of the plot. Defaults to ‘ChiefRay’.

use_symbolsbool

Defines whether the plot uses symbols. Only used when show-as is set to ‘SpotDiagram’. Defaults to False.

use_polarizationbool

Defines whether polarization is considered. Defaults to False.

remove_vignetting_factorsbool

Defines whether vignetting factors are automatically removed. Defaults to True.

scatter_raysbool

Defines whether rays are scattered by surfaces with scattering properties. Defaults to False.

delete_vignettedFalse

Defines whether rays vignetted by any surface are drawn. Defaults to False.

use_pixel_interpolationbool

Defines whether pixel interpolation is used. This setting has no effect when show-as is set to ‘SpotDiagram’. Defaults to False.

save_as_bim_filestr

Defines the filename used to save the output image as BIM file. This file will be stored in the OpticStudio images folder. The filename should include the .BIM extension. If set to ‘’, the image will not be saved. Not used when show_as is set to ‘SpotDiagram. Defaults to ‘’.

oncompleteOnComplete | 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 Geometric Image Analysis result.

Raises:
NotImplementedError

When show_as is set to SpotDiagram.