Skip to content

Commit 3c606e5

Browse files
samtygier-stfcMohamedAlmakiandy-bridger
authored
Cherrypick changes for 6.16.1 (#41752)
Co-authored-by: Mohammed Almakki <44416400+MohamedAlmaki@users.noreply.github.com> Co-authored-by: andy-bridger <andy.bridger@stfc.ac.uk>
1 parent 410f615 commit 3c606e5

7 files changed

Lines changed: 56 additions & 10 deletions

File tree

docs/source/concepts/TextureAnalysis.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ If using a standard grouping, no ``grouping_filepath`` or ``prm_filepath`` is re
564564
bank_focus_dir = os.path.join(root_dir, "Focus", "CombinedFiles")
565565
566566
# get grouping directory name
567-
calib_info = CalibrationInfo(group = GROUP(grouping))
567+
calib_info = CalibrationInfo(group = GROUP(grouping), instrument = instr)
568568
if groupingfile_path:
569569
calib_info.set_grouping_file(groupingfile_path)
570570
elif prm_path:
@@ -646,7 +646,7 @@ Additionally to fitting the peak, the table will also contain a numerical integr
646646
# find and load peaks
647647
648648
# get grouping directory name
649-
calib_info = CalibrationInfo(group = GROUP(grouping))
649+
calib_info = CalibrationInfo(group = GROUP(grouping), instrument = instr)
650650
if groupingfile_path:
651651
calib_info.set_grouping_file(groupingfile_path)
652652
elif prm_path:

docs/source/release/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Release Notes
1313

1414
.. plot:: release/versions.py
1515

16+
* v6.16.1 - 2026-07-02 - :doc:`release notes <v6.16.1/index>` - `github tag <https://github.com/mantidproject/mantid/releases/tag/v6.16.1>`__
1617
* v6.16.0 - 2026-06-25 - :doc:`release notes <v6.16.0/index>` - `github tag <https://github.com/mantidproject/mantid/releases/tag/v6.16.0>`__
1718
* v6.15.0 - 2026-02-23 - :doc:`release notes <v6.15.0/index>` - `github tag <https://github.com/mantidproject/mantid/releases/tag/v6.15.0>`__
1819
* v6.14.0 - 2025-10-23 - :doc:`release notes <v6.14.0/index>` - `github tag <https://github.com/mantidproject/mantid/releases/tag/v6.14.0>`__
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
.. _v6.16.1:
2+
3+
===========================
4+
Mantid 6.16.1 Release Notes
5+
===========================
6+
7+
This is a patch release that corrects some significant issues since :ref:`version 6.16.0 <v6.16.0>`.
8+
9+
The changes are:
10+
11+
- Fix empty Instrument View in Windows standalone
12+
- Fix crash in `TextureUtils` for RaggedWorkspaces
13+
14+
Citation
15+
--------
16+
17+
Please cite any usage of Mantid as follows:
18+
19+
- *Mantid 6.16.1: Manipulation and Analysis Toolkit for Instrument Data.; Mantid Project*.
20+
`doi: 10.5286/Software/Mantid6.16.1 <http://dx.doi.org/10.5286/Software/Mantid6.16.1>`_
21+
22+
- Arnold, O. et al. *Mantid-Data Analysis and Visualization Package for Neutron Scattering and mu-SR Experiments.* Nuclear Instruments
23+
and Methods in Physics Research Section A: Accelerators, Spectrometers, Detectors and Associated Equipment 764 (2014): 156-166
24+
`doi: 10.1016/j.nima.2014.07.029 <https://doi.org/10.1016/j.nima.2014.07.029>`_
25+
(`download bibtex <https://raw.githubusercontent.com/mantidproject/mantid/master/docs/source/mantid.bib>`_)
26+
27+
Changes in this version
28+
-----------------------
29+
30+
* `41744 <https://github.com/mantidproject/mantid/pull/41744>`_ Fix empty Instrument View in Windows standalone
31+
* `41732 <https://github.com/mantidproject/mantid/pull/41732>`_ Fix crash in `TextureUtils` for RaggedWorkspaces
32+
33+
.. _download page: http://download.mantidproject.org
34+
35+
.. _GitHub release page: https://github.com/mantidproject/mantid/releases/tag/v6.16.1

installers/conda/win/create_package.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,16 @@ find $COPY_DIR -name *.pyc -delete
173173
# Delete extra DLLs
174174
rm -rf $COPY_DIR/bin/api-ms-win*.dll
175175
rm -rf $COPY_DIR/bin/libclang.dll
176+
# Remove Mesa's opengl32.dll (from mesalib, pulled in transitively by vtk-base
177+
# >=9.6 via viskores). Next to MantidWorkbench.exe it shadows the system OpenGL
178+
# driver and produces a black Instrument View. opengl32sw.dll (Qt's software
179+
# fallback) is kept. See https://github.com/mantidproject/mantid/issues/41735
180+
rm -f $COPY_DIR/bin/opengl32.dll
181+
# Drop the rest of the Mesa stack - orphaned once opengl32.dll is gone.
182+
rm -f $COPY_DIR/bin/libgallium_wgl.dll
183+
rm -f $COPY_DIR/bin/vulkan_dzn.dll
184+
rm -f $COPY_DIR/bin/vulkan_lvp.dll
185+
rm -f $COPY_DIR/bin/spirv_to_dxil.dll
176186

177187
# Now package using NSIS
178188
echo "Packaging package via NSIS"

scripts/Engineering/common/instrument_config.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ def __new__(self, value, banks):
5454
# if a new instrument is added, add its config key to this list and group to groups (used for tests)
5555
SUPPORTED_INSTRUMENTS = ("ENGINX", "IMAT")
5656
GROUPS = (ENGINX_GROUP, IMAT_GROUP)
57+
PSEUDONYMS = {"ENGIN-X": "ENGINX"}
5758

5859

5960
@dataclass(frozen=True)
@@ -227,6 +228,7 @@ def get_instr_config(instrument: Optional[str]) -> Optional[InstrumentConfig]:
227228
if instrument is None:
228229
return None
229230
key = instrument.upper()
231+
key = PSEUDONYMS.get(key, key)
230232
if key not in CONFIGS:
231233
raise RuntimeError(f"No instrument config registered for instrument='{instrument}'")
232234
return CONFIGS[key]

scripts/Engineering/texture/TextureUtils.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from Engineering.texture.correction.correction_model import TextureCorrectionModel
1010
from Engineering.texture.polefigure.polefigure_model import TextureProjection
1111
from mantid.simpleapi import SaveNexus, logger, CreateEmptyTableWorkspace, Fit
12-
from mantid.simpleapi import ConvertUnits, Rebunch, Rebin, SumSpectra, AppendSpectra, CloneWorkspace, CropWorkspace, Load
12+
from mantid.simpleapi import ConvertUnits, Rebunch, Rebin, SumSpectra, AppendSpectra, CloneWorkspace, CropWorkspaceRagged, Load
1313
from pathlib import Path
1414
from Engineering.EnginX import EnginX
1515
from Engineering.IMAT import IMAT
@@ -288,18 +288,17 @@ def validate_abs_corr_inputs(
288288

289289

290290
def crop_and_rebin(ws, out_ws, lower, upper, rebin_params):
291-
CropWorkspace(ws, lower, upper, OutputWorkspace="__tmp_peak_window")
291+
CropWorkspaceRagged(ws, lower, upper, OutputWorkspace="__tmp_peak_window")
292292
Rebin("__tmp_peak_window", rebin_params, OutputWorkspace=out_ws)
293293

294294

295295
def _get_max_bin(ws):
296-
xdat = ws.extractX()
297-
return np.diff(xdat, axis=1).max()
296+
return max(np.diff(ws.readX(i)).max() for i in range(ws.getNumberHistograms()))
298297

299298

300299
def crop_wss_and_combine(wss, peak, lower, upper, output):
301300
cropped_rebinned_wss = [f"rebin_ws_{peak}_0"]
302-
peak_window_ws = CropWorkspace(wss[0], lower, upper, OutputWorkspace="__peak_window_crop")
301+
peak_window_ws = CropWorkspaceRagged(wss[0], lower, upper, OutputWorkspace="__peak_window_crop")
303302
rebin_params = (lower, _get_max_bin(peak_window_ws), upper)
304303
Rebin("__peak_window_crop", rebin_params, OutputWorkspace=f"rebin_ws_{peak}_0")
305304
CloneWorkspace(InputWorkspace=f"rebin_ws_{peak}_0", OutputWorkspace=f"rebin_ws_{peak}")
@@ -663,7 +662,6 @@ def fit_all_peaks(
663662
# we will then fix the amount this can change in the individual fits
664663

665664
x0_lims, all_cropped_rebinned_wss = fit_initial_summed_spectra(wss, peaks, peak_window, fit_kwargs.copy(), peak_func_name)
666-
667665
for iws, wsname in enumerate(wss):
668666
# notice user how far through the fitting they are (useful if any fits fail)
669667
logger.notice(f"Fitting Workspace: {wsname} ({iws + 1}/{len(wss)})")

scripts/test/Engineering/texture/test_TextureUtils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ def test_tie_bkg(self):
327327
self.assertEqual(bg0["A0"], 2.0)
328328

329329
@patch(f"{texture_utils_path}.Rebin")
330-
@patch(f"{texture_utils_path}.CropWorkspace")
330+
@patch(f"{texture_utils_path}.CropWorkspaceRagged")
331331
def test_crop_and_rebin(self, mock_crop, mock_rebin):
332332
# inputs
333333
ws = "ws1"
@@ -346,7 +346,7 @@ def test_crop_and_rebin(self, mock_crop, mock_rebin):
346346
@patch(f"{texture_utils_path}.CloneWorkspace")
347347
@patch(f"{texture_utils_path}.Rebin")
348348
@patch(f"{texture_utils_path}._get_max_bin")
349-
@patch(f"{texture_utils_path}.CropWorkspace")
349+
@patch(f"{texture_utils_path}.CropWorkspaceRagged")
350350
@patch(f"{texture_utils_path}.crop_and_rebin")
351351
def test_crop_wss_and_combine(self, mock_crop_and_rebin, mock_crop, mock_max_bin, mock_rebin, mock_clone, mock_append, mock_sum):
352352
# inputs

0 commit comments

Comments
 (0)