File IO#

This section covers Optiland functionality related to reading and writing various file formats, including Zemax, CODE V, and Optiland files.

The optiland.fileio package handles saving and loading of optical systems. It supports the native Optiland JSON format, as well as Zemax (.zmx), CODE V (.seq), and OSLO (.len) files

Zemax and CODE V export reject an IdealMaterial with nonzero extinction before opening the destination file, because their current glass encodings do not preserve that absorption. Save the native JSON format to retain it. The shared writer air classifier requires exactly unit index and zero extinction; a small refractive-index difference is still an optical property.

optiland.fileio.load_optiland_file

Load an Optiland Optic from a JSON file.

optiland.fileio.save_optiland_file

Save an Optiland Optic to a JSON file.

optiland.fileio.zemax

Zemax file format support for Optiland.

optiland.fileio.codev

CODE V Sequential file I/O for Optiland.

optiland.fileio.oslo

OSLO File I/O subpackage for Optiland.