| Badge | Status |
|---|---|
| Python versions | |
| Documentation | |
| Tests | |
| PyPI | |
| Conda |
A package for light propagation in fiber optics.
Compute guided supermodes along a tapered optical component and study how a changing cross-section couples them. Start by comparing taper profiles at fixed stretch before solving for optical propagation.
See the usage guide for further examples and implementation details. Open the project notebook in Colab.
Requires Python >=3.11.
$ python -m pip install SuPyModeInstall from the martinpdes Conda channel:
$ conda install -c martinpdes supymodeFor an editable source installation:
$ git clone https://github.com/MartinPdeS/SuPyMode.git $ cd SuPyMode $ python -m pip install -e .
""" Compare heating lengths ======================= For the same stretch, a longer hot zone produces a gentler radius reduction. Distances and heating lengths are in metres; the radius is normalised to its initial value. This example compares profiles, not optical mode solutions. """ import matplotlib.pyplot as plt from SuPyMode.workflow import AlphaProfile fig, ax = plt.subplots() for heating_length in (4e-3, 8e-3, 12e-3): profile = AlphaProfile( initial_radius=1.0, symmetric=False, add_end_of_taper_section=False ) profile.add_taper_segment( alpha=0.2, initial_heating_length=heating_length, stretching_length=4e-3 ) profile.initialize() ax.plot( profile.distance * 1e3, profile.itr_list, label=f"{heating_length * 1e3:g} mm" ) ax.set( xlabel="Distance (mm)", ylabel="Inverse taper ratio", title="Effect of heating length", ) ax.legend(title="Heating length") plt.show()
Use the SuPyMode documentation to work through examples and look up the inputs and return values of individual functions.
Cite the SuPyMode paper in Optics Continuum when using the solver in a publication.
Bug reports, worked examples, and documentation corrections are welcome. To set up a development checkout and run the tests, follow the contributing guide.
For questions, contact Martin Poinsinet de Sivry-Houle.
See the SuPyMode license for terms of use.

