Skip to main content

A package for light propagation in fiber optics.

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

supymode-2.2.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

supymode-2.2.1-cp312-cp312-macosx_15_0_arm64.whl (3.2 MB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

supymode-2.2.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

supymode-2.2.1-cp311-cp311-macosx_15_0_arm64.whl (2.4 MB view details)

Uploaded CPython 3.11macOS 15.0+ ARM64

File details

Details for the file supymode-2.2.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for supymode-2.2.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 b08ddee10f75fd0edd427475b92095dfeca4dace487b9710ca8df0753a271eae
MD5 d892cb026d7b30358df68992cd891231
BLAKE2b-256 f6c1d95d727dd624b41e449d967144f9fbda0620a70a8380290e08d3343216ed

See more details on using hashes here.

File details

Details for the file supymode-2.2.1-cp312-cp312-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for supymode-2.2.1-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 963eb0c6f2e88cde83838e2f908f6bcc1d5ab6c8702c6c3c0ca18fc88aa5c2bd
MD5 3f2210938688aae0bcb9d86aedfc2a2b
BLAKE2b-256 66e426af9e0c031c38125cf9c81a95e6fed74ec3b439c8e5709768ba7e097a54

See more details on using hashes here.

File details

Details for the file supymode-2.2.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for supymode-2.2.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 58bc09daaccaa55914be49ad2572139b34cebd58d30763e3f75a39657ff82f1b
MD5 89a39f504a7575e32cd48d0f56a82392
BLAKE2b-256 7539afa30b3d78684344416f093fa26301ce2e7a2a7ff626774e02212034cf66

See more details on using hashes here.

File details

Details for the file supymode-2.2.1-cp311-cp311-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for supymode-2.2.1-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 4ac63d45a83afa28a2f5c6ab101ff6a0522d2c310e945a94e1ec4848b9b6c945
MD5 4e36fb69469572bf5e9d145dc996ce90
BLAKE2b-256 890cde41452513c091817943f643ef8c08678e4403b10a638e8ffdd0dd178787

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page