Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into strain_take_2
Browse files Browse the repository at this point in the history
  • Loading branch information
smribet committed Oct 16, 2023
2 parents 73b4fe7 + ce351d8 commit e457af6
Show file tree
Hide file tree
Showing 16 changed files with 31 additions and 31 deletions.
4 changes: 2 additions & 2 deletions py4DSTEM/braggvectors/diskdetection_aiml_cuda.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

try:
import cupy as cp
except:
raise ImportError("Import Error: Please install cupy before proceeding")
except ModuleNotFoundError:
raise ImportError("AIML CUDA Requires cupy")

try:
import tensorflow as tf
Expand Down
4 changes: 2 additions & 2 deletions py4DSTEM/preprocess/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

try:
import cupy as cp
except ImportError:
cp = None
except ModuleNotFoundError:
cp = np


def bin2D(array, factor, dtype=np.float64):
Expand Down
2 changes: 1 addition & 1 deletion py4DSTEM/process/diffraction/crystal_viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def plot_structure(
zs=xyz[sub, 2], # + d[2],
s=size_marker,
linewidth=2,
color=atomic_colors(ID_plot),
facecolors=atomic_colors(ID_plot),
edgecolor=[0, 0, 0],
)

Expand Down
4 changes: 2 additions & 2 deletions py4DSTEM/process/phase/iterative_base_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

try:
import cupy as cp
except ImportError:
cp = None
except ModuleNotFoundError:
cp = np

from emdfile import Array, Custom, Metadata, _read_metadata, tqdmnd
from py4DSTEM.data import Calibration
Expand Down
4 changes: 2 additions & 2 deletions py4DSTEM/process/phase/iterative_dpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

try:
import cupy as cp
except ImportError:
cp = None
except ModuleNotFoundError:
cp = np

from emdfile import Array, Custom, Metadata, _read_metadata, tqdmnd
from py4DSTEM.data import Calibration
Expand Down
4 changes: 2 additions & 2 deletions py4DSTEM/process/phase/iterative_mixedstate_ptychography.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

try:
import cupy as cp
except ImportError:
cp = None
except ModuleNotFoundError:
cp = np

from emdfile import Custom, tqdmnd
from py4DSTEM import DataCube
Expand Down
4 changes: 2 additions & 2 deletions py4DSTEM/process/phase/iterative_multislice_ptychography.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

try:
import cupy as cp
except ImportError:
cp = None
except ModuleNotFoundError:
cp = np

from emdfile import Custom, tqdmnd
from py4DSTEM import DataCube
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

try:
import cupy as cp
except ImportError:
cp = None
except ModuleNotFoundError:
cp = np

from emdfile import Custom, tqdmnd
from py4DSTEM import DataCube
Expand Down
4 changes: 2 additions & 2 deletions py4DSTEM/process/phase/iterative_overlap_tomography.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

try:
import cupy as cp
except ImportError:
cp = None
except ModuleNotFoundError:
cp = np

from emdfile import Custom, tqdmnd
from py4DSTEM import DataCube
Expand Down
4 changes: 2 additions & 2 deletions py4DSTEM/process/phase/iterative_parallax.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

try:
import cupy as cp
except ImportError:
cp = None
except ModuleNotFoundError:
cp = np

warnings.simplefilter(action="always", category=UserWarning)

Expand Down
4 changes: 2 additions & 2 deletions py4DSTEM/process/phase/iterative_simultaneous_ptychography.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

try:
import cupy as cp
except ImportError:
cp = None
except ModuleNotFoundError:
cp = np

from emdfile import Custom, tqdmnd
from py4DSTEM import DataCube
Expand Down
4 changes: 2 additions & 2 deletions py4DSTEM/process/phase/iterative_singleslice_ptychography.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

try:
import cupy as cp
except ImportError:
cp = None
except ModuleNotFoundError:
cp = np

from emdfile import Custom, tqdmnd
from py4DSTEM.datacube import DataCube
Expand Down
4 changes: 2 additions & 2 deletions py4DSTEM/process/utils/cross_correlate.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

try:
import cupy as cp
except ImportError:
cp = None
except ModuleNotFoundError:
cp = np


def get_cross_correlation(ar, template, corrPower=1, _returnval="real"):
Expand Down
4 changes: 2 additions & 2 deletions py4DSTEM/process/utils/multicorr.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

try:
import cupy as cp
except ImportError:
cp = None
except ModuleNotFoundError:
cp = np


def upsampled_correlation(imageCorr, upsampleFactor, xyShift, device="cpu"):
Expand Down
4 changes: 2 additions & 2 deletions py4DSTEM/process/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ def clear_output(wait=True):

try:
import cupy as cp
except ImportError:
cp = None
except ModuleNotFoundError:
cp = np


def radial_reduction(ar, x0, y0, binsize=1, fn=np.mean, coords=None):
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@
package_data={
"py4DSTEM": [
"process/utils/scattering_factors.txt",
"process/diskdetection/multicorr_row_kernel.cu",
"process/diskdetection/multicorr_col_kernel.cu",
"braggvectors/multicorr_row_kernel.cu",
"braggvectors/multicorr_col_kernel.cu",
]
},
)

0 comments on commit e457af6

Please sign in to comment.