diff --git a/py4DSTEM/__init__.py b/py4DSTEM/__init__.py index adf757d1b..d5df63f5e 100644 --- a/py4DSTEM/__init__.py +++ b/py4DSTEM/__init__.py @@ -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 diff --git a/py4DSTEM/braggvectors/diskdetection_aiml.py b/py4DSTEM/braggvectors/diskdetection_aiml.py index abcb70291..4d23ebf6c 100644 --- a/py4DSTEM/braggvectors/diskdetection_aiml.py +++ b/py4DSTEM/braggvectors/diskdetection_aiml.py @@ -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 diff --git a/py4DSTEM/braggvectors/diskdetection_aiml_cuda.py b/py4DSTEM/braggvectors/diskdetection_aiml_cuda.py index 64a43156a..d23770586 100644 --- a/py4DSTEM/braggvectors/diskdetection_aiml_cuda.py +++ b/py4DSTEM/braggvectors/diskdetection_aiml_cuda.py @@ -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 diff --git a/py4DSTEM/braggvectors/diskdetection_parallel_new.py b/py4DSTEM/braggvectors/diskdetection_parallel_new.py index ddfc93049..dccc0dd4b 100644 --- a/py4DSTEM/braggvectors/diskdetection_parallel_new.py +++ b/py4DSTEM/braggvectors/diskdetection_parallel_new.py @@ -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. @@ -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, diff --git a/py4DSTEM/io/filereaders/read_mib.py b/py4DSTEM/io/filereaders/read_mib.py index 079c9d1bd..7456bd594 100644 --- a/py4DSTEM/io/filereaders/read_mib.py +++ b/py4DSTEM/io/filereaders/read_mib.py @@ -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. diff --git a/py4DSTEM/process/diffraction/crystal_viz.py b/py4DSTEM/process/diffraction/crystal_viz.py index f7837695a..94cf75b8c 100644 --- a/py4DSTEM/process/diffraction/crystal_viz.py +++ b/py4DSTEM/process/diffraction/crystal_viz.py @@ -2093,7 +2093,7 @@ def plot_ring_pattern( figsize=(10, 10), returnfig=False, input_fig_handle=None, - **kwargs + **kwargs, ): """ 2D plot of diffraction rings diff --git a/py4DSTEM/visualize/show.py b/py4DSTEM/visualize/show.py index fcc05777e..8462eec7d 100644 --- a/py4DSTEM/visualize/show.py +++ b/py4DSTEM/visualize/show.py @@ -77,7 +77,7 @@ def show( title=None, show_fft=False, show_cbar=False, - **kwargs + **kwargs, ): """ General visualization function for 2D arrays. @@ -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, @@ -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. @@ -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. @@ -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. @@ -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. @@ -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. diff --git a/py4DSTEM/visualize/vis_RQ.py b/py4DSTEM/visualize/vis_RQ.py index 6c2fbff3c..85c0eb042 100644 --- a/py4DSTEM/visualize/vis_RQ.py +++ b/py4DSTEM/visualize/vis_RQ.py @@ -15,7 +15,7 @@ def show_selected_dp( pointsize=50, pointcolor="r", scaling="log", - **kwargs + **kwargs, ): """ """ dp = datacube.data[rx, ry, :, :] diff --git a/py4DSTEM/visualize/vis_special.py b/py4DSTEM/visualize/vis_special.py index acacb6184..c1e9d6b19 100644 --- a/py4DSTEM/visualize/vis_special.py +++ b/py4DSTEM/visualize/vis_special.py @@ -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. @@ -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 @@ -225,7 +225,7 @@ def show_qprofile( ticklabelsize=14, grid=True, label=None, - **kwargs + **kwargs, ): """ Plots a diffraction space radial profile. @@ -302,7 +302,7 @@ def show_voronoi( color_lines="w", max_dist=None, returnfig=False, - **kwargs + **kwargs, ): """ words @@ -375,7 +375,7 @@ def show_class_BPs_grid( axsize=(6, 6), titlesize=0, get_bordercolor=None, - **kwargs + **kwargs, ): """ words @@ -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 @@ -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 @@ -718,7 +718,7 @@ def show_complex( pixelunits="pixels", pixelsize=1, returnfig=False, - **kwargs + **kwargs, ): """ Function to plot complex arrays