Created by sebastien.popoff on 19/05/2019

Tutorials Others

Complex-Valued Neural Networks for Physics Applications

An implementation in PyTorch

 

Artificial neural networks are mainly used for treating data encoded in real values, such as digitized images or sounds. In such systems, using complex-valued tensors would be quite useless. This is however different for physic related topics. When dealing with wave propagation in particular, using complex values is interesting since the physics typically has linear, hence more simple, behavior when considering complex fields. This is sometimes true even when the inputs and the outputs of the system are real values. For instance, consider a complex media that you excite using an amplitude modulator, such as a DMD (Digital Micromirror Device) and you measure the output intensity. You manipulate only real values, but if you want to characterize the system, you have to keep in mind that the phase is a hidden variable as the effect of propagation is represented by the multiplication by a complex matrix on the optical field.

See full post
Created by sebastien.popoff on 25/02/2019

Tutorials Multimode fibers

pyMMF:  Simulating Multimode Fibers in Python

Part 1: Step Index Benchmark

 

I recently published a two-part tutorial on how to find the modes of an arbitrary multimode fiber without or with bending. Based on this tutorial, I published a (still experimental) version of a Python module to find the modes of multimode fibers and calculate their transmission matrix: pyMMF. The goal of this module is not to compete with commercial solutions in terms of precision but to provide a way to easily simulate realistic fiber systems. To validate the approach, I use step-index multimode fibers as a benchmark test as the dispersion relation is analytically known (see my tutorial here) and for which the Linearly Polarized (LP) mode approximation yields good results. I focus my attention here on the precision of the numerically found propagation constants.

See full post
Created by sebastien.popoff on 29/12/2018

Tutorials Multimode fibers

Numerical Estimation of Multimode Fiber Modes and Propagation Constants: 

Part 2: Bent Fibers 

 

We saw in the first part of the tutorial that the profiles and the propagation constants of the propagation modes of a straight multimode fiber can easily be avulated for an arbitrary index profile by inverting a large but sparse matrix. Under some approximations [1], a portion of fiber with a fixed radius of curvature satisfies a similar problem that can be solved with the same numerical tools, as we illustrate with the PyMMF Python module [2]. Moreover, when the modes are known for the straight fiber, the modes for a fixed radius can be approximate by inverting a square matrix of size the number of propagating modes [1]. It allows fast computation of the modes for different radii of curvature.

See full post
Created by sebastien.popoff on 09/12/2015

Tutorials Spatial Light Modulators

How to control a liquid crystal SLM with Python

Most liquid crystal Spatial Light Modulators (SLMs) and some digital micromirror devices (DMDs) are controlled via an analog (VGA) or digital (HDMI/DVI) monitor standard communication protocol. In other words, you plug it to your computer and it is recognized as a monitor display. There is usually no useful tool or API provided with the device to dynamically control the SLM. I previously introduced a way to control an SLM using Matlab/Octave, now that I switched to Python, I present here a way to do this using Python.

DOI

See full post