Instamaticο
Instamatic is a Python program that is being developed with the aim to automate the collection of electron diffraction data. At the core is a Python library for transmission electron microscope experimental control with bindings for the JEOL/FEI microscopes and interfaces to the ASI/TVIPS/Gatan cameras. Routines have been implemented for collecting serial electron diffraction (serialED), continuous rotation electron diffraction (cRED, aka 3D-ED / microED), and stepwise rotation electron diffraction (RED) data. For streaming cameras, instamatic includes a live-view GUI.
Instamatic is distributed as a portable stand-alone installation that includes all the needed libraries from: https://github.com/instamatic-dev/instamatic/releases. However, the most up-to-date version of the code (including bugs!) is available from this repository.
Electron microscopes supported:
JEOL microscopes with the TEMCOM library
FEI microscopes via the scripting interface
Cameras supported:
ASI Timepix
ASI CheeTah through
serval-toolkit
libraryGatan cameras through DM plugin [1]
TVIPS cameras through EMMENU4 API
Instamatic has been developed on a JEOL-2100 with a Timepix camera, and a JEOL-1400 and JEOL-3200 with TVIPS cameras (XF416/F416).
[1]: Alternatively, a DigitalMicrograph script for collecting cRED data on a OneView camera (or any other Gatan camera) can be found at dmscript.
Installationο
If you use conda, create a new environment:
conda create -n instamatic python=3.7
conda activate instamatic
Install using pip, works with python versions 3.7 and 3.8:
pip install instamatic
Alternatively, download the portable installation with all
libraries/dependencies included:
https://github.com/instamatic-dev/instamatic/releases/latest. Extract
the archive, and open a terminal by double-clicking start_Cmder.exe
.
Installation should take less than 1 minute on a normal desktop.
Find the latest releases for the versions that have been tested on.
OS requirementο
The package requires Windows 7 or higher. It has been mainly developed and tested under windows 7 and windows 10.
Package dependenciesο
Check pyproject.toml for the full dependency list and versions.
Documentationο
See the documentation for how to set up and use Instamatic.
Referenceο
If you found Instamatic
useful, please consider citing it or one of
the references below.
Each software release is archived on Zenodo, which provides a DOI for the project and each release. The project DOI 10.5281/zenodo.1090388 will always resolve to the latest archive, which contains all the information needed to cite the release.
Alternatively, some of the methods implemented in Instamatic
are
described in:
B. Wang, X. Zou, and S. Smeets, Automated serial rotation electron diffraction combined with cluster analysis: an efficient multi-crystal workflow for structure determination, IUCrJ (2019). 6, 854-867
B. Wang, Development of rotation electron diffraction as a fully automated and accurate method for structure determination. PhD thesis (2019), Dept. of Materials and Environmental Chemistry (MMK), Stockholm University
M.O. Cichocka, J. Γ ngstrΓΆm, B. Wang, X. Zou, and S. Smeets, High-throughput continuous rotation electron diffraction data acquisition via software automation, J. Appl. Cryst. (2018). 51, 1652β1661
S. Smeets, X. Zou, and W. Wan, Serial electron crystallography for structure determination and phase analysis of nanocrystalline materials, J. Appl. Cryst. (2018). 51, 1262β1273
Source Code Structureο
``demos/`` - Jupyter demo notebooks
``docs/`` - Documentation
``instamatic/``
``TEMController/`` - Microscope interaction code
``calibrate/`` - Tools for calibration
``camera/`` - Camera interaction code
``config/`` - Configuration management
``experiments/`` - Specific data collection routines
``formats/`` - Image formats and other IO
``gui/`` - GUI code
``neural_network/`` - Crystal quality prediction
``processing/`` - Data processing tools
``server/`` - Manages interprocess/network communication
``utils/`` - Helpful utilities
``acquire_at_items.py`` - Stage movement/data acquisition engine
``admin.py`` - Check for administrator
``banner.py`` - Appropriately annoying thank you message
``browser.py`` - Montage browsing class
``exceptions.py`` - Internal exceptions
``goniotool.py`` - Goniotool (JEOL) interaction code
``gridmontage.py`` - Grid montage data collection code
``image_utils.py`` - Image transformation routines
``imreg.py`` - Image registration (cross correlation)
``io.py`` - Some io-related scripts
``main.py`` - Main entry point
``montage.py`` - Image stitching
``navigation.py`` - Optimize navigation paths
``tools.py`` - Collection of functions used throughout the code
``scripts/`` - Helpful scripts
``pyproject.toml`` - Dependency/build system declaration (poetry)
``setup.py`` - Old-style build script
Getting startedο
Getting Started
- Setting up Instamatic
- Configuration
- Formats
- GUI and module system
- Programs and scripts
- instamatic
- instamatic.controller
- instamatic.serialed
- instamatic.camera
- instamatic.calibrate_stage_lowmag
- instamatic.calibrate_stage_mag1
- instamatic.calibrate_beamshift
- instamatic.calibrate_directbeam
- instamatic.calibrate_stagematrix
- instamatic.flatfield
- instamatic.stretch_correction
- instamatic.browser
- instamatic.viewer
- instamatic.defocus_helper
- instamatic.find_crystals
- instamatic.find_crystals_ilastik
- instamatic.learn
- instamatic.temserver
- instamatic.camserver
- instamatic.dialsserver
- instamatic.VMserver
- instamatic.xdsserver
- instamatic.temserver_fei
- instamatic.goniotoolserver
- instamatic.autoconfig
- instamatic.install
- TEMController
- cRED data collection with TVIPS
Examplesο
API Referenceο
API reference
- instamatic
- instamatic.TEMController
- instamatic.calibrate
- instamatic.camera
- instamatic.config
- instamatic.experiments
- instamatic.formats
- instamatic.gui
- instamatic.neural_network
- instamatic.processing
- instamatic.server
- instamatic.utils
- instamatic.acquire_at_items
- instamatic.admin
- instamatic.banner
- instamatic.browser
- instamatic.exceptions
- instamatic.goniotool
- instamatic.gridmontage
- instamatic.image_utils
- instamatic.imreg
- instamatic.io
- instamatic.main
- instamatic.montage
- instamatic.tools
Linksο
Links