# py4DSTEM: open source processing and analysis of 4D-STEM data
[![DOI](https://zenodo.org/badge/148587083.svg)](https://zenodo.org/badge/latestdoi/148587083)
py4DSTEM is a python tool for analysis of four-dimensional scanning transimission electron microscopy (4D-STEM) data.
It is open source software distributed under a GPLv3 license. It is free to use, alter, or build on, provided that any work derived from py4DSTEM is also kept free and open.
## What is 4D-STEM?
In a traditional STEM experiment, a beam of high energy electrons is focused to a very fine probe - on the order of or, often, smaller than the atomic lattice spacings - and rastered across the surface of the sample.
A two-dimensional image is then formed by populating the value of each pixel with the electron flux through a detector at the corresponding beam position.
In 4D-STEM a pixellated detector is used, such that a 2D image of the diffraction plane is acquired at every raster position of the electron beam.
A 4D-STEM scan thus results in a 4D data array.
4D-STEM data is information rich.
A datacube can be collapsed in real space to yield information comparable to nanobeam electron diffraction experiment, or in diffraction space to yield a variety of virtual images, corresponding to both traditional STEM imaging modes as well as more exotic virtual imaging modalities.
The structure, symmetries, and spacings of Bragg disks can be used to extract spatially resolved maps of crystallinity, grain orientations, and lattice strain.
Redundant information in overlapping Bragg disks can be leveraged to calculate the sample potential.
Structure in the diffracted halos of amorphous systems can be used to describe the short and medium range order.
For more information, see [https://arxiv.org/abs/2003.09523](https://arxiv.org/abs/2003.09523).
## Using py4DSTEM
This sections describes:
- Installation
- Running the GUI
- Running from a python interpretter
- Sample jupter notebooks
- Sample scripts
- For developers
### Installation
The recommended installation for py4DSTEM uses the Anaconda python distribution.
First, download and install Anaconda. Instructions can be found at www.anaconda.com/download.
Then open a terminal and run
```
conda updata conda
conda create -n py4dstem
conda activate py4dstem
conda install pip
pip install py4dstem
```
In order, these commands
- ensure your installation of anaconda is up-to-date
- make a virtual environment - see below!
- enter the environment
- make sure your new environment talks nicely to pip, a tool for installing Python packages
- use pip to install py4DSTEM
Virtual environments are used to make sure packages that have different dependencies don't conflict with one another.
Because the directions above install py4DSTEM to its own virtual environment, each time you want to use py4DSTEM,
you'll need to activate this environment.
This is included in the directions below for running py4DSTEM, and assume you've named your virtual environment 'py4dstem'
### Running the GUI
From a terminal, run
```
conda activate py4dstem
py4dstem
```
### Running from a python interpreter
From any python interpreter inside the `py4dstem` conda environment, py4DSTEM can be imported in the usual way:
```
import py4DSTEM
```
### Sample code
**As the base code is currently under construction, the sample code (Jupyter notebooks and scripts) have been temporarily taken down. They'll be back soon. We apologize for any inconvenience, and appreciate your patience!**
### For contributors
To contribute to py4DSTEM, first fork the repository.
Set up and activate a new environment, e.g. in anaconda use
```
conda create -n py4dstem_dev
conda activate py4dstem_dev
```
Next, navigate to the directory where you want to put the project, and type
```
git clone your_fork_url.git
```
where `your_fork_url` is the url to the fork you created.
Navigate into the new py4DSTEM directory which contains the `setup.py` file, and run
```
conda install pip
pip install -e .
```
where the -e option installs the package in 'editable' mode, so that changes within this project directory will be reflected in py4DSTEM imports from Python interpreters within this environment.
Create a new branch, and make any edits.
To merge back in to the main repository, submit a pull request to the dev branch of github.com/py4dstem/py4DSTEM.
## More information
### Dependencies
* numpy
* scipy
* h5py
* ncempy
* pymatgen
* numba
* scikit-image
* scikit-learn
* PyQt5
* pyqtgraph
* qtconsole
* ipywidgets
* tqdm
### Optional dependencies
* ipyparallel
* dask
### Versioning
v. 0.9.5
### License
GNU GPLv3
### Acknowledgements
The developers gratefully acknowledge the financial support of the Toyota Research Institute for the research and development time which made this project possible.
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
PyPI 官网下载 | py4DSTEM-0.9.5.tar.gz (105个子文件)
setup.cfg 38B
README.md 5KB
PKG-INFO 6KB
PKG-INFO 6KB
panels.py 55KB
viewer.py 40KB
braggvectorclassification.py 37KB
diskdetection.py 31KB
dialogs.py 30KB
cartesian_to_polarelliptical_transform.py 25KB
dpc.py 24KB
write.py 23KB
utils.py 22KB
diskdetection_parallel.py 20KB
h5rw.py 20KB
electroncount.py 18KB
_metadata.py 18KB
ellipticalCoords.py 16KB
datacube.py 16KB
read_py4DSTEM_legacy.py 14KB
read_py4DSTEM.py 14KB
virtualimage_viewer.py 12KB
pointlist.py 11KB
probetemplate.py 11KB
ssb.py 10KB
index.py 10KB
fit.py 10KB
kinematic.py 10KB
strain.py 9KB
gui_utils.py 9KB
initialguess.py 9KB
parameters.py 8KB
diffractionshifts.py 8KB
darkreference.py 8KB
append.py 7KB
utils.py 7KB
ellipticaldistortion.py 7KB
multicorr.py 7KB
amorph.py 7KB
relativity.py 7KB
read.py 7KB
dataobject.py 6KB
classutils.py 6KB
preprocess.py 5KB
cmaptopg.py 5KB
read_utils.py 5KB
rotation.py 4KB
braggvectormap.py 4KB
qpixelsize.py 4KB
log.py 4KB
single_atom_scatter.py 3KB
ImageViewMasked.py 3KB
virtualimage.py 3KB
strain_window.py 2KB
remove.py 2KB
copy.py 2KB
fit.py 2KB
rdf.py 2KB
read_dm.py 2KB
dataslice.py 2KB
test_virtualimage.py 2KB
diffraction.py 2KB
real.py 2KB
read_mrc_relativity.py 1KB
read_kitware_counted.py 1KB
read_gatan_K2_bin.py 1KB
read_empad.py 1KB
setup.py 1KB
aberrations.py 1KB
tqdmnd.py 1014B
runGUI.py 270B
metadata.py 252B
__init__.py 242B
test.py 237B
__init__.py 216B
functions.py 215B
__init__.py 171B
__init__.py 154B
__init__.py 148B
__init__.py 135B
__init__.py 121B
__init__.py 111B
__init__.py 91B
__init__.py 89B
__init__.py 81B
__init__.py 67B
__init__.py 66B
__init__.py 45B
__init__.py 44B
__init__.py 38B
__init__.py 35B
__init__.py 28B
__init__.py 24B
__init__.py 20B
version.py 20B
__init__.py 19B
__init__.py 18B
wdd.py 0B
__init__.py 0B
scatteringFactors.txt 27KB
共 105 条
- 1
- 2
资源评论
挣扎的蓝藻
- 粉丝: 13w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功