A python program to record image series with Lorentz-TEM.
Project description
PyLo
PyLo is a Python module and program for recording Lorentz-TEM image series.
The software is written for the JEOL NeoArm F200 with Gatan Microscopy Suite as the displaying software but can be extended to use any microscope. Also it comes with a command line view, that does not need Gatan Microscopy Suite.
PyLo provides an easy to understand GUI to create highly customizable measurement series to automatically record changes in magnetic orders. With the JEOL NeoArm F200, PyLo allows creating series over the tilt in x and y direction, the (de-)focus and the magnetic field applied by activating the objective lenses.
PyLo is easily extended. It provides an Event system to hook in before or after specific actions. It allows to use and change all settings at any time. Also it provides an easy to use settings manager where plugins can add their settings which will be shown to the user before every measurement run. Microscopes and cameras can be customized or replaced by creating own classes that implement an interface. Those classes can be loaded dynamically. This way PyLo can deal with every microscope and camera without having to learn the whole program code.
Key Features:
- Record LTEM image series automatically (e.g. field series + focus series for induction maps)
- Integration in Gatan Microscopy Suite Software
- Alternative Command Line Interface
- Adaptable for all TEMs and connected camera systems
- Easily extendable parameter control
- Plug-In and Event system integrated
- Offline installation possible
Installation
GMS (Internet connection required)
For PyLo with the GMS integration, follow the instructions in the PyLo GMS Frontend repository.
Command line interface (Internet connection required)
For the command line installation install Python (https://www.python.org/).
Then use
python -m pip install pylo
to install PyLo.
After installing the devices (camera and microscope) you can start PyLo by invoking
python -m pylo
Install devices
TL;DR: Download
devices/
directory anddevices.ini
, move to both files to%programfiles%\Gatan\Plugins\
for the GMS installation and to%username%\pylo\
for windows or to~/pylo/
for Unix CLI installation.
In PyLo the microscope and the camera (and potential other hardware machines) are called
"devices". Those are loaded on runtime and can be selected by the users. Devices are
defined in python standalone files that are not integrated in the PyLo source code. They
are installed by adding their definitions to the devices.ini
file(s) which can be
located at various places.
PyLo offers 3 cameras and 3 microscopes:
- Cameras
- Digital Micrograph Camera: Any camara that can be used in Gatans Microscopy Suite (only usable in GMS mode)
- Dummy Camera: A camera that creates images filled with random pixel data (for testing)
- PyJEM Camera: A camera using JEOLs
PyJEM
library (not well tested) - Microscopes
- Digital Micrograph Microscope: Any microscope that can be used in Gatans Microscopy Suite (only usable in GMS mode)
- Dummy Microscope: A microscope that has a focus measurement variable, an objectiv lens current variable and a pressure variable that can be modified, each change in one of those values does nothing (for testing)
- PyJEM Microscope: A microscope using JEOLs
PyJEM
library (not well tested) To install those, download thedevices
directory and thedevices.ini
file. Move them into one of the devices directories listed below. To prevent one device showing up, you can either delete the python file or set thedisabled
value in thedevices.ini
toNo
.
PyLo will look for devices.ini
files in the following locations. If there are multiple
files, all of them are used. If there are multiple devices with the same name, the file
found first is used (not the order below):
- The program data directory, Windows:
%username%\pylo\
, Unix:~/pylo/
(recommended for CLI installation, create if necessary) - The current user directory, Windows:
%username%
, Unix:~/
- The current working directory (the directory PyLo is executed in)
- GMS only: GMS "plugin" directory, Windows:
%programfiles%\Gatan\Plugins
(recommended for GMS installation, create if necessary) - GMS only: GMS "application" directory, Windows:
%programfiles%\Gatan
Manual installation (No Internet connection needed)
To install PyLo manually download this repository and extract it.
For executing PyLo in GMS, move the pylo-master
directory to
%programfiles\Gatan\Plugins
. Now open the pylo-gms
directory. Follow the installation
instructions from the PyLo GMS Frontend installation
but use the files from the pylo-gms
directory instead of downloading files (the files to
download are the files in the pylo-gms
directory).
For the command line usage move the extracted pylo-master
directory anywhere
(%userdata%
recommended for Windows, ~
recommended for Unix). Open the command line,
move to this directory and start pylo by invoking it as a module:
Windows
cd %userdata%\pylo-master\
python -m pylo
Unix
cd ~/pylo-master
python -m pylo
Dependencies
PyLo is written with python 3.5.6+ (tested with 3.5.6 and 3.7.1).
- NumPy (pip, conda)
- PIL (Pillow) (pip, conda)
- execdmscript (pip)
Note that the devices may need more libraries.
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 PyLo-1.0.0.tar.gz
.
File metadata
- Download URL: PyLo-1.0.0.tar.gz
- Upload date:
- Size: 188.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.44.1 CPython/3.7.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4bb525518514e59e21932f2200ed1d2281abe96785e89f4c39ec93b077d898cf |
|
MD5 | b891f72c35428d61de829827169dbeb6 |
|
BLAKE2b-256 | dde45f9f122c49b342a28a3794786852bba75bc59440aea0677b993592322b69 |
File details
Details for the file PyLo-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: PyLo-1.0.0-py3-none-any.whl
- Upload date:
- Size: 167.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.44.1 CPython/3.7.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2bf86fb92e3c20e1f27170a52254da08ce4041ac3ea53e1f4761eca583fae887 |
|
MD5 | 1994ab22ea161c76ad9315c475f954e9 |
|
BLAKE2b-256 | 4dddf9b34f65a9ed47234e1075ed370aaae178ee15b5100936462cea0008b486 |