rayoptics.codev.cmdproc module

Functions to read a CODE V .seq file and populate a sequential model

fictitious_glass_decode(gc)[source]

glass code parser, allowing for greater precision of n and v

read_lens(filename, **kwargs)[source]

given a CODE V .seq filename, return an OpticalModel

Parameters:
  • filename (pathlib.Path) – a CODE V .seq file path

  • kwargs (dict) – keyword args passed to the reader functions

Returns:

an OpticalModel instance and a info tuple

process_command(cmd)[source]
log_cmd(label, tla, qlist, dlist)[source]
post_process_input(opt_model, filename, **kwargs)[source]
wvl_spec_data(optm, tla, qlist, dlist)[source]
pupil_spec_data(optm, tla, qlist, dlist)[source]
field_spec_data(optm, tla, qlist, dlist)[source]
spec_data(optm, tla, qlist, dlist)[source]
get_index_qualifier(seq_model, qtype, qlist)[source]
surface_cmd(opt_model, tla, qlist, dlist)[source]
update_surface_and_gap(opt_model, dlist, idx=None)[source]
private_catalog(optm, tla, qlist, dlist)[source]
surface_data(optm, tla, qlist, dlist)[source]
update_surface_profile(seq_model, profile_type, idx=None)[source]
profile_data(optm, tla, qlist, dlist)[source]
aperture_data(opm, tla, qlist, dlist)[source]

add aperture data, either creating a new aperture or modifying the last

aperture_data_general(opm, tla, qlist, dlist)[source]

handle the general aperture commands, add to end of list

aperture_offset(opm, tla, qlist, dlist)[source]

handle the aperture offset commands, assume last aperture in list

decenter_data(optm, tla, qlist, dlist)[source]
diffractive_optic(optm, tla, qlist, dlist)[source]
class CVGlassHandler(filename)[source]

Bases: GlassHandlerBase

Handle glass restoration during CODEV import.

This class relies on GlassHandlerBase to provide most of the functionality needed to find the requested glass or a substitute.

process_glass_data(glass_data)[source]