Meta |
|||
Testing |
|||
PyPI |
|||
Anaconda |
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.
Metadata
Release files for SuPyMode 2.4.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
Total release size: 24.9 MB
Release files / supymode-2.4.3-cp314-cp314-win_amd64.whl
| Download URL | supymode-2.4.3-cp314-cp314-win_amd64.whl |
|---|---|
| Size | 3.0 MB |
| Tags | CPython 3.14 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
22d65dbf826ea9044aecbb84448f318b19123a8847c2e607c80ce37bd4d67e1a
|
|
BLAKE2b-256 checksum How to use checksums |
4294f2987d266ac8ed5433d4aeb44405d0dcc8e789b69abe438955b01cbaa428
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / supymode-2.4.3-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | supymode-2.4.3-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.14 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
f272d61d16127ecb8f2ac8b31c11ef040ed3a40fd2152653073ba1d50ec79196
|
|
BLAKE2b-256 checksum How to use checksums |
11dc41344d07da9dac98df140796f7c5fa8f92216e5e1a2548973e8431daf73f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / supymode-2.4.3-cp314-cp314-macosx_26_0_arm64.whl
| Download URL | supymode-2.4.3-cp314-cp314-macosx_26_0_arm64.whl |
|---|---|
| Size | 2.3 MB |
| Tags | CPython 3.14 macOS 26.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
6705e04c7f5145af9c1a4ae85724d1db6568f7d3b0d8532fd776dd942798ee0e
|
|
BLAKE2b-256 checksum How to use checksums |
75533959e8a394f06ca5ca09e054ea4a909751a7dfcdfd7e8b901fee1440cbe6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / supymode-2.4.3-cp313-cp313-win_amd64.whl
| Download URL | supymode-2.4.3-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 2.9 MB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
e522096c898cfec22a864ef0c4b6f5328358a3e883de41d539cd9d4658c7c252
|
|
BLAKE2b-256 checksum How to use checksums |
1f06cb2bd23fc36bdb775b3718d706e57bfedc539d1f9aad9ee4763fada07992
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / supymode-2.4.3-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | supymode-2.4.3-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
3c6af8663c5656760396a4c26db551757e5ab01bd274f80e0107e38a8bb73327
|
|
BLAKE2b-256 checksum How to use checksums |
f884158920909d748bc698bad49e6b8504011c52e3bb646d8704d452fc7b433a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / supymode-2.4.3-cp313-cp313-macosx_26_0_arm64.whl
| Download URL | supymode-2.4.3-cp313-cp313-macosx_26_0_arm64.whl |
|---|---|
| Size | 2.3 MB |
| Tags | CPython 3.13 macOS 26.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
3977d31caf189e6bff61d397cfedbee2c4ccbdef62ab8a063ae77f9ade09d0eb
|
|
BLAKE2b-256 checksum How to use checksums |
67d931145ce06040644502f230307680d8fac3cf8c9aa1e6c3ab333ea33dd580
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / supymode-2.4.3-cp312-cp312-win_amd64.whl
| Download URL | supymode-2.4.3-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 2.9 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
254f364d72128b5bcae49796c1bfaf918281c9a215838d28d3c38d10cec55374
|
|
BLAKE2b-256 checksum How to use checksums |
2448a1a28fb64d4c2fb28091becde5c09218d4a67a8873938f1b7b7b18c7f4fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / supymode-2.4.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | supymode-2.4.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
45bc9610b95b49dec957be2897e805fd87da92dbf1d6c093e9540e86a069713c
|
|
BLAKE2b-256 checksum How to use checksums |
eaeef254b64050d464dea147f8ff320315c5ebe3d40645c0200e7e1ebf3d1dc9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / supymode-2.4.3-cp312-cp312-macosx_26_0_arm64.whl
| Download URL | supymode-2.4.3-cp312-cp312-macosx_26_0_arm64.whl |
|---|---|
| Size | 2.3 MB |
| Tags | CPython 3.12 macOS 26.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
0e35047f8956314b22ed63fe976181af12bb4c915018a5f3ee748f8ba3cd9720
|
|
BLAKE2b-256 checksum How to use checksums |
3361f950163d25e442287df623bc9da851bfde016b78b1c3153f2209a2aaf797
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / supymode-2.4.3-cp311-cp311-win_amd64.whl
| Download URL | supymode-2.4.3-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 2.8 MB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
9466b1f496004cf07ad79afd075b7ca833a3bcaf9612ba9a962bd1fb44fe9301
|
|
BLAKE2b-256 checksum How to use checksums |
972a358f0f2be837ee70850657829780abe14025d13873f12e35aaa257fd9583
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / supymode-2.4.3-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | supymode-2.4.3-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
d50644d3673b62124c5342bc51300e7dad6511f5220be70c6827e5c01d395de2
|
|
BLAKE2b-256 checksum How to use checksums |
f337e1087e6ee9a9a571691b38af47f5268879d14298aa7a3a67c5b6a919934b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / supymode-2.4.3-cp311-cp311-macosx_26_0_arm64.whl
| Download URL | supymode-2.4.3-cp311-cp311-macosx_26_0_arm64.whl |
|---|---|
| Size | 2.3 MB |
| Tags | CPython 3.11 macOS 26.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
41001cd2c79c7679cd54e155f295e2e7c234f85382a084bdc5981755c855fb49
|
|
BLAKE2b-256 checksum How to use checksums |
6a3e3818a4e86fc8c058fe819cb2d12b3b1a577f5d232ac4e9e08f739701b83d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|