Skip to content

Commit

Permalink
black
Browse files Browse the repository at this point in the history
  • Loading branch information
gvarnavi committed Jul 4, 2024
1 parent 307f27d commit fdce7a9
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 7 deletions.
1 change: 1 addition & 0 deletions py4DSTEM/braggvectors/diskdetection.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from py4DSTEM.datacube import DataCube
from py4DSTEM.preprocess.utils import get_maxima_2D
from py4DSTEM.process.utils.cross_correlate import get_cross_correlation_FT

try:
from py4DSTEM.braggvectors.diskdetection_aiml import find_Bragg_disks_aiml
except (ImportError, ModuleNotFoundError):
Expand Down
1 change: 1 addition & 0 deletions py4DSTEM/io/filereaders/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from py4DSTEM.io.filereaders.read_K2 import read_gatan_K2_bin
from py4DSTEM.io.filereaders.empad import read_empad
from py4DSTEM.io.filereaders.read_mib import load_mib

try:
from py4DSTEM.io.filereaders.read_arina import read_arina
except (ImportError, ModuleNotFoundError):
Expand Down
1 change: 1 addition & 0 deletions py4DSTEM/io/importfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ def import_file(
data = load_mib(filepath, mem=mem, binfactor=binfactor, **kwargs)
elif filetype == "arina":
from py4DSTEM.io.filereaders import read_arina

data = read_arina(filepath, mem=mem, binfactor=binfactor, **kwargs)
elif filetype == "abTEM":
data = read_abTEM(filepath, mem=mem, binfactor=binfactor, **kwargs)
Expand Down
2 changes: 2 additions & 0 deletions py4DSTEM/process/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
from py4DSTEM.process import phase
from py4DSTEM.process import calibration
from py4DSTEM.process import utils

try:
from py4DSTEM.process import classification
except (ImportError, ModuleNotFoundError):
pass
from py4DSTEM.process import diffraction

try:
from py4DSTEM.process import wholepatternfit
except (ImportError, ModuleNotFoundError):
Expand Down
4 changes: 2 additions & 2 deletions py4DSTEM/process/diffraction/crystal_viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,8 @@ def plot_scattering_intensity(
int_sf_plot = calc_1D_profile(
k,
self.g_vec_leng,
(self.struct_factors_int**int_power_scale) * (self.g_vec_leng**k_power_scale),
(self.struct_factors_int**int_power_scale)
* (self.g_vec_leng**k_power_scale),
remove_origin=True,
k_broadening=k_broadening,
int_scale=int_scale,
Expand Down Expand Up @@ -1883,7 +1884,6 @@ def plot_clusters(

for a0 in range(self.cluster_sizes.shape[0]):
if self.cluster_sizes[a0] >= area_min:

if outline_grains:
from skimage.morphology import erosion

Expand Down
5 changes: 4 additions & 1 deletion py4DSTEM/process/phase/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,9 @@ def evaluate_gaussian_envelope(
self, alpha: Union[float, np.ndarray]
) -> Union[float, np.ndarray]:
xp = self._xp
return xp.exp(-0.5 * self._gaussian_spread**2 * alpha**2 / self._wavelength**2)
return xp.exp(
-0.5 * self._gaussian_spread**2 * alpha**2 / self._wavelength**2
)

def evaluate_spatial_envelope(
self, alpha: Union[float, np.ndarray], phi: Union[float, np.ndarray]
Expand Down Expand Up @@ -1755,6 +1757,7 @@ def unwrap_phase_2d(array, weights=None, gauge=None, corner_centered=True, xp=np

def unwrap_phase_2d_skimage(array, corner_centered=True, xp=np):
from skimage.restoration import unwrap_phase

if xp is np:
array = array.astype(np.float64)
unwrapped_array = unwrap_phase(array, wrap_around=corner_centered).astype(
Expand Down
6 changes: 2 additions & 4 deletions py4DSTEM/utils/configuration_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
from importlib.util import find_spec

# need a mapping of pypi/conda names to import names
import_mapping_dict = {
}
import_mapping_dict = {}


# programatically get all possible requirements in the import name style
Expand Down Expand Up @@ -523,8 +522,7 @@ def print_no_extra_checks(m: str):


# dict of extra check functions
funcs_dict = {
}
funcs_dict = {}


#### main function used to check the configuration of the installation
Expand Down

0 comments on commit fdce7a9

Please sign in to comment.