visisipy.opticstudio.models#

Build and manage eye models in OpticStudio.

Classes#

OpticStudioEye

Eye model in OpticStudio.

OpticStudioReverseEye

Reverse eye model in OpticStudio.

Module Contents#

class visisipy.opticstudio.models.OpticStudioEye(eye_model: visisipy.models.EyeModel)#

Bases: BaseOpticStudioEye

Eye model in OpticStudio.

property eye_model: visisipy.models.EyeModel#

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

property cornea_front: visisipy.opticstudio.surfaces.OpticStudioSurface#

Cornea front surface.

property cornea_back: visisipy.opticstudio.surfaces.OpticStudioSurface#

Cornea back surface.

property pupil: visisipy.opticstudio.surfaces.OpticStudioSurface#

Iris / pupil surface.

property lens_front: visisipy.opticstudio.surfaces.OpticStudioSurface#

Lens front surface.

property lens_back: visisipy.opticstudio.surfaces.OpticStudioSurface#

Lens back surface.

property retina: visisipy.opticstudio.surfaces.OpticStudioSurface#

Retina surface.

build(oss: zospy.zpcore.OpticStudioSystem, *, start_from_index: int = 0, replace_existing: bool = False, object_distance: float = float('inf'))#

Create the eye in OpticStudio.

Create the eye model in the provided OpticStudioSystem oss, starting from start_from_index. The iris (pupil) is located at the STOP surface, and the retina at the IMAGE surface. For the other parts, new surfaces will be inserted by default. If replace_existing is set to True, existing surfaces will be overwritten.

Parameters:
osszospy.zpcore.OpticStudioSystem

OpticStudioSystem in which the eye model is created.

start_from_indexint

Index of the surface after which the eye model will be built. Because the pupil will be located at the stop surface, start_from_index must be smaller than the index of the stop surface.

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 the pupil is not located at the stop position. If the retina is not located at the image surface.

class visisipy.opticstudio.models.OpticStudioReverseEye(eye_model: visisipy.models.EyeModel)#

Bases: BaseOpticStudioEye

Reverse eye model in OpticStudio.

property eye_model: visisipy.models.EyeModel#

Source eye model used to construct this OpticStudio model.

property cornea_front: visisipy.opticstudio.surfaces.OpticStudioSurface#

Anterior corneal surface.

property cornea_back: visisipy.opticstudio.surfaces.OpticStudioSurface#

Posterior corneal surface.

property aqueous: visisipy.opticstudio.surfaces.OpticStudioSurface#

Aqueous surface segment.

property iris: visisipy.opticstudio.surfaces.OpticStudioSurface#

Iris stop surface.

property lens_front: visisipy.opticstudio.surfaces.OpticStudioSurface#

Anterior lens surface.

property lens_back: visisipy.opticstudio.surfaces.OpticStudioSurface#

Posterior lens surface.

property retina: visisipy.opticstudio.surfaces.OpticStudioSurface#

Retinal surface.

build(oss: zospy.zpcore.OpticStudioSystem, *, start_from_index: int = 0, replace_existing: bool = False)#

Build the reverse eye model surfaces in sequence in OpticStudio.

Raises:
ValueError

If post-build consistency checks on retina object/image placement fail.