Simulate light through weakly guiding waveguides using the finite-differences beam propagation method on an adaptive mesh.
The master branch includes the raw files of the beam propagation code. For a packaged version of the code, you can use the "package" branch. Just run <pip install git+https://github.com/jw-lin/lightbeam.git@package>. You will also need the following packages: NumPy, SciPy, Matplotlib, Numba, and Numexpr.
A jupyter notebook tutorial is provided in the folder. For Python script examples, check out run_bpm_example.py and the associated config file config_example.py.
This material is based upon work supported by the National Science Foundation Graduate Research Fellowship Program under Grant DGE-203483, as well as by the National Science Foundation under Grant 2109232.
- refactor into lightbeam (src) and scripts
- removal or splitting off into a new script of any
if __name__ == "__main__"sections of files in lightbeam - deletion of screens.py, Zernike index utilities, custom progress bars, other misc things in favor of existing functionality in hcipy, tqdm, and ipython
- new
Lanternclass with checks for if the SMFs only support one mode and if the MMF supports as many modes as there are SMFs - refactor of
Prop3D.prop2end: combineprop2endandprop2end_uniform, turn internal variables into class variables - move meshing logic into
Prop3D._remeshand propagation setup logic intoProp3D._prop_setup - experimental lib.rs stuff to replace
tri_solve_vecand eventually some of the matrix allocations and remeshing - trying to chase down the shape error in
optics.py:set_IORsq