zospy.solvers

Contents

zospy.solvers#

OpticStudio Solvers.

zospy.solvers provides easy access to various solvers offered by OpticStudio. Solvers have the general structure solver_function(cell, *args), with cell the EditorCell of the solver, followed by the parameters for the solver.

Examples#

Make the radius of a surface variable:

>>> surface = oss.InsertNewSurfaceAt(1)
>>> zp.solvers.variable(surface.RadiusCell)

Change the refractive index of a medium:

>>> surface = oss.InsertNewSurfaceAt(1)
>>> zp.solvers.material_model(surface.MaterialCell, refractive_index=1.5)

Functions

element_power(radius_cell, power)

Solver for element power.

fixed(cell)

Sets the cell solve type to Fixed.

material_model(material_cell[, ...])

Solver for material model.

pickup_chief_ray(cell[, field, wavelength])

Chief Ray solver.

position(thickness_cell, from_surface, length)

Solver for position.

surface_pickup(cell, from_surface[, ...])

Picks up the value of cell from another surface.

variable(cell)

Sets the cell solve type to Variable.