Skip to content

Commit

Permalink
Merge pull request #554 from alex-rakowski/namespace
Browse files Browse the repository at this point in the history
I've got a repeat joke, baby, and I'll import your namespace
  • Loading branch information
bsavitzky authored Nov 13, 2023
2 parents c31f38c + 7cfdeba commit e03f0a8
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 30 deletions.
24 changes: 16 additions & 8 deletions py4DSTEM/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,25 @@
BraggVectorMap,
)

from py4DSTEM.process import classification


# diffraction
from py4DSTEM.process.diffraction import Crystal, Orientation


# ptycho
from py4DSTEM.process import phase


# polar
from py4DSTEM.process.polar import PolarDatacube


# strain
from py4DSTEM.process.strain.strain import StrainMap

# TODO - crystal
# TODO - ptycho
# TODO - others

# TODO - where
from py4DSTEM.process import (
PolarDatacube,
)
from py4DSTEM.process import wholepatternfit


### more submodules
Expand Down
2 changes: 1 addition & 1 deletion py4DSTEM/braggvectors/diskdetection_aiml.py
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ def find_Bragg_disks_aiml(
model_path=None,
distributed=None,
CUDA=True,
**kwargs
**kwargs,
):
"""
Finds the Bragg disks in all diffraction patterns of datacube by AI/ML method. This method
Expand Down
2 changes: 1 addition & 1 deletion py4DSTEM/braggvectors/diskdetection_aiml_cuda.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ def _find_Bragg_disks_aiml_single_DP_CUDA(
blocks=None,
threads=None,
model_path=None,
**kwargs
**kwargs,
):
"""
Finds the Bragg disks in single DP by AI/ML method. This method utilizes FCU-Net
Expand Down
4 changes: 2 additions & 2 deletions py4DSTEM/braggvectors/diskdetection_parallel_new.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def beta_parallel_disk_detection(
close_dask_client=False,
return_dask_client=True,
*args,
**kwargs
**kwargs,
):
"""
This is not fully validated currently so may not work, please report bugs on the py4DSTEM github page.
Expand Down Expand Up @@ -225,7 +225,7 @@ def beta_parallel_disk_detection(
probe_kernel_FT=dask_probe_delayed[0, 0],
# probe_kernel_FT=delayed_probe_kernel_FT,
*args,
**kwargs
**kwargs,
) # passing through args from earlier or should I use
# corrPower=corrPower,
# sigma=sigma_gaussianFilter,
Expand Down
2 changes: 1 addition & 1 deletion py4DSTEM/io/filereaders/read_mib.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def load_mib(
reshape=True,
flip=True,
scan=(256, 256),
**kwargs
**kwargs,
):
"""
Read a MIB file and return as py4DSTEM DataCube.
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 @@ -2093,7 +2093,7 @@ def plot_ring_pattern(
figsize=(10, 10),
returnfig=False,
input_fig_handle=None,
**kwargs
**kwargs,
):
"""
2D plot of diffraction rings
Expand Down
14 changes: 7 additions & 7 deletions py4DSTEM/visualize/show.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def show(
title=None,
show_fft=False,
show_cbar=False,
**kwargs
**kwargs,
):
"""
General visualization function for 2D arrays.
Expand Down Expand Up @@ -904,7 +904,7 @@ def show_Q(
gridlabelsize=12,
gridlabelcolor="k",
alpha=0.35,
**kwargs
**kwargs,
):
"""
Shows a diffraction space image with options for several overlays to define the scale,
Expand Down Expand Up @@ -1144,7 +1144,7 @@ def show_rectangles(
alpha=0.25,
linewidth=2,
returnfig=False,
**kwargs
**kwargs,
):
"""
Visualization function which plots a 2D array with one or more overlayed rectangles.
Expand Down Expand Up @@ -1197,7 +1197,7 @@ def show_circles(
alpha=0.3,
linewidth=2,
returnfig=False,
**kwargs
**kwargs,
):
"""
Visualization function which plots a 2D array with one or more overlayed circles.
Expand Down Expand Up @@ -1252,7 +1252,7 @@ def show_ellipses(
alpha=0.3,
linewidth=2,
returnfig=False,
**kwargs
**kwargs,
):
"""
Visualization function which plots a 2D array with one or more overlayed ellipses.
Expand Down Expand Up @@ -1308,7 +1308,7 @@ def show_annuli(
alpha=0.3,
linewidth=2,
returnfig=False,
**kwargs
**kwargs,
):
"""
Visualization function which plots a 2D array with one or more overlayed annuli.
Expand Down Expand Up @@ -1360,7 +1360,7 @@ def show_points(
open_circles=False,
title=None,
returnfig=False,
**kwargs
**kwargs,
):
"""
Plots a 2D array with one or more points.
Expand Down
2 changes: 1 addition & 1 deletion py4DSTEM/visualize/vis_RQ.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def show_selected_dp(
pointsize=50,
pointcolor="r",
scaling="log",
**kwargs
**kwargs,
):
""" """
dp = datacube.data[rx, ry, :, :]
Expand Down
16 changes: 8 additions & 8 deletions py4DSTEM/visualize/vis_special.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def show_elliptical_fit(
linewidth_ann=2,
linewidth_ell=2,
returnfig=False,
**kwargs
**kwargs,
):
"""
Plots an elliptical curve over its annular fit region.
Expand Down Expand Up @@ -97,7 +97,7 @@ def show_amorphous_ring_fit(
ellipse_alpha=0.7,
ellipse_lw=2,
returnfig=False,
**kwargs
**kwargs,
):
"""
Display a diffraction pattern with a fit to its amorphous ring, interleaving
Expand Down Expand Up @@ -225,7 +225,7 @@ def show_qprofile(
ticklabelsize=14,
grid=True,
label=None,
**kwargs
**kwargs,
):
"""
Plots a diffraction space radial profile.
Expand Down Expand Up @@ -302,7 +302,7 @@ def show_voronoi(
color_lines="w",
max_dist=None,
returnfig=False,
**kwargs
**kwargs,
):
"""
words
Expand Down Expand Up @@ -375,7 +375,7 @@ def show_class_BPs_grid(
axsize=(6, 6),
titlesize=0,
get_bordercolor=None,
**kwargs
**kwargs,
):
"""
words
Expand Down Expand Up @@ -430,7 +430,7 @@ def select_point(
color_selected="r",
size=20,
returnfig=False,
**kwargs
**kwargs,
):
"""
Show enumerated index labels for a set of points, with one selected point highlighted
Expand Down Expand Up @@ -555,7 +555,7 @@ def show_selected_dps(
HW=None,
figsize_im=(6, 6),
figsize_dp=(4, 4),
**kwargs
**kwargs,
):
"""
Shows two plots: first, a real space image overlaid with colored dots
Expand Down Expand Up @@ -718,7 +718,7 @@ def show_complex(
pixelunits="pixels",
pixelsize=1,
returnfig=False,
**kwargs
**kwargs,
):
"""
Function to plot complex arrays
Expand Down

0 comments on commit e03f0a8

Please sign in to comment.