visisipy.opticstudio.analysis.refraction#

Refraction analysis for OpticStudio.

Functions#

refraction(...)

Calculate the ocular refraction.

Module Contents#

visisipy.opticstudio.analysis.refraction.refraction(backend: visisipy.opticstudio.backend.OpticStudioBackend, field_coordinate: visisipy.types.FieldCoordinate | None = None, wavelength: float | None = None, sampling: visisipy.types.SampleSize | str | int = 64, pupil_diameter: float | None = None, field_type: visisipy.types.FieldType = 'angle', *, use_higher_order_aberrations: bool = True) tuple[visisipy.refraction.FourierPowerVectorRefraction, zospy.analyses.wavefront.zernike_standard_coefficients.ZernikeStandardCoefficientsResult]#

Calculate the ocular refraction.

The ocular refraction is calculated from Zernike standard coefficients and represented in Fourier power vector form.

Parameters:
backendOpticStudioBackend

Reference to the OpticStudio backend.

field_coordinatetuple[float, float], optional

The field coordinate for the Zernike calculation. When None, the first field in OpticStudio is used. Defaults to None.

wavelengthfloat, optional

The wavelength for the Zernike calculation. When None, the first wavelength in OpticStudio is used. Defaults to None.

samplingSampleSize | str | int, optional

The sampling for the Zernike calculation. Defaults to 64.

pupil_diameterfloat, optional

The diameter of the pupil for the refraction calculation. Defaults to the pupil diameter configured in the backend. If the aperture type is “float_by_stop_size”, the value is interpreted as the pupil diameter. For other aperture types, it is interpreted as the aperture value.

field_typeLiteral[“angle”, “object_height”], optional

The type of field to be used when setting the field coordinate. This parameter is only used when field_coordinate is specified. Defaults to “angle”.

use_higher_order_aberrationsbool, optional

If True, higher-order aberrations are used in the calculation. Defaults to True.

Returns:
FourierPowerVectorRefraction

The ocular refraction in Fourier power vector form.

ZernikeStandardCoefficientsResult

The raw ZOSPy result returned by the Zernike standard coefficients analysis.