rayoptics.gui.appcmds module

generic ray optics commands for creating plots and tables

open_model(file_url, info=False, post_process_imports=True, **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

  • post_process_imports (bool) – for lens design program file import,

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

Returns:

if successful, an OpticalModel instance, otherwise, None

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_new_ideal_imager_dialog(**inputs)[source]
create_yybar_model()[source]
get_defaults_from_gui_parent(gui_parent)[source]
create_live_layout_view(opt_model, gui_parent=None)[source]
create_live_layout_commands(fig)[source]
create_paraxial_design_view_v2(opt_model, dgm_type, gui_parent=None)[source]
create_parax_design_commands(fig)[source]
set_vignetting(opt_model, gui_parent=None)[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.

create_ray_fan_view(opt_model, data_type, gui_parent=None)[source]
create_ray_grid_view(opt_model, gui_parent=None)[source]
create_wavefront_view(opt_model, gui_parent=None)[source]
create_field_curves(opt_model, gui_parent=None)[source]
create_3rd_order_bar_chart(opt_model, gui_parent=None)[source]
create_glass_map_view(opt_model, gui_parent=None)[source]
update_table_view(table_view)[source]
create_lens_table_model(seq_model)[source]
create_element_table_model(opt_model)[source]
create_ray_table_model(opt_model, ray)[source]
create_parax_table_model(opt_model)[source]
create_parax_model_table(opt_model)[source]