Skip to content

Commit

Permalink
use skimage 0.19: .github/workflows/CI.yml; dgsres/singlextal/workflo…
Browse files Browse the repository at this point in the history
…w.py
  • Loading branch information
yxqd committed Aug 20, 2023
1 parent 2950cef commit 1987818
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
shell: pwsh
run: |
conda install mamba
mamba install mcvine mantid-framework=6 pytest click=7 tqdm pylatex lmfit cloudpickle scikit-image=0.15
mamba install mcvine mantid-framework=6 pytest click=7 tqdm pylatex lmfit cloudpickle scikit-image=0.19
mcvine
env:
PYTHON_VERSION: ${{ matrix.python-version }}
Expand Down
2 changes: 1 addition & 1 deletion dgsres/singlextal/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ def _find_outliers_1(img, max_deviation):
# change image value range to 0-240. scikit image median does not work for random floats
scale = 240; amax = np.nanmax(img); amin = np.nanmin(img)
img1 = img-amin; img1 *= scale/(amax-amin)
from skimage.filters import median
from skimage.filters.rank import median
alpha_median = median(img1.astype('uint8'), mask=(img==img))
return np.abs(img1-alpha_median) > max_deviation*scale/(amax-amin), alpha_median*(amax-amin)/scale+amin

Expand Down

0 comments on commit 1987818

Please sign in to comment.