Skip to content

Commit

Permalink
Merge pull request py4dstem#597 from py4dstem/phase_contrast_refactor
Browse files Browse the repository at this point in the history
You get a Mixin, you get a Mixin, every ptycho class gets a Mixin

Former-commit-id: 8096597
  • Loading branch information
sezelt authored Jan 22, 2024
2 parents cc4f407 + 399300e commit a1be36d
Show file tree
Hide file tree
Showing 32 changed files with 15,744 additions and 24,174 deletions.
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

0 comments on commit a1be36d

Please sign in to comment.