Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update main to version 1.1.0 #20

Merged
merged 38 commits into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
f34712e
EMPAD2 load progress in status bar
sezelt Feb 12, 2024
91603d8
add arina reader
sezelt Feb 17, 2024
244bdc1
fix incorrect positioning of realspace detector
sezelt Feb 17, 2024
d165ed4
use clipped autoscaling
sezelt Feb 17, 2024
1765099
add complex FFT view
sezelt Mar 6, 2024
a29f6a9
format with black
sezelt Mar 6, 2024
36e4591
add statistics for displays
sezelt Mar 6, 2024
4548c98
add pre-commit config
sezelt Mar 6, 2024
664fb20
disable some pre-commit hooks
sezelt Mar 6, 2024
604f3e5
VERSION ONE POINT OH
sezelt Mar 6, 2024
80ae865
add ResizeDialog for picking appropriate data shapes (not yet used)
sezelt Mar 17, 2024
1465a76
show reshape dialog when a H5 file has 3D data
sezelt Mar 17, 2024
97b84a8
add reshape menu to adjust shape any time
sezelt Mar 17, 2024
75fadef
Merge pull request #15 from sezelt/dev
sezelt Apr 2, 2024
58c9a74
add pyrightconfig to gitignore
sezelt Apr 15, 2024
13d1cb9
starting to add tooltip
sezelt May 19, 2024
1d39a78
move tooltip code around
sezelt May 19, 2024
f95b1e2
Merge remote-tracking branch 'origin/dev' into dev
sezelt May 21, 2024
ee995ce
tooltip mostly working
sezelt May 23, 2024
aad34c4
Merge remote-tracking branch 'origin/dev' into dev
sezelt May 23, 2024
498ee05
add autoscale range options
sezelt May 24, 2024
2947c2d
move autorange to a new menu
sezelt May 24, 2024
f0db42d
remove reconstruction menu
sezelt May 24, 2024
cd4e224
bump version
sezelt May 24, 2024
2fa91c3
change hyphen to en-dash
sezelt May 26, 2024
a637d46
prevent tooltip before loading data
sezelt Jul 10, 2024
72e3e98
add calibration menu
sezelt Jul 11, 2024
d51aa56
window FFTs
sezelt Jul 12, 2024
9079cd3
avoid unbound variable
sezelt Jul 12, 2024
6e21f54
enable calibration using virtual detector for reference
sezelt Jul 12, 2024
ebb7b67
make image display in separate function from detector calculation
sezelt Jul 12, 2024
783fe53
initial commit adding tcBF reconstruction
sezelt Jul 12, 2024
1a2f811
separate rendering from image computation so rescaling is instantaneous
sezelt Jul 12, 2024
881500c
starting to add manual tcBF dialog
sezelt Jul 12, 2024
1bb7982
remove random cupy import
sezelt Jul 15, 2024
6d057de
adding more to tcBF dialog
sezelt Jul 25, 2024
862f10d
disable manual tcBF menu while under construction
sezelt Jul 25, 2024
423b3cf
Merge pull request #19 from sezelt/dev
sezelt Jul 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/black.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: psf/black@stable
- uses: psf/black@stable
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
.pydevproject
*.swp
*.ipynb_checkpoints*
pyrightconfig.json

# Folders #
.idea/
Expand Down
14 changes: 14 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
# - id: trailing-whitespace
# - id: end-of-file-fixer
# - id: check-yaml
- id: check-added-large-files
- repo: https://github.com/psf/black
rev: 24.2.0
hooks:
- id: black
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cff-version: 1.1.0
message: "If you use this software, please cite the accompanying paper."
abstract: "Scanning transmission electron microscopy (STEM) allows for imaging, diffraction, and spectroscopy of materials on length scales ranging from microns to atoms. By using a high-speed, direct electron detector, it is now possible to record a full two-dimensional (2D) image of the diffracted electron beam at each probe position, typically a 2D grid of probe positions. These 4D-STEM datasets are rich in information, including signatures of the local structure, orientation, deformation, electromagnetic fields, and other sample-dependent properties. However, extracting this information requires complex analysis pipelines that include data wrangling, calibration, analysis, and visualization, all while maintaining robustness against imaging distortions and artifacts. In this paper, we present py4DSTEM, an analysis toolkit for measuring material properties from 4D-STEM datasets, written in the Python language and released with an open-source license. We describe the algorithmic steps for dataset calibration and various 4D-STEM property measurements in detail and present results from several experimental datasets. We also implement a simple and universal file format appropriate for electron microscopy data in py4DSTEM, which uses the open-source HDF5 standard. We hope this tool will benefit the research community and help improve the standards for data and computational methods in electron microscopy, and we invite the community to contribute to this ongoing project."
authors:
authors:
-
affiliation: "National Center for Electron Microscopy, Molecular Foundry, Lawrence Berkeley National Laboratory, 1 Cyclotron Road, Berkeley, CA 94720, USA"
family-names: Savitzky
Expand Down
1 change: 0 additions & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -672,4 +672,3 @@ may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.

16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

# The `py4DSTEM` GUI

This repository hosts the `pyqt` based graphical 4D--STEM data browser that was originally part of **py4DSTEM** until version 0.13.11.
This repository hosts the `pyqt` based graphical 4D--STEM data browser that was originally part of **py4DSTEM** until version 0.13.11.

## Installation
The GUI is available on PyPI and conda-forge:
## Installation
The GUI is available on PyPI and conda-forge:

`pip install py4D-browser`

Expand All @@ -15,19 +15,19 @@ The GUI is available on PyPI and conda-forge:
Run `py4DGUI` in your terminal to open the GUI. Then just drag and drop a 4D-STEM dataset into the window!

### Controls
* Move the virtual detector and the real-space selector using the mouse or using the keyboard shortcuts: WASD moves the detector and IJKL moves the selector, and holding down shift moves 5 pixels at a time.
* Auto scaling of both views is on by default. Press the "Autoscale" buttons in the bottom right to disable. Press either button to apply automatic scaling once, or Shift + click to lock autoscaling back on.
* Move the virtual detector and the real-space selector using the mouse or using the keyboard shortcuts: WASD moves the detector and IJKL moves the selector, and holding down shift moves 5 pixels at a time.
* Auto scaling of both views is on by default. Press the "Autoscale" buttons in the bottom right to disable. Press either button to apply automatic scaling once, or Shift + click to lock autoscaling back on.
* Different shapes of virtual detector are available in the "Detector Shape" menu, and different detector responses are available in the "Detector Response" menu.
* The information in the bottom bar contains the details of the virtual detector used to generate the images, and can be entered into py4DSTEM to generate the same image.
* The information in the bottom bar contains the details of the virtual detector used to generate the images, and can be entered into py4DSTEM to generate the same image.
* The FFT pane can be switched between displaying the FFT of the virtual image and displaying the [exit wave power cepstrum](https://doi.org/10.1016/j.ultramic.2020.112994).
* Virtual images can be exported either as the scaled and clipped displays shown in the GUI or as raw data. The exact datatype stored in the raw TIFF image depends on both the datatype of the dataset and the type of virtual image being displayed (in particular, integer datatypes are converted internally to floating point to prevent overflows when generating any synthesized virtual images).
* If the [EMPAD-G2 Raw Reader](https://github.com/sezelt/empad2) is installed in the same environment, an extra menu will appear that allows the concatenated binary format data to be background subtracted and calibrated in the GUI. You can also save the calibrated data as an HDF5 file for later analysis.
* If the [EMPAD-G2 Raw Reader](https://github.com/sezelt/empad2) is installed in the same environment, an extra menu will appear that allows the concatenated binary format data to be background subtracted and calibrated in the GUI. You can also save the calibrated data as an HDF5 file for later analysis.

![Demonstration](/images/demo.gif)

The keyboard map in the Help menu was made using [this tool](https://archie-adams.github.io/keyboard-shortcut-map-maker/) and the map file is in the top level of this repo.

## About
## About

![py4DSTEM logo](/images/py4DSTEM_logo.png)

Expand Down
16 changes: 8 additions & 8 deletions py4DGUI-keymap.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@

.ulButtons ul {
margin: 0;
list-style-type: none;
text-align: center;
list-style-type: none;
text-align: center;
background-color: #b4b3bd;
}
.ulButtons ul li {
Expand Down Expand Up @@ -51,7 +51,7 @@
}

.bodyStyle {
width:1109px;
width:1109px;
margin:0 auto;
}

Expand All @@ -68,8 +68,8 @@

/* Footer styling. */
footer {
background-color: #b4b3bd;
margin-top: 20px;
background-color: #b4b3bd;
margin-top: 20px;
margin-bottom: 0;
}

Expand All @@ -79,12 +79,12 @@

.footer-div {
width:960px;
margin:0 auto;
margin:0 auto;
background-color: #b4b3bd;
}

#to-top-button{
margin-left:426px;
margin-left:426px;
padding-top: 14px;
}
#to-top-input {
Expand Down Expand Up @@ -689,4 +689,4 @@ <h3 style="float: left;" class="editable">Keyboard Shortcuts</h3>
</div>

</div> <!-- End of keyboard. -->
</li></ol></div></body></html>
</li></ol></div></body></html>
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "py4D_browser"
version = "0.999999"
version = "1.1.0"
authors = [
{ name="Steven Zeltmann", email="[email protected]" },
]
Expand Down Expand Up @@ -43,4 +43,4 @@ include-package-data = true
where = ["src"]

[tool.setuptools.package-data]
py4D_browser = ["*.png"]
py4D_browser = ["*.png"]
Loading
Loading