visisipy.optiland.models#

Build eye models in Optiland.

Classes#

OptilandEye

Eye model in Optiland.

Module Contents#

class visisipy.optiland.models.OptilandEye(eye_model: visisipy.EyeModel)#

Bases: visisipy.models.BaseEye

Eye model in Optiland.

property eye_model: visisipy.EyeModel#

Eye model specification from which the Optiland eye model is created.

property cornea_front: visisipy.optiland.surfaces.OptilandSurface#

Cornea front surface.

property cornea_back: visisipy.optiland.surfaces.OptilandSurface#

Cornea back surface.

property pupil: visisipy.optiland.surfaces.OptilandSurface#

Pupil surface.

property lens_front: visisipy.optiland.surfaces.OptilandSurface#

Lens front surface.

property lens_back: visisipy.optiland.surfaces.OptilandSurface#

Lens back surface.

property retina: visisipy.optiland.surfaces.OptilandSurface#

Retina surface.

build(optic: optiland.optic.Optic, *, start_from_index: int = 0, replace_existing: bool = False, object_distance: float = float('inf')) None#

Create the eye in Optiland.

Create the eye model in the provided optical system optic, starting from start_from_index. If replace_existing is set to True, existing surfaces will be overwritten.

Parameters:
opticOptic

Optiland Optic in which the eye model is created.

start_from_indexint

Index of the surface after which the eye model will be built.

replace_existingbool

If True, replaces existing surfaces instead of inserting new ones. Defaults to False.

object_distancefloat, optional

Distance from the object surface (or the surface before the eye model) to the eye model. Defaults to infinity.

Raises:
ValueError

If object_distance is set to a finite value while the optical system is not empty. If start_from_index is greater than the index of the last surface in the optical system. If the pupil is not located at the stop position after building the eye model. If the retina is not located at the image position after building the eye model.