Solve modes for a step index multimode fibre and simulate beam coupling and propagation.
Project description
lpmodes: Python Package for Simulation Multimode Fibres
The lpmodes package is a toolkit for finding, simulating, and manipulating linearly polarized (LP) modes in step index multimode optical fibers.
Functions are provided to determine the allowed modes, compute their properties, and simulate coupling and propagation of beams.
A GUI, lpmodes_gui, allows modes to be solved, visualised and exported.
Full documentation is on Read the docs.
Also see the examples in the examples folder.
Package Features
Functions are provided to:
- Find all allowed modes for step index fibres (weakly guided approximation)
- Export mode parameters as CSV
- Calculate fraction of power in core for all modes
- Plot amplitude or intensity of modes as numpy arrays
- Generate a single plot of all modes as a matplotlib figure
- Simulate coupling arbitary beams into the fibre (functions for generation of plane waves and Gaussian beams are provided)
- Calculate coupling efficiency
- Propagate coupled fields along a length of fibre, and visualise output amplitude and intensity
GUI
A graphical user interface allow modes to be solved, visualised and exported.
Parameters of the fibre (NAs, core radius) and wavelength are defined in the top left. Clicking 'Find Modes' then finds solutions. The table in the centre is updated with the mode details. Power in core is not calculated immediately as this is more time consuming, click 'Find Power in Core' button to update this. Select a line of the table to display an image of that mode on the right. There are options on the left to choose the image grid size, the physical size of the image as a multiple of the core size, whether to display the amplitude or the intensity, and whether to display a circle showing the core size. The data can be exported as CSV, or the current mode image or all mode images saved as tifs using buttons on the left.
Contributing
Development is currently mainly by Mike Hughes' lab in the Applied Optics Group, Physics & Astronomy, University of Kent. I'm happy to collaborate with academic users to help your use case, and if you would like help using lpmodes for commercial purposes, consultancy is available, please contact Mike Hughes.
Help testing and developing the package is welcome, and I'm happy for this to become a more collaborate effort and share credit, please get in touch.
Requirements
- Numpy
- Scipy
- Matplotlib
- PyQT5 (GUI only)
- PIL (GUI only)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file lpmodes-1.0.1.tar.gz
.
File metadata
- Download URL: lpmodes-1.0.1.tar.gz
- Upload date:
- Size: 31.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2dee11fa590ae45527c75c647016e00311234f0a99c4fe5001ff6bed767c2699 |
|
MD5 | 714ac24070a2c7e72947dad7c2942caa |
|
BLAKE2b-256 | a00bdfe0ac19494dd33e960527441fcc1da8da832d3f3931fae6f71401f6d973 |
File details
Details for the file lpmodes-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: lpmodes-1.0.1-py3-none-any.whl
- Upload date:
- Size: 29.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 689cb9c21de0e0c57827d19096ac85f4cd09495e83734e68b6266e34bd4b807c |
|
MD5 | abcae44275e7695d7b0145548b2c9430 |
|
BLAKE2b-256 | 3ab7dcbbb5865fe241b395bfbec94b8f91849bc2dcf9bd6d41830cff608914c0 |