visisipy.analysis.refraction#
Calculate the spherical equivalent of refraction of the eye.
Functions#
|
Calculate the ocular refraction. |
Convert Zernike coefficients to ocular refraction in Fourier power vector form. |
Module Contents#
- visisipy.analysis.refraction.refraction(model: visisipy.EyeModel | None = None, field_coordinate: tuple[float, float] | None = None, sampling: visisipy.types.SampleSize | str | int = 64, wavelength: float | None = None, pupil_diameter: float | None = None, field_type: Literal['angle', 'object_height'] = 'angle', *, use_higher_order_aberrations: bool = True, return_raw_result: Literal[False] = False, backend: visisipy.backend.BaseBackend = _AUTOMATIC_BACKEND) visisipy.refraction.FourierPowerVectorRefraction#
- visisipy.analysis.refraction.refraction(model: visisipy.EyeModel | None = None, field_coordinate: tuple[float, float] | None = None, wavelength: float | None = None, sampling: visisipy.types.SampleSize | str | int = 64, pupil_diameter: float | None = None, field_type: Literal['angle', 'object_height'] = 'angle', *, use_higher_order_aberrations: bool = True, return_raw_result: Literal[True] = True, backend: visisipy.backend.BaseBackend = _AUTOMATIC_BACKEND) tuple[visisipy.refraction.FourierPowerVectorRefraction, Any]
Calculate the ocular refraction.
The ocular refraction is calculated from Zernike standard coefficients and represented in Fourier power vector form.
- Parameters:
- modelEyeModel, optional
The eye model to use for the refraction calculation. When None, the currently built model is used. Defaults to None.
- use_higher_order_aberrationsbool, optional
If True, higher-order aberrations are used in the calculation. Defaults to True.
- field_coordinatetuple[float, float], optional
The field coordinate for the Zernike calculation. When None, the default field configured in the backend is used. Defaults to None.
- wavelengthfloat, optional
The wavelength for the Zernike calculation. When None, the default wavelength configured in the backend is used. Defaults to None.
- samplingSampleSize | str | int, optional
The sampling for the Zernike calculation. Defaults to 64.
- 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”.
- pupil_diameterfloat, optional
The diameter of the pupil for the refraction calculation. Defaults to the pupil diameter configured in the model.
- return_raw_resultbool, optional
Return the raw analysis result from the backend. Defaults to False.
- backendBaseBackend
The backend to be used for the analysis. If not provided, the default backend is used.
- Returns:
- FourierPowerVectorRefraction
The ocular refraction in Fourier power vector form.
- Any
The raw analysis result from the backend.
See also
FourierPowerVectorRefractionOcular refraction in Fourier power vector form.
- visisipy.analysis.refraction.zernike_data_to_refraction(zernike_coefficients: visisipy.wavefront.ZernikeCoefficients, exit_pupil_semi_diameter: float, wavelength: float, *, use_higher_order_aberrations: bool = True) visisipy.refraction.FourierPowerVectorRefraction#
Convert Zernike coefficients to ocular refraction in Fourier power vector form.
- Parameters:
- zernike_coefficientsZernikeCoefficients
The Zernike standard coefficients, in waves.
- exit_pupil_semi_diameterfloat
The semi-diameter of the exit pupil in mm.
- wavelengthfloat
The wavelength in μm.
- use_higher_order_aberrationsbool, optional
If True, higher-order aberrations are included in the calculation. Defaults to True.
- Returns:
- FourierPowerVectorRefraction
The ocular refraction in Fourier power vector form.