pyrot.eye_modelling.match_with_biometry ======================================= .. py:module:: pyrot.eye_modelling.match_with_biometry .. autoapi-nested-parse:: Match the eye model to biometry data. Functions --------- .. autoapisummary:: pyrot.eye_modelling.match_with_biometry.calc_elliptical_cornea_radii pyrot.eye_modelling.match_with_biometry.calc_spherical_cornea_radii pyrot.eye_modelling.match_with_biometry.calc_iris_outerradius pyrot.eye_modelling.match_with_biometry.match_eye_model pyrot.eye_modelling.match_with_biometry.get_eye_model_geometry Module Contents --------------- .. py:function:: calc_elliptical_cornea_radii(cornea_thickness: float, iris_outerradius: float, aqueous_depth: float, iris_thickness: float, shape_factor: float) -> tuple[float, float] Calculate the required cornea AP radius to have the required AD for an elliptical cornea model. Parameters ---------- cornea_thickness : float Central corneal thickness (CCT) in cm. iris_outerradius : float Outer radius of the iris in cm. aqueous_depth : float Aqueous depth (posterior cornea to anterior lens) in cm. iris_thickness : float Thickness of the iris in cm. shape_factor : float Shape factor for the elliptical cornea model. Returns ------- cornea_ap_radius : float Anterior-posterior radius of the cornea in cm. cornea_min_radius : float Minimum radius of the cornea in cm. .. py:function:: calc_spherical_cornea_radii(cornea_thickness: float, iris_outerradius: float, aqueous_depth: float, iris_thickness: float) -> float Determine the cornea radii for a spherical cornea based on a specific AD and limbus radius. r = (a^2 + b^2)/2a with a = distance posterior corneal surface to anterior iris surface and b = limbus radius see also the folder 'documentation'. Parameters ---------- iris_outerradius : float Outer radius of the iris in cm. aqueous_depth : float Aqueous depth (posterior cornea to anterior lens) in cm. iris_thickness : float Thickness of the iris in cm. cornea_thickness : float Central corneal thickness in cm. Returns ------- cornea_outerradius : float Outer radius of the cornea in cm. Only one radius as the cornea model is a sphere. .. py:function:: calc_iris_outerradius(sclera_lr_outer_radius: float, sclera_is_outer_radius: float, sclera_ap_outer_radius: float, sclera_thickness: float, vitreous_depth_incl_lens: float, iris_thickness: float, retina_thickness: float) -> float Calculate the required iris outer radius to have the correct vitreous depth (including lens and retina). Parameters ---------- sclera_lr_outer_radius : float Outer sclera semi-axis length in the left-right direction in cm. sclera_is_outer_radius : float Outer sclera semi-axis length in the inferior-superior direction in cm. sclera_ap_outer_radius : float Outer sclera semi-axis length in the anterior-posterior direction in cm. sclera_thickness : float Thickness of the sclera in cm. vitreous_depth_incl_lens : float Vitreous depth including lens in cm. iris_thickness : float Thickness of the iris in cm. Returns ------- iris_outerradius : float Outer radius of the iris in cm. .. py:function:: match_eye_model(eye_model_generators: object, eye_model_parameters: object, biometry_data: dict, cornea_type: str) -> None Match the eye model parameters with the provided biometry data. Set the iris outer radius so that the vitreous length is correct, then set the cornea radii so that the AD is correct. Parameters ---------- eye_model_generators : object The eye model object from RayOcular. eye_model_parameters : object An object containing specific eye model parameters. biometry_data : dict Dictionary containing biometry measurements. cornea_type : str Type of cornea model ('elliptical' or 'spherical'). 'elliptical' gives an elliptical model where the AP radius differs from the LR and IS radii, which are equal 'spherical' gives a spherical model Raises ------ NotImplementedError If an unsupported cornea type is provided. .. py:function:: get_eye_model_geometry(eye_model, structure_type) Retrieve an eye model geometry generator by structure type. Parameters ---------- eye_model : object The eye model object containing geometry generators. structure_type : object The structure type to search for. Returns ------- object The geometry generator with the matching structure type.