rayoptics.gui.appcmds module

generic ray optics commands for creating plots and tables

open_model(file_url, info=False, **kwargs)[source]

open a file or url and populate an optical model with the data

Parameters:
  • file_url (str) –

    a filename or url of a supported file type

    • .roa - a rayoptics JSON encoded file

    • .seq - a CODE V (TM) sequence file

    • .zmx - a Zemax (TM) lens file

    • a URL from the www.photonstophotos.net OpticalBench database

  • info (bool) – if true, return an info tuple with import statistics

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

Returns:

if successful, an OpticalModel instance, otherwise, None

create_empty_model(**kwargs)[source]

factory function returns an instance of OpticalModel

create_new_model()[source]
create_new_optical_system(efl=10.0, epd=1, fov=1.0)[source]
create_new_optical_model_from_specsheet(specsheet)[source]

create an OpticalModel with a basic thinlens model, given specsheet

update_specsheet(iid, opt_model)[source]
create_yybar_model()[source]
create_live_layout_commands(fig)[source]
create_parax_design_commands(fig)[source]
set_vignetting(opt_model, gui_parent=None, **kwargs)[source]

From existing fields and clear apertures, calculate vignetting.

set_apertures(opt_model, gui_parent=None)[source]

From existing fields and vignetting, calculate clear apertures.

set_pupil(opt_model, gui_parent=None)[source]

From existing stop size, calculate pupil spec and vignetting.

refocus(opt_model, gui_parent=None)[source]

Compute a focus shift bringing the axial marginal ray to zero.