Name | SuPyMode JSON |
Version |
2.1.5
JSON |
| download |
home_page | None |
Summary | A package for light propagation in fiber optics. |
upload_time | 2025-08-19 14:53:37 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.11 |
license | MIT License
Copyright (c) 2020 Martin de Sivry
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
|
keywords |
coupled-mode theory
waveguide
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
.. figure:: https://github.com/MartinPdeS/SuPyMode/blob/master/docs/images/mode_propagation.gif?raw=true
:alt: Propagation of mode in an adiabatic 2x1 modally-specific photonic lantern.
:class: with-shadow float-left
:width: 800px
.. list-table::
:widths: 10 25 25 25
:header-rows: 0
* - Meta
- |python|
- |docs|
- |zenodo|
* - Testing
- |ci/cd|
- |coverage|
- |colab|
* - PyPI
- |PyPI|
- |PyPI_download|
-
* - Anaconda
- |anaconda|
- |anaconda_download|
- |anaconda_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:
.. code-block:: bash
pip install SuPyMode
conda install SuPyMode
See the `online documentation <https://supymode.readthedocs.io/>`_ for detailed
usage and additional examples.
Quick example
-------------
Below is a short example computing the mode propgation in a simple fiber.
.. code-block:: python
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:
.. code-block:: bash
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:
.. code-block:: bash
pip install SuPyMode[testing]
pytest
Citing SuPyMode
---------------
If you use SuPyMode in academic work, please cite:
.. code-block:: none
@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 <mailto:martin.poinsinet.de.sivry@gmail.com>`_.
.. |python| image:: https://img.shields.io/badge/Made%20with-Python-1f425f.svg
:alt: Python
:target: https://www.python.org/
.. |zenodo| image:: https://zenodo.org/badge/366930899.svg
:target: https://zenodo.org/badge/latestdoi/366930899
:alt: Scientific article
.. |colab| image:: https://colab.research.google.com/assets/colab-badge.svg
:alt: Google Colab
:target: https://colab.research.google.com/github/MartinPdeS/SuPyMode/blob/master/notebook.ipynb
.. |docs| image:: https://github.com/martinpdes/supymode/actions/workflows/deploy_documentation.yml/badge.svg
:target: https://martinpdes.github.io/SuPyMode/
:alt: Documentation Status
.. |PyPi| image:: https://badge.fury.io/py/SuPyMode.svg
:alt: PyPI version
:target: https://pypi.org/project/SuPyMode/
.. |PyPi_download| image:: https://img.shields.io/pypi/dm/supymode.svg
:alt: PyPI downloads
:target: https://pypistats.org/packages/supymode
.. |coverage| image:: https://raw.githubusercontent.com/MartinPdeS/SuPyMode/python-coverage-comment-action-data/badge.svg
:alt: Unittest coverage
:target: https://htmlpreview.github.io/?https://github.com/MartinPdeS/SuPyMode/blob/python-coverage-comment-action-data/htmlcov/index.html
.. |ci/cd| image:: https://github.com/martinpdes/supymode/actions/workflows/deploy_coverage.yml/badge.svg
:alt: Unittest Status
.. |anaconda| image:: https://anaconda.org/martinpdes/supymode/badges/version.svg
:alt: Anaconda version
:target: https://anaconda.org/martinpdes/supymode
.. |anaconda_download| image:: https://anaconda.org/martinpdes/supymode/badges/downloads.svg
:alt: Anaconda downloads
:target: https://anaconda.org/martinpdes/supymode
.. |anaconda_date| image:: https://anaconda.org/martinpdes/supymode/badges/latest_release_relative_date.svg
:alt: Latest release date
:target: https://anaconda.org/martinpdes/supymode
Raw data
{
"_id": null,
"home_page": null,
"name": "SuPyMode",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": null,
"keywords": "coupled-mode theory, waveguide",
"author": null,
"author_email": "Martin Poinsinet de Sivry-Houle <martin.poinsinet.de.sivry@gmail.com>",
"download_url": null,
"platform": null,
"description": ".. figure:: https://github.com/MartinPdeS/SuPyMode/blob/master/docs/images/mode_propagation.gif?raw=true\n :alt: Propagation of mode in an adiabatic 2x1 modally-specific photonic lantern.\n :class: with-shadow float-left\n :width: 800px\n\n.. list-table::\n :widths: 10 25 25 25\n :header-rows: 0\n\n * - Meta\n - |python|\n - |docs|\n - |zenodo|\n * - Testing\n - |ci/cd|\n - |coverage|\n - |colab|\n * - PyPI\n - |PyPI|\n - |PyPI_download|\n -\n * - Anaconda\n - |anaconda|\n - |anaconda_download|\n - |anaconda_date|\n\nSuPyMode\n========\n\nThis project aims to develop an useful tool design and optimize fiber optic tapered component.\nSuPyMode is a Python library linked to a c++ core allowing for a flexible interface and fast computing core.\nThe library also aims to offer the end-user a great vizual tools for data analysis.\nTo 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.\n\nFeatures\n--------\n- Fast and efficient simulation of fiber optic tapered components.\n- User-friendly interface for easy integration into existing workflows.\n- Comprehensive visualization tools for data analysis and interpretation.\n\nInstallation\n------------\n**SuPyMode** is available on PyPI and Anaconda. Install it with:\n\n.. code-block:: bash\n\n pip install SuPyMode\n conda install SuPyMode\n\nSee the `online documentation <https://supymode.readthedocs.io/>`_ for detailed\nusage and additional examples.\n\n\nQuick example\n-------------\nBelow is a short example computing the mode propgation in a simple fiber.\n\n.. code-block:: python\n\n from SuPyMode.workflow import Workflow, fiber_loader, Boundaries, BoundaryValue, DomainAlignment\n\n wavelength = 1550e-9\n\n fiber = fiber_loader.load_fiber('SMF28', clad_refractive_index=1.4444, remove_cladding=False)\n\n boundaries = [\n Boundaries(right=BoundaryValue.SYMMETRIC, top=BoundaryValue.SYMMETRIC),\n Boundaries(right=BoundaryValue.SYMMETRIC, top=BoundaryValue.ANTI_SYMMETRIC)\n ]\n\n\n workflow = Workflow(\n fiber_list=[fiber], # List of fiber to be added in the mesh, the order matters.\n wavelength=wavelength, # Wavelength used for the mode computation.\n resolution=80, # Number of point in the x and y axis [is divided by half if symmetric or anti-symmetric boundaries].\n x_bounds=DomainAlignment.LEFT, # Mesh x-boundary structure.\n y_bounds=DomainAlignment.BOTTOM,# Mesh y-boundary structure.\n boundaries=boundaries, # Set of symmetries to be evaluated, each symmetry add a round of simulation\n n_sorted_mode=3, # Total computed and sorted mode.\n n_added_mode=2, # Additional computed mode that are not considered later except for field comparison [the higher the better but the slower].\n plot_geometry=True, # Plot the geometry mesh before computation.\n auto_label=True, # Auto labeling the mode. Label are not always correct and should be verified afterwards.\n itr_final=0.05, # Final value of inverse taper ratio to simulate\n index_scrambling=0 # Scrambling of refractive index value in order to lift mode degeneracy [useful for some analysis]\n )\n\n workflow.superset.plot(plot_type='field', itr_list=[1.0, 0.1])\n\n workflow.superset.plot(plot_type='index')\n\n workflow.superset.plot(plot_type='normalized-coupling')\n\n workflow.superset.plot(plot_type='adiabatic')\n\n\nBuilding from source\n--------------------\nFor development or manual compilation, clone the repository and run:\n\n.. code-block:: bash\n\n git submodule update --init\n mkdir build && cd build\n cmake ../ -G\"Unix Makefiles\"\n sudo make install\n cd ..\n python -m pip install .\n\nTesting\n-------\nRun the unit tests with:\n\n.. code-block:: bash\n\n pip install SuPyMode[testing]\n pytest\n\nCiting SuPyMode\n---------------\nIf you use SuPyMode in academic work, please cite:\n\n.. code-block:: none\n\n @article{de2024supymode,\n title={SuPyMode: an open-source library for design and optimization of fiber optic components},\n author={de Sivry-Houle, Martin Poinsinet and Becerra Deana, Rodrigo Itzamna and Virally, St{\\'e}phane and Godbout, Nicolas and Boudoux, Caroline},\n journal={Optics Continuum},\n volume={3},\n number={2},\n pages={242--255},\n year={2024},\n publisher={Optica Publishing Group}\n }\n\nContact\n-------\nFor questions or contributions, contact `martin.poinsinet.de.sivry@gmail.com <mailto:martin.poinsinet.de.sivry@gmail.com>`_.\n\n.. |python| image:: https://img.shields.io/badge/Made%20with-Python-1f425f.svg\n :alt: Python\n :target: https://www.python.org/\n.. |zenodo| image:: https://zenodo.org/badge/366930899.svg\n :target: https://zenodo.org/badge/latestdoi/366930899\n :alt: Scientific article\n.. |colab| image:: https://colab.research.google.com/assets/colab-badge.svg\n :alt: Google Colab\n :target: https://colab.research.google.com/github/MartinPdeS/SuPyMode/blob/master/notebook.ipynb\n.. |docs| image:: https://github.com/martinpdes/supymode/actions/workflows/deploy_documentation.yml/badge.svg\n :target: https://martinpdes.github.io/SuPyMode/\n :alt: Documentation Status\n.. |PyPi| image:: https://badge.fury.io/py/SuPyMode.svg\n :alt: PyPI version\n :target: https://pypi.org/project/SuPyMode/\n.. |PyPi_download| image:: https://img.shields.io/pypi/dm/supymode.svg\n :alt: PyPI downloads\n :target: https://pypistats.org/packages/supymode\n.. |coverage| image:: https://raw.githubusercontent.com/MartinPdeS/SuPyMode/python-coverage-comment-action-data/badge.svg\n :alt: Unittest coverage\n :target: https://htmlpreview.github.io/?https://github.com/MartinPdeS/SuPyMode/blob/python-coverage-comment-action-data/htmlcov/index.html\n.. |ci/cd| image:: https://github.com/martinpdes/supymode/actions/workflows/deploy_coverage.yml/badge.svg\n :alt: Unittest Status\n.. |anaconda| image:: https://anaconda.org/martinpdes/supymode/badges/version.svg\n :alt: Anaconda version\n :target: https://anaconda.org/martinpdes/supymode\n.. |anaconda_download| image:: https://anaconda.org/martinpdes/supymode/badges/downloads.svg\n :alt: Anaconda downloads\n :target: https://anaconda.org/martinpdes/supymode\n.. |anaconda_date| image:: https://anaconda.org/martinpdes/supymode/badges/latest_release_relative_date.svg\n :alt: Latest release date\n :target: https://anaconda.org/martinpdes/supymode\n\n\n\n\n",
"bugtrack_url": null,
"license": "MIT License\n \n Copyright (c) 2020 Martin de Sivry\n \n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n ",
"summary": "A package for light propagation in fiber optics.",
"version": "2.1.5",
"project_urls": null,
"split_keywords": [
"coupled-mode theory",
" waveguide"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "e134b4f8a65369e3e9a0d7a9e4cc57d5ccb607c4a73226d58d2c1e5c658b5d39",
"md5": "342507e52ddf51d096302094d5ba4b9d",
"sha256": "6dfcbac5527d5ee9990a00f379b83b228c07c52dfcc35a2934c2c3243368e384"
},
"downloads": -1,
"filename": "supymode-2.1.5-cp311-cp311-macosx_15_0_arm64.whl",
"has_sig": false,
"md5_digest": "342507e52ddf51d096302094d5ba4b9d",
"packagetype": "bdist_wheel",
"python_version": "cp311",
"requires_python": ">=3.11",
"size": 2158808,
"upload_time": "2025-08-19T14:53:37",
"upload_time_iso_8601": "2025-08-19T14:53:37.778916Z",
"url": "https://files.pythonhosted.org/packages/e1/34/b4f8a65369e3e9a0d7a9e4cc57d5ccb607c4a73226d58d2c1e5c658b5d39/supymode-2.1.5-cp311-cp311-macosx_15_0_arm64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "10e148e50f4c5dd9f04cc1f8b7a5288da65e65ee0809bb470a267501a4d6dc41",
"md5": "113ac1ff2a18c5de82d9e5bfa1f837ec",
"sha256": "43853857311358c282c3ab43a50739ca67c08d39b15157db584b6bf0839c472c"
},
"downloads": -1,
"filename": "supymode-2.1.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"has_sig": false,
"md5_digest": "113ac1ff2a18c5de82d9e5bfa1f837ec",
"packagetype": "bdist_wheel",
"python_version": "cp311",
"requires_python": ">=3.11",
"size": 1354474,
"upload_time": "2025-08-19T14:53:40",
"upload_time_iso_8601": "2025-08-19T14:53:40.975697Z",
"url": "https://files.pythonhosted.org/packages/10/e1/48e50f4c5dd9f04cc1f8b7a5288da65e65ee0809bb470a267501a4d6dc41/supymode-2.1.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "f54d2af05c1065255710eb43c1368e0bc6ed453db5cd992e75bb8638904ad6e8",
"md5": "e91b094605eac689e683a9b592316b7e",
"sha256": "69f10fa4626ca0d07377924260a1918d60e69e9d02e6337c2e5953dab7566591"
},
"downloads": -1,
"filename": "supymode-2.1.5-cp311-cp311-win_amd64.whl",
"has_sig": false,
"md5_digest": "e91b094605eac689e683a9b592316b7e",
"packagetype": "bdist_wheel",
"python_version": "cp311",
"requires_python": ">=3.11",
"size": 2421140,
"upload_time": "2025-08-19T14:53:43",
"upload_time_iso_8601": "2025-08-19T14:53:43.999000Z",
"url": "https://files.pythonhosted.org/packages/f5/4d/2af05c1065255710eb43c1368e0bc6ed453db5cd992e75bb8638904ad6e8/supymode-2.1.5-cp311-cp311-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "a2a215b536cf7ffa9d0548f41e5ceac9b85cdaafe26299a3d97fa98e1ac41acd",
"md5": "d948533bcc1672c2d935ce662623e5fc",
"sha256": "0927d3871ad8524a81f57c8abb53b2229a59922fc401313f3c67403348d6ddc2"
},
"downloads": -1,
"filename": "supymode-2.1.5-cp312-cp312-macosx_15_0_arm64.whl",
"has_sig": false,
"md5_digest": "d948533bcc1672c2d935ce662623e5fc",
"packagetype": "bdist_wheel",
"python_version": "cp312",
"requires_python": ">=3.11",
"size": 2792168,
"upload_time": "2025-08-19T14:53:39",
"upload_time_iso_8601": "2025-08-19T14:53:39.520719Z",
"url": "https://files.pythonhosted.org/packages/a2/a2/15b536cf7ffa9d0548f41e5ceac9b85cdaafe26299a3d97fa98e1ac41acd/supymode-2.1.5-cp312-cp312-macosx_15_0_arm64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "bef2b92bd81317ecca942eda4812f051d67b313e40181ec9d756d0a722c84600",
"md5": "82aeac9f30ff3d257c24a83d8aa6882c",
"sha256": "def76cdb0af05a4fdc6d0d5b5a9919f2ce64fa7b4c9fbcb0a8fa378f32fd32db"
},
"downloads": -1,
"filename": "supymode-2.1.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"has_sig": false,
"md5_digest": "82aeac9f30ff3d257c24a83d8aa6882c",
"packagetype": "bdist_wheel",
"python_version": "cp312",
"requires_python": ">=3.11",
"size": 2081489,
"upload_time": "2025-08-19T14:53:42",
"upload_time_iso_8601": "2025-08-19T14:53:42.115967Z",
"url": "https://files.pythonhosted.org/packages/be/f2/b92bd81317ecca942eda4812f051d67b313e40181ec9d756d0a722c84600/supymode-2.1.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "3c52104217522fe4488454b9f32fd205ff9bceaf1ef7bfb6eb6840c126be3d5f",
"md5": "f9829889809f25a48208608e350b01a0",
"sha256": "b59f936cef93f162c0ba4ac3462f3de16b36013c1b72936d2104ab3ec92872cf"
},
"downloads": -1,
"filename": "supymode-2.1.5-cp312-cp312-win_amd64.whl",
"has_sig": false,
"md5_digest": "f9829889809f25a48208608e350b01a0",
"packagetype": "bdist_wheel",
"python_version": "cp312",
"requires_python": ">=3.11",
"size": 4214566,
"upload_time": "2025-08-19T14:53:45",
"upload_time_iso_8601": "2025-08-19T14:53:45.777125Z",
"url": "https://files.pythonhosted.org/packages/3c/52/104217522fe4488454b9f32fd205ff9bceaf1ef7bfb6eb6840c126be3d5f/supymode-2.1.5-cp312-cp312-win_amd64.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-19 14:53:37",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "supymode"
}