diff --git a/Framework/PythonInterface/plugins/algorithms/DeltaPDF3D.py b/Framework/PythonInterface/plugins/algorithms/DeltaPDF3D.py index 4e6298a65f65..76266914e39c 100644 --- a/Framework/PythonInterface/plugins/algorithms/DeltaPDF3D.py +++ b/Framework/PythonInterface/plugins/algorithms/DeltaPDF3D.py @@ -153,12 +153,6 @@ def validateInputs(self): if len(sphereMax) != 1 and len(sphereMax) != 3: issues["SphereMax"] = "Must provide 1 or 3 diameters" - if self.getProperty("WindowFunction").value == "Tukey": - import scipy.signal - - if not hasattr(scipy.signal, "tukey"): - issues["WindowFunction"] = "Tukey window requires scipy >= 0.16.0" - return issues def PyExec(self): @@ -383,7 +377,7 @@ def _gaussian_window(self, width, sigma): sigma is based on the dat being in a range 0 to 1 """ - from scipy.signal import gaussian + from scipy.signal.windows import gaussian return ( gaussian(width[0], sigma * width[0]).reshape((-1, 1, 1)) @@ -406,7 +400,7 @@ def _tukey_window(self, width, alpha): alpha = 0 becomes rectangular alpha = 1 becomes a Hann window """ - from scipy.signal import tukey + from scipy.signal.windows import tukey return tukey(width[0], alpha).reshape((-1, 1, 1)) * tukey(width[1], alpha).reshape((-1, 1)) * tukey(width[2], alpha) diff --git a/Framework/PythonInterface/plugins/algorithms/FitIncidentSpectrum.py b/Framework/PythonInterface/plugins/algorithms/FitIncidentSpectrum.py index 6f17540ec3fc..6e19a54e93da 100644 --- a/Framework/PythonInterface/plugins/algorithms/FitIncidentSpectrum.py +++ b/Framework/PythonInterface/plugins/algorithms/FitIncidentSpectrum.py @@ -142,7 +142,7 @@ def PyExec(self): def fit_cubic_spline_with_gauss_conv(self, x_fit, y_fit, x, n_gouss=39, sigma=3.0): # Fit with Cubic Spline using a Gaussian Convolution to get weights def moving_average(y, n=n_gouss, sig=sigma): - from scipy.signal import gaussian + from scipy.signal.windows import gaussian b = gaussian(n, sig) average = ndimage.filters.convolve1d(y, b / b.sum()) diff --git a/conda/recipes/conda_build_config.yaml b/conda/recipes/conda_build_config.yaml index 49b9246b3128..b4a5febf64d9 100644 --- a/conda/recipes/conda_build_config.yaml +++ b/conda/recipes/conda_build_config.yaml @@ -47,9 +47,8 @@ pycifrw: sphinx_bootstrap_theme: - 0.8.1 -#Some unit tests failures present in 1.13.0 from gaussian not being found scipy: - - '>=1.10.0, !=1.13.0' + - '>=1.10.0' pyqt: - 5.15 diff --git a/mantid-developer-linux.yml b/mantid-developer-linux.yml index 26c3edd53cab..8d84f819452f 100644 --- a/mantid-developer-linux.yml +++ b/mantid-developer-linux.yml @@ -39,7 +39,7 @@ dependencies: - qtpy>=1.9.0 - qt-gtk-platformtheme # Use native theme on GTK-based systems, which provides a significantly better performing file browser. - requests>=2.25.1 - - scipy>=1.10.0,!=1.13.0 # 1.13.0 causing unit test failures due to gaussian not being found. + - scipy>=1.10.0 - setuptools - sphinx>=4.5.* - sphinx_bootstrap_theme>=0.8.1 diff --git a/mantid-developer-osx.yml b/mantid-developer-osx.yml index 9e23d21fcd26..24b055ec651b 100644 --- a/mantid-developer-osx.yml +++ b/mantid-developer-osx.yml @@ -38,7 +38,7 @@ dependencies: - qtconsole>5.4.2,!=5.5.0 # 5.4.2 crashes the jupyter console. 5.5.0 raises a TypeError when using tab completion. - qtpy>=1.9.0 - requests>=2.25.1 - - scipy>=1.10.0,!=1.13.0 # 1.13.0 causing unit test failures due to gaussian not being found. + - scipy>=1.10.0 - setuptools - sphinx>=4.5.* - sphinx_bootstrap_theme=>0.8.1 diff --git a/mantid-developer-win.yml b/mantid-developer-win.yml index 3823e60894a0..6968305ff623 100644 --- a/mantid-developer-win.yml +++ b/mantid-developer-win.yml @@ -38,7 +38,7 @@ dependencies: - qtconsole>5.4.2,!=5.5.0 # 5.4.2 crashes the jupyter console. 5.5.0 raises a TypeError when using tab completion. - qtpy>=1.9.0 - requests>=2.25.1 - - scipy>=1.10.0,!=1.13.0 # 1.13.0 causing unit test failures due to gaussian not being found. + - scipy>=1.10.0 - setuptools - sphinx>=4.5.* - sphinx_bootstrap_theme=>0.8.1