Giter Club home page Giter Club logo

lpmodes's Introduction

lpmodes: Python Package for Simulation of 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.

Example modes

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.

lpmodes GUI screenshot

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)

lpmodes's People

Contributors

mikehugheskent avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.