Skip to content

Commit

Permalink
Release into main version 0.14.10 (#634)
Browse files Browse the repository at this point in the history
* Adding more papers

* more cites

* bug fix

* Revert "bug fix"

This reverts commit cbce25c.

* Bump tj-actions/changed-files from 41 to 42

Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 41 to 42.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](tj-actions/changed-files@v41...v42)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump github/super-linter from 4 to 5

Bumps [github/super-linter](https://github.com/github/super-linter) from 4 to 5.
- [Changelog](https://github.com/github/super-linter/blob/main/docs/release-process.md)
- [Commits](github/super-linter@v4...v5)

---
updated-dependencies:
- dependency-name: github/super-linter
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump actions/checkout from 3 to 4

Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump actions/setup-python from 2 to 5

Bumps [actions/setup-python](https://github.com/actions/setup-python) from 2 to 5.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](actions/setup-python@v2...v5)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* num_probes_fit_aberrations

* flip 180 option for read arina

* ptycho positions offset

* remove 180 flip

* tweaking amorphous fitting function

* median_filter_masked_pixels

* save polar aberrations instead

* read-write compatibility

* uncertainty viz bug

* adding force_com_measured functionality to ptycho

* clean up force_com_measured

* adding DP normalization progress bar

* moving fov_mask calc to as needed

* adding detector_fourier_mask

* bug fix for filtering

* Friedel origin finder, various FEM tools (#607)

* bug fix

* Revert "bug fix"

This reverts commit cbce25c.

* num_probes_fit_aberrations

* flip 180 option for read arina

* ptycho positions offset

* remove 180 flip

* median_filter_masked_pixels

* save polar aberrations instead

* read-write compatibility

* uncertainty viz bug

* adding force_com_measured functionality to ptycho

* clean up force_com_measured

* adding DP normalization progress bar

* moving fov_mask calc to as needed

* adding detector_fourier_mask

* Auto center finding works!

* Adding center finding without a mask

* Adding plot range to show_origin_fit, fixing bug

* Adding local mean / variance functions for FEM

* Adding symmetry analysis and plotting

* Fix divide by zero in correlation origin finding function

* bug fix for filtering

* adding initial commit for friedel correlation origin finder

* Correlation working, but mask still buggy

* Fixing the masked CC

* Simplifying the expression

* cleaning up - still need subpixel shifts

* Update origin fitting visualization

* adding device arg to upsample function

* First attempt to add Friedel origin finding to ptycho

GPU not yet working

* Adding GPU implementation warning

* parabolic subpixel fitting

* minor updates

* Going back to dev version of phase contrast

* Changing np to xp for GPU compatibility

* Fixing xp = np device options

* Revering phase contrast options back to dev

* Cleaning up code, fixing GPU support

* black formatting

* black updates

* Adding annular symmetry plotting function

* black formatting

* cleaning typos and dead code and such

* Update py4DSTEM/process/polar/polar_analysis.py

Co-authored-by: Steve Zeltmann <[email protected]>

---------

Co-authored-by: Stephanie Ribet <[email protected]>
Co-authored-by: Georgios Varnavides <[email protected]>
Co-authored-by: gvarnavi <[email protected]>
Co-authored-by: SE Zeltmann <[email protected]>
Co-authored-by: Steve Zeltmann <[email protected]>

* Default threshold should be zero

* Release memory after Bayesian optimization (#599)

* do not retain optimization function after finished running, to release memory

* update comment

* set clear_fft_cache off in optimizer defaults

* Update parameter_optimize.py

* format with black 24.1.1

* Update parameter_optimize.py

* format with black

* remove duplicate make_fourier_coords_2D

* format with black

* Added phase_contrast warning in README (#608)

* switching to non-vectorized datacube resampling

* fixing region_of_interest_shape flag

* adding cross-correlation function

* more careful array sums interpolation

* Bump gdown to 5.1.0 (#617)

* docstring change per Colin review

* DP resampling mode to nearest

* adding fourier_mask in forward mode, ie pre error calculation

* small bugfix, moving reset before object_type change

* parallax odd pixel padding bugfix

* parallax upsample, fit, and correct should return self

* removing Wiener filter

* fixing depth sectioning

* Bump tj-actions/changed-files from 42 to 43 (#629)

Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 42 to 43.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](tj-actions/changed-files@v42...v43)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fixing aberration correction for odd radial symmetries. I think the sign ought to be negative, still checking with sims

* ACOM module - fix for .ang file writer (#382)

* adding annotation import

* fft normalization

* upsampling limit bugs

* bilinear sampling during position correction

* sequential numerator-denominator pixel rolling to save memory

* some useful warnings for now

* add occupancy to CIF reader

* add occupancy to structure factors

* format with black

* removing optional conda comment

* adding dependencies comment

* Adding correlation metrics

* Correlation coefs finished

* Black formatting

* normalize_order = 0 bug

* plotting fixes

* switching to gray

* allowing python 12.1

* changing python requirement to <3.13

* changing install requirements

* adding initial fixes

* changing how peaks are accessed

* changing to PLA from BraggVectors

* changing to PLA from BraggVectors

* moving import to top of file

* black

* removing hardcoded link to sample collections

* adding overwrite

* typo

* typo

* removing accidental noteobok

* back to hardcoded id

* changing filename for FCU-Net file

* Adding ability to force filename for collection Items

* back to non hardcoded now gdrive function fixed

* removing print statements

* bumping allowed version of tensorflow

* black

* adding strain mapping back into WPF

* Finishing up

* Fixing minor bugs

* Black formatting

* removing test plotting

* doc strains for visualize strain

* bugs

* doc string update

* fixing reset=False bug

* explicit bin order

* some plotting preferences

* fixing upsampling limits

* explicit aberration orders fit

* fixing abtem bug, adding conversion to polar property

* adding ability to pass descan_correction_fit_function

* DCT-based poisson solver phase unwrapping

* constraints refactoring

* fixing reshaping bugs

* cleaning up calibrations

* cleaning up calculate rotation

* adding grid search functionality to optimize

* removing tuning functions from subclasses - moved to optimizer

* Update corr_kernel_size documentation

* small typo

* cupy numpy bug

* refactoring object and probe methods

* multislice plotting tweaks

* moved read-only self-attribute calls up-front. Might remove all-together, especially for positions

* cleaned up single-slice preprocess

* cleaned up multislice preprocess

* cleaned up mixedstate preprocess

* underscore typos

* underscore typos

* huh, not how super works

* cleaned up mixed-multi slice preprocess

* cleaned up overlap tomography preprocess

* removing redundant tune func from parallax

* moved single-slice forward and adjoint to methods.py

* added necessary multi-slice forward and adjoint methods

* added necessary mixed-state forward and adjoint methods

* added necessary mixed-state-multi-slce forward and adjoint methods

* removed redundant forward and adjoint methods from overlap tomo

* cleaned up single-slice reconstruct

* cleaned up multi-slice reconstruct

* cleaned up mixed-state reconstruct

* cleaned up mixed-state multi-slice reconstruct

* cleaned up overlap tomo reconstruct, different probes per tilt

* moved show_transmitted probe

* cleaned up self-consistency viz

* oops, forgot to delete duplicate code

* cleaned up position correction - is mixed state correct?

* more natural location for 3D function

* Bump tj-actions/changed-files from 39 to 41 in /.github/workflows

Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 39 to 41.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](tj-actions/changed-files@v39...v41)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* added and cleaned up total position update functionality back in

* modernized probe position correction viz

* starting viz overhaul

* remove redundant figax viz functions

* added visualize_last functionality

* visualize_all for single-slice

* visualize_all for all

* small np cp bugs

* some figsize defaults

* histogram scaling for all

* added virtual detector mask

* adding dependabot.yml

* update to check_config workflow

* black

* adding dp_mask argument

* renamed to ptycho-tomo, started magnetic refactoring

* arina reader bug fix

* reconstruct functionality for iterative magnetic

* splitting up constraints

* bumping python version to 3.10

* correctly handling collective updates constraints

* Bugfix for forced scan sampling

Correctly set scan units when `force_scan_sampling` is used

* finished with magnetic ptycho

* phase unwrapping bugfixes

* Update py4DSTEM/io/filereaders/read_arina.py

Co-authored-by: Steve Zeltmann <[email protected]>

* Update py4DSTEM/process/phase/utils.py

Co-authored-by: Steve Zeltmann <[email protected]>

* Update py4DSTEM/process/phase/utils.py

Co-authored-by: Steve Zeltmann <[email protected]>

* Update py4DSTEM/process/phase/utils.py

Co-authored-by: Steve Zeltmann <[email protected]>

* Update py4DSTEM/process/phase/utils.py

Co-authored-by: Steve Zeltmann <[email protected]>

* better support for multiple measurements probe properties

* broadcasting polar coordinates

* Update py4DSTEM/process/phase/utils.py

Co-authored-by: Steve Zeltmann <[email protected]>

* Update py4DSTEM/process/phase/utils.py

Co-authored-by: Steve Zeltmann <[email protected]>

* docstrings

* vectorized_fourier_resample docstrings

* generalized show_fourier_probe, added general show_probe, added intensity reporting

* visual tweaks

* removed leading iterative_ from file names and trailing Reconstruction from class names

* typo

* FFT plotting improvements

* Revert "FFT plotting improvements"

This reverts commit 6669195.

* Revert "typo"

This reverts commit 5990942.

* Revert "removed leading iterative_ from file names and trailing Reconstruction from class names"

This reverts commit 9114df5.

* removed leading iterative_ from file names and trailing Reconstruction from class names

* typo

* FFT plotting improvements

* switched divergence field functions to be periodic

* magnetic ptycho-tomo preprocessing

* magnetic ptycho tomo constraints

* magnetic ptycho tomo works

* improved 3D visualizations

* ragged list partitions support for complex plotting

* added detector plane resampling

* cleaned up cupyx.scipy imports

* added storage support for singleslice. other classes likely broken, will fix tomorrow

* actually enable overwriting device

* fixing single-slice projection sets bugs with storage refactor

* cleaning up multislice for device. changed propagator tilt convention to negative mrad

* added storage support to multislice

* adding mixed-state storage support

* added storage to mixed-multislice

* attrs copying cleanup

* added storage to dpc

* more dpc viz tweaks

* adding vectorized flag to CoM

* dp_mask can be None, dub

* adding batch size in single-slice preprocess

* adding to dpc, multislice, mixedstate, multislice-mixedstate

* adding some basic device cleanup to parallax, no storage yer

* magnetic ptycho preprocess storage support

* added full storage support for magnetic ptycho

* added storage to ptycho tomo

* added storage support to magnetic ptycho-tomo

* transferring parallax bug Steph found in phase_contrast

* Update CONTRIBUTORS.md

* Update CONTRIBUTORS.md

* Update CONTRIBUTORS.md

* Update CONTRIBUTORS.md

* Update CONTRIBUTORS.md

* tweaks to clear_fft_cache

* Create CODE_OF_CONDUCT.md

This is a suggested template that seems widely used and seems reasonable.

* adding FFT-based DCT-II implementations, fixing cupy10.6 bug

* small numpy bug

* cleaned up cupy 12 feature guarding using try-except

* restored scikit functionality

* scikit-image by default, poisson as flag

* various fixes discovered while making testing notebook

* position update bug fix

* syntax update for bug fix

* complex plotting grid search

* multislice grid search plotting

* read/write bug fix

* show hanning window fix

* typo fix

* mixedstate probe fourier constraint bug fix

* constrain first aperture only

* parallax verbosity to True

* ms butterworth bug

* silly George

* cleaning up warnings

* simplifying warnings, restructuring single  slice regularization flags

* one more read write bug fix

* more flags more problems: multislice, mixed state, and mixed-multislice

* dpc

* mistake in multislice

* flags to magnetic ptycho

* ptycho tomo flags

* magnetic ptycho tomo flags

* stricter flags

* perhaps i forgot an underscore

* small parallax change

* small read-write changes

* removing switch_obj_iter

* remore switch_iter from all classes

* show_fft bug

* Bump tj-actions/changed-files from 41 to 42

Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 41 to 42.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](tj-actions/changed-files@v41...v42)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump github/super-linter from 4 to 5

Bumps [github/super-linter](https://github.com/github/super-linter) from 4 to 5.
- [Changelog](https://github.com/github/super-linter/blob/main/docs/release-process.md)
- [Commits](github/super-linter@v4...v5)

---
updated-dependencies:
- dependency-name: github/super-linter
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump actions/checkout from 3 to 4

Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump actions/setup-python from 2 to 5

Bumps [actions/setup-python](https://github.com/actions/setup-python) from 2 to 5.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](actions/setup-python@v2...v5)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* minor fixes

* Friedel origin finder, various FEM tools (#607)

* bug fix

* Revert "bug fix"

This reverts commit cbce25c.

* num_probes_fit_aberrations

* flip 180 option for read arina

* ptycho positions offset

* remove 180 flip

* median_filter_masked_pixels

* save polar aberrations instead

* read-write compatibility

* uncertainty viz bug

* adding force_com_measured functionality to ptycho

* clean up force_com_measured

* adding DP normalization progress bar

* moving fov_mask calc to as needed

* adding detector_fourier_mask

* Auto center finding works!

* Adding center finding without a mask

* Adding plot range to show_origin_fit, fixing bug

* Adding local mean / variance functions for FEM

* Adding symmetry analysis and plotting

* Fix divide by zero in correlation origin finding function

* bug fix for filtering

* adding initial commit for friedel correlation origin finder

* Correlation working, but mask still buggy

* Fixing the masked CC

* Simplifying the expression

* cleaning up - still need subpixel shifts

* Update origin fitting visualization

* adding device arg to upsample function

* First attempt to add Friedel origin finding to ptycho

GPU not yet working

* Adding GPU implementation warning

* parabolic subpixel fitting

* minor updates

* Going back to dev version of phase contrast

* Changing np to xp for GPU compatibility

* Fixing xp = np device options

* Revering phase contrast options back to dev

* Cleaning up code, fixing GPU support

* black formatting

* black updates

* Adding annular symmetry plotting function

* black formatting

* cleaning typos and dead code and such

* Update py4DSTEM/process/polar/polar_analysis.py

Co-authored-by: Steve Zeltmann <[email protected]>

---------

Co-authored-by: Stephanie Ribet <[email protected]>
Co-authored-by: Georgios Varnavides <[email protected]>
Co-authored-by: gvarnavi <[email protected]>
Co-authored-by: SE Zeltmann <[email protected]>
Co-authored-by: Steve Zeltmann <[email protected]>

* Release memory after Bayesian optimization (#599)

* do not retain optimization function after finished running, to release memory

* update comment

* set clear_fft_cache off in optimizer defaults

* Update parameter_optimize.py

* format with black 24.1.1

* Update parameter_optimize.py

* format with black

* Added phase_contrast warning in README (#608)

* Adding error for orix install requirements

* ACOM .ang file writer fixes

* format with black

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: alex-rakowski <[email protected]>
Co-authored-by: Georgios Varnavides <[email protected]>
Co-authored-by: bsavitzky <[email protected]>
Co-authored-by: Steven Zeltmann <[email protected]>
Co-authored-by: Steve Zeltmann <[email protected]>
Co-authored-by: Stephanie Ribet <[email protected]>
Co-authored-by: SE Zeltmann <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: gvarnavi <[email protected]>

* Fixing projection 2D thickness (#631)

* initial commit for projected potential

* Atom coordinates mostly working

Some tiling issue for image corners

* Projected potential now working with bugs

projection algebra definitely has a bug

* minor tweak

* Projected potentials fixed?

* adding figsize

* update docstring

* Adding thickness projection

* Fourier method makes boundary conditions difficult

* Updated plotting

* Adding robust fitting to ACOM strain mapping

* Updating matching

* Fixing thickness projection in 2D potentials

* black

* Remove testing lines.

* Trying (and failing) to figure out the potential units

* Black formatting

* Black again

* Versioning to 0.14.10

* Revert "Versioning to 0.14.10"

* Update pypi_upload.yml

* Update pypi_upload.yml

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Stephanie Ribet <[email protected]>
Co-authored-by: Georgios Varnavides <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: gvarnavi <[email protected]>
Co-authored-by: bsavitzky <[email protected]>
Co-authored-by: SE Zeltmann <[email protected]>
Co-authored-by: Steve Zeltmann <[email protected]>
Co-authored-by: Steven Zeltmann <[email protected]>
Co-authored-by: alex-rakowski <[email protected]>
Co-authored-by: Stephanie Ribet <[email protected]>
  • Loading branch information
11 people authored Mar 21, 2024
1 parent ef66541 commit 14fe5e1
Show file tree
Hide file tree
Showing 45 changed files with 2,123 additions and 833 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/black.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: psf/black@stable
4 changes: 2 additions & 2 deletions .github/workflows/build-flake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/check_install_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ jobs:
# runs-on: macos-latest
# allow_failure: true
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install repo
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/check_install_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ jobs:
# runs-on: macos-latest
# allow_failure: true
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install repo
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/check_install_quick.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ jobs:
# runs-on: macos-latest
# allow_failure: true
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install repo
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
# Full git history is needed to get a proper list of changed files within `super-linter`
fetch-depth: 0

- name: Lint Code Base
uses: github/super-linter@v4
uses: github/super-linter@v5
env:
VALIDATE_ALL_CODEBASE: false
VALIDATE_PYTHON_FLAKE8: true
Expand Down
94 changes: 47 additions & 47 deletions .github/workflows/pypi_upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@ on:
push:
branches:
- main
pull_request:
branches:
- main
# pull_request:
# branches:
# - main

jobs:
update_version:
runs-on: ubuntu-latest
name: Check if version.py is changed and update if the version.py is not changed
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GH_ACTION_VERSION_UPDATE }}
- name: Get changed files
id: changed-files-specific
uses: tj-actions/changed-files@v41
uses: tj-actions/changed-files@v43
with:
files: |
py4DSTEM/version.py
Expand All @@ -39,47 +39,47 @@ jobs:
git config --global user.email "[email protected]"
git config --global user.name "bsavitzky"
git commit -a -m "Auto-update version number (GH Action)"
git push origin main
sync_with_dev:
needs: update_version
runs-on: ubuntu-latest
name: Sync main with dev
steps:
- name: Sync main with dev
uses: actions/checkout@v3
with:
ref: dev
fetch-depth: 0
token: ${{ secrets.GH_ACTION_VERSION_UPDATE }}
- run: |
# set strategy to default merge
git config pull.rebase false
git config --global user.email "[email protected]"
git config --global user.name "bsavitzky"
git pull origin main --commit --no-edit
git push origin dev
deploy:
needs: sync_with_dev
runs-on: ubuntu-latest
name: Deploy to PyPI
steps:
- uses: actions/checkout@v3
with:
ref: dev
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
git push origin
# sync_with_dev:
# needs: update_version
# runs-on: ubuntu-latest
# name: Sync main with dev
# steps:
# - name: Sync main with dev
# uses: actions/checkout@v4
# with:
# ref: dev
# fetch-depth: 0
# token: ${{ secrets.GH_ACTION_VERSION_UPDATE }}
# - run: |
# # set strategy to default merge
# git config pull.rebase false
# git config --global user.email "[email protected]"
# git config --global user.name "bsavitzky"
# git pull origin main --commit --no-edit
# git push origin dev
# deploy:
# needs: sync_with_dev
# runs-on: ubuntu-latest
# name: Deploy to PyPI
# steps:
# - uses: actions/checkout@v4
# with:
# ref: dev
# - name: Set up Python
# uses: actions/setup-python@v5
# with:
# python-version: 3.8
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# pip install build
# - name: Build package
# run: python -m build
# - name: Publish package
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# user: __token__
# password: ${{ secrets.PYPI_API_TOKEN }}


2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

> :warning: **py4DSTEM version 0.14 update** :warning: Warning: this is a major update and we expect some workflows to break. You can still install previous versions of py4DSTEM [as discussed here](#legacyinstall)

> :warning: **Phase retrieval refactor version 0.14.9** :warning: Warning: The phase-retrieval modules in py4DSTEM (DPC, parallax, and ptychography) underwent a major refactor in version 0.14.9 and as such older tutorial notebooks will not work as expected. Notably, class names have been pruned to remove the trailing "Reconstruction" (`DPCReconstruction` -> `DPC` etc.), and regularization functions have dropped the `_iter` suffix (and are instead specified as boolean flags). We are working on updating the tutorial notebooks to reflect these changes. In the meantime, there's some more information in the relevant pull request [here](https://github.com/py4dstem/py4DSTEM/pull/597#issuecomment-1890325568).
![py4DSTEM logo](/images/py4DSTEM_logo.png)

Expand Down
63 changes: 41 additions & 22 deletions docs/papers.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,57 +5,76 @@

Please email [email protected] if you have used py4DSTEM for analysis and your paper is not listed below!

### 2022 (9)
### 2023 (0)

[Correlative image learning of chemo-mechanics in phase-transforming solids](https://www.nature.com/articles/s41563-021-01191-0), Nature Materials (2022)

[Correlative analysis of structure and chemistry of LixFePO4 platelets using 4D-STEM and X-ray ptychography](https://doi.org/10.1016/j.mattod.2021.10.031), Materials Today 52, 102 (2022).

[Visualizing Grain Statistics in MOCVD WSe2 through Four-Dimensional Scanning Transmission Electron Microscopy](https://doi.org/10.1021/acs.nanolett.1c04315), Nano Letters 22, 2578 (2022).
### 2022 (16)

[Electric field control of chirality](https://doi.org/10.1126/sciadv.abj8030), Science Advances 8 (2022).

[Real-Time Interactive 4D-STEM Phase-Contrast Imaging From Electron Event Representation Data: Less computation with the right representation](https://doi.org/10.1109/MSP.2021.3120981), IEEE Signal Processing Magazine 39, 25 (2022).
[Disentangling multiple scattering with deep learning: application to strain mapping from electron diffraction patterns](https://doi.org/10.1038/s41524-022-00939-9), J Munshi*, A Rakowski*, et al., npj Computational Materials 8, 254 (2022)

[Microstructural dependence of defect formation in iron-oxide thin films](https://doi.org/10.1016/j.apsusc.2022.152844), Applied Surface Science 589, 152844 (2022).
[Flexible CO2 Sensor Architecture with Selective Nitrogen Functionalities by One-Step Laser-Induced Conversion of Versatile Organic Ink](https://doi.org/10.1002/adfm.202207406), H Wang et al., Advanced Functional Materials 32, 2207406 (2022)

[Chemical and Structural Alterations in the Amorphous Structure of Obsidian due to Nanolites](https://doi.org/10.1017/S1431927621013957), Microscopy and Microanalysis 28, 289 (2022).
[Defect Contrast with 4D-STEM: Understanding Crystalline Order with Virtual Detectors and Beam Modification](https://doi.org/10.1093/micmic/ozad045) SM Ribet et al., Microscopy and Microanalysis 29, 1087 (2023).

[Nanoscale characterization of crystalline and amorphous phases in silicon oxycarbide ceramics using 4D-STEM](https://doi.org/10.1016/j.matchar.2021.111512), Materials Characterization 181, 111512 (2021).
[Structural heterogeneity in non-crystalline TexSe1−x thin films](https://doi.org/10.1063/5.0094600), B Sari et al., Applied Physics Letters 121, 012101 (2022)

[Disentangling multiple scattering with deep learning: application to strain mapping from electron diffraction patterns](https://arxiv.org/abs/2202.00204), arXiv:2202.00204 (2022).
[Cryogenic 4D-STEM analysis of an amorphouscrystalline polymer blend: Combined nanocrystalline and amorphous phase mapping](https://doi.org/10.1016/j.isci.2022.103882), J Donohue et al., iScience 25, 103882 (2022)

[Hydrogen-assisted decohesion associated with nanosized grain boundary κ-carbides in a high-Mn lightweight steel](https://doi.org/10.1016/j.actamat.2022.118392), MN Elkot et al., Acta Materialia
241, 118392 (2022)

[4D-STEM Ptychography for Electron-Beam-Sensitive Materials](https://doi.org/10.1021/acscentsci.2c01137), G Li et al., ACS Central Science 8, 1579 (2022)

[Developing a Chemical and Structural Understanding of the Surface Oxide in a Niobium Superconducting Qubit](https://doi.org/10.1021/acsnano.2c07913), AA Murthy et al., ACS Nano 16, 17257 (2022)

[Correlative image learning of chemo-mechanics in phase-transforming solids](https://www.nature.com/articles/s41563-021-01191-0), HD Deng et al., Nature Materials (2022)

[Correlative analysis of structure and chemistry of LixFePO4 platelets using 4D-STEM and X-ray ptychography](https://doi.org/10.1016/j.mattod.2021.10.031), LA Hughes*, BH Savitzky, et al., Materials Today 52, 102 (2022)

[Visualizing Grain Statistics in MOCVD WSe2 through Four-Dimensional Scanning Transmission Electron Microscopy](https://doi.org/10.1021/acs.nanolett.1c04315), A Londoño-Calderon et al., Nano Letters 22, 2578 (2022)

[Electric field control of chirality](https://doi.org/10.1126/sciadv.abj8030), P Behera et al., Science Advances 8 (2022)

[Real-Time Interactive 4D-STEM Phase-Contrast Imaging From Electron Event Representation Data: Less computation with the right representation](https://doi.org/10.1109/MSP.2021.3120981), P Pelz et al., IEEE Signal Processing Magazine 39, 25 (2022)

[Microstructural dependence of defect formation in iron-oxide thin films](https://doi.org/10.1016/j.apsusc.2022.152844), BK Derby et al., Applied Surface Science 589, 152844 (2022)

[Chemical and Structural Alterations in the Amorphous Structure of Obsidian due to Nanolites](https://doi.org/10.1017/S1431927621013957), E Kennedy et al., Microscopy and Microanalysis 28, 289 (2022)

[Nanoscale characterization of crystalline and amorphous phases in silicon oxycarbide ceramics using 4D-STEM](https://doi.org/10.1016/j.matchar.2021.111512), Ni Yang et al., Materials Characterization 181, 111512 (2021)



### 2021 (10)

[Cryoforged nanotwinned titanium with ultrahigh strength and ductility](https://doi.org/10.1126/science.abe7252), Science 16, 373, 1363 (2021).
[Cryoforged nanotwinned titanium with ultrahigh strength and ductility](https://doi.org/10.1126/science.abe7252), Science 16, 373, 1363 (2021)

[Strain fields in twisted bilayer graphene](https://doi.org/10.1038/s41563-021-00973-w), Nature Materials 20, 956 (2021).
[Strain fields in twisted bilayer graphene](https://doi.org/10.1038/s41563-021-00973-w), Nature Materials 20, 956 (2021)

[Determination of Grain-Boundary Structure and Electrostatic Characteristics in a SrTiO3 Bicrystal by Four-Dimensional Electron Microscopy](https://doi.org/10.1021/acs.nanolett.1c02960), Nanoletters 21, 9138 (2021).
[Determination of Grain-Boundary Structure and Electrostatic Characteristics in a SrTiO3 Bicrystal by Four-Dimensional Electron Microscopy](https://doi.org/10.1021/acs.nanolett.1c02960), Nanoletters 21, 9138 (2021)

[Local Lattice Deformation of Tellurene Grain Boundaries by Four-Dimensional Electron Microscopy](https://pubs.acs.org/doi/10.1021/acs.jpcc.1c00308), Journal of Physical Chemistry C 125, 3396 (2021).

[Extreme mixing in nanoscale transition metal alloys](https://doi.org/10.1016/j.matt.2021.04.014), Matter 4, 2340 (2021).
[Extreme mixing in nanoscale transition metal alloys](https://doi.org/10.1016/j.matt.2021.04.014), Matter 4, 2340 (2021)

[Multibeam Electron Diffraction](https://doi.org/10.1017/S1431927620024770), Microscopy and Microanalysis 27, 129 (2021).
[Multibeam Electron Diffraction](https://doi.org/10.1017/S1431927620024770), Microscopy and Microanalysis 27, 129 (2021)

[A Fast Algorithm for Scanning Transmission Electron Microscopy Imaging and 4D-STEM Diffraction Simulations](https://doi.org/10.1017/S1431927621012083), Microscopy and Microanalysis 27, 835 (2021).
[A Fast Algorithm for Scanning Transmission Electron Microscopy Imaging and 4D-STEM Diffraction Simulations](https://doi.org/10.1017/S1431927621012083), Microscopy and Microanalysis 27, 835 (2021)

[Fast Grain Mapping with Sub-Nanometer Resolution Using 4D-STEM with Grain Classification by Principal Component Analysis and Non-Negative Matrix Factorization](https://doi.org/10.1017/S1431927621011946), Microscopy and Microanalysis 27, 794
[Fast Grain Mapping with Sub-Nanometer Resolution Using 4D-STEM with Grain Classification by Principal Component Analysis and Non-Negative Matrix Factorization](https://doi.org/10.1017/S1431927621011946), Microscopy and Microanalysis 27, 794 (2021)

[Prismatic 2.0 – Simulation software for scanning and high resolution transmission electron microscopy (STEM and HRTEM)](https://doi.org/10.1016/j.micron.2021.103141), Micron 151, 103141 (2021).
[Prismatic 2.0 – Simulation software for scanning and high resolution transmission electron microscopy (STEM and HRTEM)](https://doi.org/10.1016/j.micron.2021.103141), Micron 151, 103141 (2021)

[4D-STEM of Beam-Sensitive Materials](https://doi.org/10.1021/acs.accounts.1c00073), Accounts of Chemical Research 54, 2543 (2021).
[4D-STEM of Beam-Sensitive Materials](https://doi.org/10.1021/acs.accounts.1c00073), Accounts of Chemical Research 54, 2543 (2021)


### 2020 (3)

[Patterned probes for high precision 4D-STEM bragg measurements](https://doi.org/10.1063/5.0015532), Ultramicroscopy 209, 112890 (2020).

[Patterned probes for high precision 4D-STEM bragg measurements](https://doi.org/10.1063/5.0015532), Ultramicroscopy 209, 112890 (2020)

[Tilted fluctuation electron microscopy](https://doi.org/10.1063/5.0015532), Applied Physics Letters 117, 091903 (2020).
[Tilted fluctuation electron microscopy](https://doi.org/10.1063/5.0015532), Applied Physics Letters 117, 091903 (2020)

[4D-STEM elastic stress state characterisation of a TWIP steel nanotwin](https://arxiv.org/abs/2004.03982), arXiv:2004.03982

8 changes: 5 additions & 3 deletions py4DSTEM/braggvectors/diskdetection_cuda.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,11 @@ def find_Bragg_disks_CUDA(
patt_idx = batch_idx * batch_size + subbatch_idx
rx, ry = np.unravel_index(patt_idx, (datacube.R_Nx, datacube.R_Ny))
batched_subcube[subbatch_idx, :, :] = cp.array(
datacube.data[rx, ry, :, :]
if filter_function is None
else filter_function(datacube.data[rx, ry, :, :]),
(
datacube.data[rx, ry, :, :]
if filter_function is None
else filter_function(datacube.data[rx, ry, :, :])
),
dtype=cp.float32,
)

Expand Down
32 changes: 27 additions & 5 deletions py4DSTEM/datacube/datacube.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,9 @@ def pad_Q(self, N=None, output_size=None):
d = pad_data_diffraction(self, pad_factor=N, output_size=output_size)
return d

def resample_Q(self, N=None, output_size=None, method="bilinear"):
def resample_Q(
self, N=None, output_size=None, method="bilinear", conserve_array_sums=False
):
"""
Resamples the data in diffraction space by resampling factor N, or to match output_size,
using either 'fourier' or 'bilinear' interpolation.
Expand All @@ -418,7 +420,11 @@ def resample_Q(self, N=None, output_size=None, method="bilinear"):
from py4DSTEM.preprocess import resample_data_diffraction

d = resample_data_diffraction(
self, resampling_factor=N, output_size=output_size, method=method
self,
resampling_factor=N,
output_size=output_size,
method=method,
conserve_array_sums=conserve_array_sums,
)
return d

Expand Down Expand Up @@ -479,13 +485,29 @@ def filter_hot_pixels(self, thresh, ind_compare=1, return_mask=False):
"""
from py4DSTEM.preprocess import filter_hot_pixels

d = filter_hot_pixels(
datacube = filter_hot_pixels(
self,
thresh,
ind_compare,
return_mask,
)
return d
return datacube

def median_filter_masked_pixels(self, mask, kernel_width: int = 3):
"""
This function fixes a datacube where the same pixels are consistently
bad. It requires a mask that identifies all the bad pixels in the dataset.
Then for each diffraction pattern, a median kernel is applied around each
bad pixel with the specified width.
"""
from py4DSTEM.preprocess import median_filter_masked_pixels

datacube = median_filter_masked_pixels(
self,
mask,
kernel_width,
)
return datacube

# Probe

Expand All @@ -494,7 +516,7 @@ def get_vacuum_probe(
ROI=None,
align=True,
mask=None,
threshold=0.2,
threshold=0.0,
expansion=12,
opening=3,
verbose=False,
Expand Down
2 changes: 1 addition & 1 deletion py4DSTEM/io/importfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def import_file(
"gatan_K2_bin",
"mib",
"arina",
"abTEM"
"abTEM",
# "kitware_counted",
], "Error: filetype not recognized"

Expand Down
2 changes: 1 addition & 1 deletion py4DSTEM/io/legacy/legacy13/v13_emd_classes/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ def Array_to_h5(array, group):
data = grp.create_dataset(
"data",
shape=array.data.shape,
data=array.data
data=array.data,
# dtype = type(array.data)
)
data.attrs.create(
Expand Down
Loading

0 comments on commit 14fe5e1

Please sign in to comment.