Editors

Each editor object reads a ZOS-API editor into dictionaries and writes those dictionaries back. OpticStudioSession calls these objects from its public methods.

SYSTEM, LENS, and MULTI are the column lists those methods use. The pages include their descriptions and omit the ZOS-API object values.

System Explorer

System Explorer setting groups.

row_editor(name: str) → tuple[str, Rows]

Return the SystemData property and row list for one editable group.

Parameters:

name (str) – fields or wavelengths.

Returns:

The property name on SystemData, and the rows to edit.

Return type:

tuple[str, Rows]

Raises:

ValueError – name is not a setting group, or that group has no row list.

setting_group(name: str) → Section | Listing

Return one System Explorer setting group.

Parameters:

name (str) – units, aperture, fields, wavelengths, environment, polarization, or ray_aiming.

Returns:

The group.

Return type:

Section | Listing

Raises:

ValueError – name is not a setting group.

SYSTEM: dict[str, Section | Listing]

System Explorer setting groups, keyed by the name passed to OpticStudioSession.system_data.

Lens Data Editor

Lens Data Editor columns and row edits.

class LensData(attributes: tuple[Attribute, ...])

Lens Data Editor columns copied for every surface.

Parameter columns depend on the surface type. read() includes the active ones.

Parameters:

attributes (tuple[Attribute, ...]) – Columns read from each surface.

attributes: tuple[Attribute, ...]

Columns read from each surface.

edit(editor, action: str, number: int | None, values: dict[str, object] | None) → None

Change, insert, or remove one surface.

add inserts at number and then writes values. type changes the surface type before the other keys. parameters maps column names such as Par1 to new values.

Parameters:
  • editor – The ZOS-API lens data editor.

  • action (str) – change, add, or remove.

  • number (int | None) – Surface number. 0 is the object surface.

  • values (dict[str, object] | None) – Keys to write. The fields are the same as those returned by read().

Raises:

ValueError – The action, number, or values cannot be applied.

read(editor, surface: int | None = None) → dict[str, object]

Read every surface, or one surface.

Parameters:
  • editor – The ZOS-API lens data editor.

  • surface (int | None) – One surface number. None reads every surface. 0 is the object surface.

Returns:

surfaces, or the one requested surface. Each surface includes parameters for the columns its type uses. The image surface omits thickness and thickness_solve. tce and tce_solve are omitted when the surface does not use the TCE column.

Return type:

dict[str, object]

Raises:

ValueError – surface is outside the editor.

LENS

Columns copied from every Lens Data Editor surface.

Multi-Configuration Editor

Multi-Configuration Editor operands and configuration columns.

class MultiConfiguration

Multi-Configuration Editor operands and configuration columns.

Parameter columns and configuration cells depend on the operand type.

edit(editor, section: str, action: str, number: int | None, values: dict[str, object] | None) → None

Change one operand or one configuration.

type changes the operand type before parameters and configuration cells are checked.

Parameters:
  • editor – The ZOS-API multi-configuration editor.

  • section (str) – operand or configuration.

  • action (str) – change, add, remove, or make_current.

  • number (int | None) – 1-based operand or configuration number.

  • values (dict[str, object] | None) – Keys to write.

Raises:

ValueError – The section, action, number, or values cannot be applied.

read(editor, operand: int | None = None) → dict[str, object]

Read the editor, or one operand.

Parameters:
  • editor – The ZOS-API multi-configuration editor.

  • operand (int | None) – One 1-based operand number. None reads the whole editor.

Returns:

current, configurations, and operands, or the one requested operand.

Return type:

dict[str, object]

Raises:

ValueError – operand is outside the editor.

MULTI

Multi-Configuration Editor operands and configuration columns.