Version Incompatibility: There is currently a known issue with wxpython and python 3.10 that means ElecSus only supports python 3.9 and below. This will be updated once these issues are resolved.
A program to calculate the electric susceptibility of an atomic ensemble. The program is designed to model weak-probe laser spectra on the D-lines of thermal alkali metal vapour cells. The program also includes fitting routines which allow experimental parameters to be extracted from experimental spectroscopic data.
Major overhaul that adds much additional functionality. See the new paper (https://doi.org/10.1016/j.cpc.2017.12.001) for the full details. In brief, the additions are
To include calculation for an arbitrary angle between magnetic field axis and light propagation vector, in part based on the publication by Rotondaro, Zhdanov and Knize [ J. Opt. Soc. Am. B 32, 12, 2507 (2015) ] and references therein.
A more general approach to light propagation, with the input polarisation more rigorously defined. This change makes this version backwards incompatible with the previous (v1.x, v2.x) versions, since now we explicitly calculate the electric field at the exit of the medium and use Jones matrices/vectors to compute the Stokes parameters and other derived quantities. This also has the benefit of enabling the simulation of, for example: magnetic field gradients; polarising optical elements; birefringence or other optical imperfections. Previous versions are still available on the releases section of these pages, but are no longer maintained.
The GUI has been significantly changed to accomodate the extra magnetic field and polarisation options.
The old (v1.x) runcard method of calling elecsus is now dead and buried, since it's no longer compatible with the current version.
The fitting routines have been completely rewritten to use parameter dictionaries. We now utilise the lmfit module (https://lmfit.github.io/lmfit-py/), instead of the vanilla scipy least-square minimisation modules. Performance is broadly similar (since lmfit also runs over the top of scipy.optimize modules), but there are many advantages of this model: Firstly, all parameters can now be selected to vary during a fit or be held constant, and bounds for these parameters can be given to prevent unphysical values from being returned. In addition, the differential_evolution solver is now availablle, which is very efficient at finding the global minimum for multi-parameter fits (we leave in random_restart and simulated_annealing for now, though these might disappear in future versions as it appears differential_evolution is much better in all tested cases so far - see elecsus/tests/fitting_tests.py for examples).
Must have the python programming language installed with the following packages:
Python and required packages must be installed prior to installing ElecSus.
Download the zip file and extract the ElecSus directory.
For windows, there are pre-built binaries which will install ElecSus for you. Simply double click on the installer exe/msi file and follow the instructions.
For linux-based systems, download or clone this repository and navigate to the download location in a terminal window. Install using the setup.py file by typing
python setup.py install
Note the GUI part of ElecSus is currently untested on Mac OSX!
For running 'Basic Calculations' notebook (RECOMMENDED FOR NEW USERS):
For GUI operation:
After package installation, from the python interpreter type:
from elecsus import elecsus_gui
elecsus_gui.start()
In windows, double-click on the run_gui.bat file in the elecsus directory
Alternately, open a terminal or command-line window and navigate to the ElecSus directory. Type:
python elecsus_gui.py
For GUI documentation, see the docs/ sub-folder.
For the original ElecSus paper, go to http://dx.doi.org/10.1016/j.cpc.2014.11.023 and download the paper. For the ElecSus paper that goes with version 3, see https://doi.org/10.1016/j.cpc.2017.12.001 Both papers are published open-access and therefore freely available.
A notebook which goes processes and fits data with ElecSus can be found here: https://github.com/durham-qlm/scope2elecsus. This is accompanied by its own published paper which is also open access and freely available: https://doi.org/10.1088/1367-2630/ac9cfe
All the files distributed with this program are provided subject to the Apache License, Version 2.0. A Copy of the license is provided.
v 3.0.8
v 3.0.7
V 3.0.6
V 3.0.5
V 3.0.4
V 3.0.3
V 3.0.2
V 3.0.1
V 3.0.0
V 2.2.0
V 2.1.0
V 2.0.3
V 2.0.2
V 2.0.1