Skip to main content
Propagation of mode in an adiabatic 2x1 modally-specific photonic lantern.

Meta

Python

Documentation Status

Scientific article

Testing

Unittest Status

Unittest coverage

Google Colab

PyPI

PyPI version

PyPI downloads

Anaconda

Anaconda version

Anaconda downloads

Latest release date

SuPyMode

This project aims to develop an useful tool design and optimize fiber optic tapered component. SuPyMode is a Python library linked to a c++ core allowing for a flexible interface and fast computing core. The library also aims to offer the end-user a great vizual tools for data analysis. To this day, SuPyMode as been proven a useful tool to develop very-short 2x1 and 3x1 modally specific photonic lantern with very low loss and cross-talk.

Features

  • Fast and efficient simulation of fiber optic tapered components.

  • User-friendly interface for easy integration into existing workflows.

  • Comprehensive visualization tools for data analysis and interpretation.

Installation

SuPyMode is available on PyPI and Anaconda. Install it with:

pip install SuPyMode
conda install SuPyMode

See the online documentation for detailed usage and additional examples.

Quick example

Below is a short example computing the mode propgation in a simple fiber.

from SuPyMode.workflow import Workflow, fiber_loader, Boundaries, BoundaryValue, DomainAlignment

wavelength = 1550e-9

fiber = fiber_loader.load_fiber('SMF28', clad_refractive_index=1.4444, remove_cladding=False)

boundaries = [
   Boundaries(right=BoundaryValue.SYMMETRIC, top=BoundaryValue.SYMMETRIC),
   Boundaries(right=BoundaryValue.SYMMETRIC, top=BoundaryValue.ANTI_SYMMETRIC)
]


workflow = Workflow(
   fiber_list=[fiber],             # List of fiber to be added in the mesh, the order matters.
   wavelength=wavelength,          # Wavelength used for the mode computation.
   resolution=80,                  # Number of point in the x and y axis [is divided by half if symmetric or anti-symmetric boundaries].
   x_bounds=DomainAlignment.LEFT,  # Mesh x-boundary structure.
   y_bounds=DomainAlignment.BOTTOM,# Mesh y-boundary structure.
   boundaries=boundaries,          # Set of symmetries to be evaluated, each symmetry add a round of simulation
   n_sorted_mode=3,                # Total computed and sorted mode.
   n_added_mode=2,                 # Additional computed mode that are not considered later except for field comparison [the higher the better but the slower].
   plot_geometry=True,             # Plot the geometry mesh before computation.
   auto_label=True,                # Auto labeling the mode. Label are not always correct and should be verified afterwards.
   itr_final=0.05,                 # Final value of inverse taper ratio to simulate
   index_scrambling=0              # Scrambling of refractive index value in order to lift mode degeneracy [useful for some analysis]
)

workflow.superset.plot(plot_type='field', itr_list=[1.0, 0.1])

workflow.superset.plot(plot_type='index')

workflow.superset.plot(plot_type='normalized-coupling')

workflow.superset.plot(plot_type='adiabatic')

Building from source

For development or manual compilation, clone the repository and run:

git submodule update --init
mkdir build && cd build
cmake ../ -G"Unix Makefiles"
sudo make install
cd ..
python -m pip install .

Testing

Run the unit tests with:

pip install SuPyMode[testing]
pytest

Citing SuPyMode

If you use SuPyMode in academic work, please cite:

@article{de2024supymode,
   title={SuPyMode: an open-source library for design and optimization of fiber optic components},
   author={de Sivry-Houle, Martin Poinsinet and Becerra Deana, Rodrigo Itzamna and Virally, St{\'e}phane and Godbout, Nicolas and Boudoux, Caroline},
   journal={Optics Continuum},
   volume={3},
   number={2},
   pages={242--255},
   year={2024},
   publisher={Optica Publishing Group}
}

Contact

For questions or contributions, contact martin.poinsinet.de.sivry@gmail.com.

Release files for SuPyMode 2.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for SuPyMode 2.2.2
File
supymode-2.2.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64 Details
supymode-2.2.2-cp312-cp312-macosx_15_0_arm64.whl CPython 3.12 CPython 3.12 macOS 15.0+ ARM64 Details
supymode-2.2.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details
supymode-2.2.2-cp311-cp311-macosx_15_0_arm64.whl CPython 3.11 CPython 3.11 macOS 15.0+ ARM64 Details

Total release size: 10.4 MB

Release files / supymode-2.2.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL supymode-2.2.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 2.7 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
f492532cca3f5527cf5f80721a0d37fc2ba8ae4ed30cff85dba2d9f9b8407f26
BLAKE2b-256 checksum
How to use checksums
a6019d349d4c00141b863bd8b88a3dc95c34d6e5afe4a34fbf0b73e7f38fc995
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release files / supymode-2.2.2-cp312-cp312-macosx_15_0_arm64.whl

Download URL supymode-2.2.2-cp312-cp312-macosx_15_0_arm64.whl
Size 3.5 MB
Tags CPython 3.12 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
314bc1d71dd753b0e2da218e0396f0edb5294f641c458112ed89c3df8238a2ab
BLAKE2b-256 checksum
How to use checksums
fd6b63f269149a5c6a3583533f332c9b8df7d3f0259c4e1d22b0bf8d42678df3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release files / supymode-2.2.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL supymode-2.2.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 1.7 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
aded586ae02f9fe70395c34b44c5208c58084bf1e54a5402c06e08bf0e51724d
BLAKE2b-256 checksum
How to use checksums
8ac9bad2e739f9b58b33d51aa7a30f927c855435589d073024e08e9eba50d70d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release files / supymode-2.2.2-cp311-cp311-macosx_15_0_arm64.whl

Download URL supymode-2.2.2-cp311-cp311-macosx_15_0_arm64.whl
Size 2.5 MB
Tags CPython 3.11 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
56780db3e08231c3f2f63532cf870facc0bf329360110b3508bc7c7023795d19
BLAKE2b-256 checksum
How to use checksums
c96445f55d1dad78a8dd34fad89468adaea794ffe23fe0a833ddc02d1d706f5d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release history Release notifications | RSS feed

This release

2.2.2 This release

4 release files

2.2.1

4 release files

2.2.0

4 release files

2.1.6

6 release files

2.1.5

6 release files

2.1.4

6 release files

2.1.3

6 release files

2.1.2

6 release files

2.1.1

6 release files

2.1.0

6 release files

2.0.4

6 release files

2.0.2

3 release files

2.0.1

3 release files

2.0.0

3 release files

1.3.0

3 release files

1.2.16

3 release files

1.2.14

3 release files

1.2.13

3 release files

1.2.10

3 release files

1.2.9

15 release files

1.2.8

15 release files

1.2.2

10 release files

1.2.1

7 release files

1.2.0

10 release files

1.1.1

10 release files

1.1.0

15 release files

1.0.9

15 release files

1.0.8

10 release files

1.0.7

6 release files

1.0.6

6 release files

1.0.4

6 release files

1.0.3

6 release files

1.0.2

6 release files

1.0.1

6 release files

1.0.0

6 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page