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

You get a Mixin, you get a Mixin, every ptycho class gets a Mixin #597

Merged
merged 130 commits into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
130 commits
Select commit Hold shift + click to select a range
f7a2deb
DCT-based poisson solver phase unwrapping
gvarnavi Dec 30, 2023
c85faa8
constraints refactoring
gvarnavi Dec 30, 2023
a4cb6f9
fixing reshaping bugs
gvarnavi Dec 30, 2023
7415621
cleaning up calibrations
gvarnavi Dec 30, 2023
b995222
cleaning up calculate rotation
gvarnavi Dec 30, 2023
8021a60
adding grid search functionality to optimize
gvarnavi Dec 31, 2023
b03fddb
removing tuning functions from subclasses - moved to optimizer
gvarnavi Dec 31, 2023
a6d35bb
small typo
gvarnavi Dec 31, 2023
9233880
cupy numpy bug
gvarnavi Dec 31, 2023
47adef7
refactoring object and probe methods
gvarnavi Dec 31, 2023
b44b2d2
multislice plotting tweaks
gvarnavi Dec 31, 2023
fcb0d65
moved read-only self-attribute calls up-front. Might remove all-toget…
gvarnavi Dec 31, 2023
6bdc8eb
cleaned up single-slice preprocess
gvarnavi Dec 31, 2023
dfc8aee
cleaned up multislice preprocess
gvarnavi Dec 31, 2023
a2b5ba3
cleaned up mixedstate preprocess
gvarnavi Dec 31, 2023
2e231ce
underscore typos
gvarnavi Dec 31, 2023
37607e1
underscore typos
gvarnavi Dec 31, 2023
d8e4d52
huh, not how super works
gvarnavi Dec 31, 2023
db8e4a5
cleaned up mixed-multi slice preprocess
gvarnavi Jan 1, 2024
c531a74
cleaned up overlap tomography preprocess
gvarnavi Jan 1, 2024
a24b925
removing redundant tune func from parallax
gvarnavi Jan 1, 2024
01d6ad6
moved single-slice forward and adjoint to methods.py
gvarnavi Jan 1, 2024
cda0cc3
added necessary multi-slice forward and adjoint methods
gvarnavi Jan 1, 2024
39d1f84
added necessary mixed-state forward and adjoint methods
gvarnavi Jan 1, 2024
c1481dd
added necessary mixed-state-multi-slce forward and adjoint methods
gvarnavi Jan 1, 2024
c8a2a84
removed redundant forward and adjoint methods from overlap tomo
gvarnavi Jan 1, 2024
f87a0b0
cleaned up single-slice reconstruct
gvarnavi Jan 2, 2024
b3c92d9
cleaned up multi-slice reconstruct
gvarnavi Jan 2, 2024
65c8d07
cleaned up mixed-state reconstruct
gvarnavi Jan 2, 2024
09ec6bc
cleaned up mixed-state multi-slice reconstruct
gvarnavi Jan 2, 2024
14c1e66
cleaned up overlap tomo reconstruct, different probes per tilt
gvarnavi Jan 2, 2024
4fcc778
moved show_transmitted probe
gvarnavi Jan 2, 2024
3820516
cleaned up self-consistency viz
gvarnavi Jan 2, 2024
2d1d4e4
oops, forgot to delete duplicate code
gvarnavi Jan 2, 2024
3551698
cleaned up position correction - is mixed state correct?
gvarnavi Jan 2, 2024
e4d9c94
more natural location for 3D function
gvarnavi Jan 2, 2024
1d75a73
added and cleaned up total position update functionality back in
gvarnavi Jan 2, 2024
b323e4c
modernized probe position correction viz
gvarnavi Jan 2, 2024
1275dab
starting viz overhaul
gvarnavi Jan 2, 2024
3345b01
remove redundant figax viz functions
gvarnavi Jan 2, 2024
9257242
added visualize_last functionality
gvarnavi Jan 2, 2024
f193c3c
visualize_all for single-slice
gvarnavi Jan 2, 2024
fbb8337
visualize_all for all
gvarnavi Jan 3, 2024
74821b6
small np cp bugs
gvarnavi Jan 3, 2024
550ee70
some figsize defaults
gvarnavi Jan 3, 2024
b141ddb
histogram scaling for all
gvarnavi Jan 3, 2024
e88e27f
renamed to ptycho-tomo, started magnetic refactoring
gvarnavi Jan 4, 2024
6223139
reconstruct functionality for iterative magnetic
gvarnavi Jan 5, 2024
85d1b76
splitting up constraints
gvarnavi Jan 5, 2024
360741a
bumping python version to 3.10
gvarnavi Jan 5, 2024
f23d8cc
correctly handling collective updates constraints
gvarnavi Jan 5, 2024
1e4e592
finished with magnetic ptycho
gvarnavi Jan 5, 2024
65448cb
phase unwrapping bugfixes
gvarnavi Jan 6, 2024
b4eb43c
better support for multiple measurements probe properties
gvarnavi Jan 6, 2024
a442fd0
generalized show_fourier_probe, added general show_probe, added inten…
gvarnavi Jan 6, 2024
bcd6f26
visual tweaks
gvarnavi Jan 6, 2024
9114df5
removed leading iterative_ from file names and trailing Reconstructio…
gvarnavi Jan 7, 2024
5990942
typo
gvarnavi Jan 7, 2024
6669195
FFT plotting improvements
gvarnavi Jan 7, 2024
2c0f60a
Revert "FFT plotting improvements"
gvarnavi Jan 7, 2024
bb8b70f
Revert "typo"
gvarnavi Jan 7, 2024
923ae77
Revert "removed leading iterative_ from file names and trailing Recon…
gvarnavi Jan 7, 2024
b7b8f91
Merge remote-tracking branch 'origin/phase_contrast' into phase_contr…
gvarnavi Jan 7, 2024
9c4c51f
removed leading iterative_ from file names and trailing Reconstructio…
gvarnavi Jan 7, 2024
040330a
typo
gvarnavi Jan 7, 2024
6d7fd3c
FFT plotting improvements
gvarnavi Jan 7, 2024
8d85db8
switched divergence field functions to be periodic
gvarnavi Jan 7, 2024
f4bc148
magnetic ptycho-tomo preprocessing
gvarnavi Jan 7, 2024
aac0cd5
magnetic ptycho tomo constraints
gvarnavi Jan 7, 2024
4ab72fe
magnetic ptycho tomo works
gvarnavi Jan 7, 2024
31b2dae
improved 3D visualizations
gvarnavi Jan 8, 2024
faef19e
ragged list partitions support for complex plotting
gvarnavi Jan 8, 2024
c9156dc
added detector plane resampling
gvarnavi Jan 8, 2024
6470fd8
cleaned up cupyx.scipy imports
gvarnavi Jan 10, 2024
951162e
added storage support for singleslice. other classes likely broken, w…
gvarnavi Jan 11, 2024
5f0da12
actually enable overwriting device
gvarnavi Jan 11, 2024
cc6619f
fixing single-slice projection sets bugs with storage refactor
gvarnavi Jan 11, 2024
4677df5
cleaning up multislice for device. changed propagator tilt convention…
gvarnavi Jan 11, 2024
d8c3c29
added storage support to multislice
gvarnavi Jan 11, 2024
a522668
adding mixed-state storage support
gvarnavi Jan 11, 2024
7dbb931
added storage to mixed-multislice
gvarnavi Jan 11, 2024
c14966f
attrs copying cleanup
gvarnavi Jan 11, 2024
8a84e3c
added storage to dpc
gvarnavi Jan 11, 2024
5ff1dcf
more dpc viz tweaks
gvarnavi Jan 12, 2024
71191c0
adding vectorized flag to CoM
gvarnavi Jan 12, 2024
f664f42
dp_mask can be None, dub
gvarnavi Jan 12, 2024
529f8fc
adding batch size in single-slice preprocess
gvarnavi Jan 12, 2024
ca4d02e
adding to dpc, multislice, mixedstate, multislice-mixedstate
gvarnavi Jan 12, 2024
f15278a
adding some basic device cleanup to parallax, no storage yer
gvarnavi Jan 12, 2024
54cea8d
magnetic ptycho preprocess storage support
gvarnavi Jan 12, 2024
3c94a2d
added full storage support for magnetic ptycho
gvarnavi Jan 12, 2024
5f79bb1
added storage to ptycho tomo
gvarnavi Jan 12, 2024
d08202f
added storage support to magnetic ptycho-tomo
gvarnavi Jan 12, 2024
53e7c06
transferring parallax bug Steph found in phase_contrast
gvarnavi Jan 12, 2024
b906763
tweaks to clear_fft_cache
gvarnavi Jan 12, 2024
1b8ad3a
adding FFT-based DCT-II implementations, fixing cupy10.6 bug
gvarnavi Jan 13, 2024
6f49682
small numpy bug
gvarnavi Jan 13, 2024
13f0f5c
cleaned up cupy 12 feature guarding using try-except
gvarnavi Jan 13, 2024
c25a58e
restored scikit functionality
gvarnavi Jan 13, 2024
fbc8436
scikit-image by default, poisson as flag
gvarnavi Jan 13, 2024
bb54465
various fixes discovered while making testing notebook
gvarnavi Jan 13, 2024
7dc1d98
position update bug fix
smribet Jan 13, 2024
e67109a
syntax update for bug fix
smribet Jan 13, 2024
00d4955
complex plotting grid search
smribet Jan 13, 2024
62cb644
multislice grid search plotting
smribet Jan 13, 2024
2deb45a
read/write bug fix
smribet Jan 15, 2024
770cd01
show hanning window fix
smribet Jan 16, 2024
58c2e43
typo fix
smribet Jan 16, 2024
22cb993
mixedstate probe fourier constraint bug fix
smribet Jan 16, 2024
8a055e1
constrain first aperture only
smribet Jan 17, 2024
ee11e9b
parallax verbosity to True
gvarnavi Jan 19, 2024
f760e28
ms butterworth bug
gvarnavi Jan 19, 2024
b06e64f
silly George
gvarnavi Jan 19, 2024
f6b1c54
cleaning up warnings
gvarnavi Jan 19, 2024
bdf2fe3
simplifying warnings, restructuring single slice regularization flags
gvarnavi Jan 19, 2024
108fd5f
one more read write bug fix
smribet Jan 20, 2024
5706d08
more flags more problems: multislice, mixed state, and mixed-multislice
smribet Jan 20, 2024
7bc7b55
dpc
smribet Jan 20, 2024
d176f83
mistake in multislice
smribet Jan 20, 2024
bc6ad35
flags to magnetic ptycho
gvarnavi Jan 21, 2024
c11102d
ptycho tomo flags
gvarnavi Jan 21, 2024
88c509d
magnetic ptycho tomo flags
gvarnavi Jan 21, 2024
98b1b64
stricter flags
gvarnavi Jan 21, 2024
d1197e8
perhaps i forgot an underscore
gvarnavi Jan 21, 2024
c229916
small parallax change
gvarnavi Jan 21, 2024
e733076
small read-write changes
gvarnavi Jan 21, 2024
306c20d
removing switch_obj_iter
gvarnavi Jan 21, 2024
c4691d3
remore switch_iter from all classes
gvarnavi Jan 21, 2024
8b752aa
show_fft bug
smribet Jan 21, 2024
f20f3e4
Merge remote-tracking branch 'origin/dev' into phase_contrast_refactor
smribet Jan 22, 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/check_install_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
allow_failure: [false]
runs-on: [ubuntu-latest]
architecture: [x86_64]
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12"]
# include:
# - python-version: "3.12.0-beta.4"
# runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check_install_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
allow_failure: [false]
runs-on: [ubuntu-latest, windows-latest, macos-latest]
architecture: [x86_64]
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12"]
#include:
# - python-version: "3.12.0-beta.4"
# runs-on: ubuntu-latest
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 @@ -20,7 +20,7 @@ jobs:
allow_failure: [false]
runs-on: [ubuntu-latest]
architecture: [x86_64]
python-version: ["3.9", "3.12"]
python-version: ["3.10", "3.12"]
# Currently no public runners available for this but this or arm64 should work next time
# include:
# - python-version: "3.10"
Expand All @@ -42,4 +42,4 @@ jobs:
python -c "import py4DSTEM; print(py4DSTEM.__version__)"
# - name: Check machine arch
# run: |
# python -c "import platform; print(platform.machine())"
# python -c "import platform; print(platform.machine())"
4 changes: 3 additions & 1 deletion py4DSTEM/preprocess/preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,9 @@ def resample_data_diffraction(
resampling_factor = np.array(output_size) / np.array(datacube.shape[-2:])

resampling_factor = np.concatenate(((1, 1), resampling_factor))
datacube.data = zoom(datacube.data, resampling_factor, order=1)
datacube.data = zoom(
datacube.data, resampling_factor, order=1, mode="grid-wrap", grid_mode=True
)
datacube.calibration.set_Q_pixel_size(
datacube.calibration.get_Q_pixel_size() / resampling_factor[2]
)
Expand Down
18 changes: 9 additions & 9 deletions py4DSTEM/process/phase/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

_emd_hook = True

from py4DSTEM.process.phase.iterative_dpc import DPCReconstruction
from py4DSTEM.process.phase.iterative_mixedstate_multislice_ptychography import MixedstateMultislicePtychographicReconstruction
from py4DSTEM.process.phase.iterative_mixedstate_ptychography import MixedstatePtychographicReconstruction
from py4DSTEM.process.phase.iterative_multislice_ptychography import MultislicePtychographicReconstruction
from py4DSTEM.process.phase.iterative_overlap_magnetic_tomography import OverlapMagneticTomographicReconstruction
from py4DSTEM.process.phase.iterative_overlap_tomography import OverlapTomographicReconstruction
from py4DSTEM.process.phase.iterative_parallax import ParallaxReconstruction
from py4DSTEM.process.phase.iterative_simultaneous_ptychography import SimultaneousPtychographicReconstruction
from py4DSTEM.process.phase.iterative_singleslice_ptychography import SingleslicePtychographicReconstruction
from py4DSTEM.process.phase.dpc import DPC
from py4DSTEM.process.phase.magnetic_ptychographic_tomography import MagneticPtychographicTomography
from py4DSTEM.process.phase.magnetic_ptychography import MagneticPtychography
from py4DSTEM.process.phase.mixedstate_multislice_ptychography import MixedstateMultislicePtychography
from py4DSTEM.process.phase.mixedstate_ptychography import MixedstatePtychography
from py4DSTEM.process.phase.multislice_ptychography import MultislicePtychography
from py4DSTEM.process.phase.parallax import Parallax
from py4DSTEM.process.phase.ptychographic_tomography import PtychographicTomography
from py4DSTEM.process.phase.singleslice_ptychography import SingleslicePtychography
from py4DSTEM.process.phase.parameter_optimize import OptimizationParameter, PtychographyOptimizer

# fmt: on
Loading