| 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.
Heating lengths are specified in millimetres. The sampled radius is
normalised to its initial value.
"""
import matplotlib.pyplot as plt
from SuPyMode import Taper, ureg
fig, ax = plt.subplots()
for heating_length_mm in (4, 8, 12):
heating_length = heating_length_mm * ureg.millimeter
taper = Taper(
initial_radius=1 * ureg.meter, symmetric=False, add_end_of_taper_section=False
)
taper.add_taper_segment(
alpha=0.2, initial_heating_length=heating_length, stretching_length=4 * ureg.millimeter
)
taper.initialize()
ax.plot(
taper.distance * 1e3, taper.itr_list, label=f"{heating_length_mm: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.

