rayoptics.gui.roafile module
Read an .roa file and return a OpticalModel instance
- preprocess_roa(file_name, str_replacements)[source]
Read and preprocess raw roa text file, returning preprocessed text.
- postprocess_roa(opt_model, file_path, **kwargs)[source]
Post processing for raw optical_model, including sync_to_restore.
- save_updated_roa(file_path: Path, opt_model)[source]
rename file_path to file_path_version# and save new file_path version
- open_roa(file_name, mapping=None, **kwargs)[source]
open a ray-optics file and populate an optical model with the data
- Parameters:
file_name (str) – a filename with a .roa extension
mapping – dict mapping old modules to new. If None, use module_repl_050
- Returns:
if successful, an OpticalModel instance, otherwise, None