Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/RELEASE_next_patch' into RELEA…
Browse files Browse the repository at this point in the history
…SE_next_minor

# Conflicts:
#	conda_environment.yml
#	hyperspy/_signals/eds_tem.py
#	setup.py
  • Loading branch information
ericpre committed Feb 16, 2022
2 parents 2659aa0 + 3bc72ca commit 3663b93
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion hyperspy/_signals/eds_tem.py
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ def vacuum_mask(self, threshold=1.0, closing=True, opening=False):
if self.axes_manager.navigation_dimension == 0:
raise RuntimeError('Navigation dimenstion must be higher than 0 '
'to estimate a vacuum mask.')
from scipy.ndimage.morphology import binary_dilation, binary_erosion
from scipy.ndimage import binary_dilation, binary_erosion
mask = (self.max(-1) <= threshold)
if closing:
mask.data = binary_dilation(mask.data, border_value=0)
Expand Down
4 changes: 2 additions & 2 deletions hyperspy/utils/peakfinders2D.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,9 @@ def find_peaks_minmax(z, distance=5., threshold=10.):
Peak pixel coordinates.
"""
data_max = ndi.filters.maximum_filter(z, distance)
data_max = ndi.maximum_filter(z, distance)
maxima = (z == data_max)
data_min = ndi.filters.minimum_filter(z, distance)
data_min = ndi.minimum_filter(z, distance)
diff = ((data_max - data_min) > threshold)
maxima[diff == 0] = 0
labeled, num_objects = ndi.label(maxima)
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@
extras_require = {
# exclude scikit-learn==1.0 on macOS (wheels issue)
# See https://github.com/scikit-learn/scikit-learn/pull/21227
"learning": ['scikit-learn!=1.0;sys_platform=="darwin"'],
"learning": ['scikit-learn!=1.0.0;sys_platform=="darwin"',
'scikit-learn;sys_platform!="darwin"'],
"gui-jupyter": ["hyperspy_gui_ipywidgets>=1.1.0"],
"gui-traitsui": ["hyperspy_gui_traitsui>=1.1.0"],
"mrcz": ["blosc>=1.5", 'mrcz>=0.3.6'],
Expand Down

0 comments on commit 3663b93

Please sign in to comment.