Framework Changes#

Algorithms#

New features#

  • A new algorithm SaveMDToAscii v1 has been added to save an MDHistoWorkspace to a plain ASCII file, with configurable exclusion of integrated dimensions, normalization, column separator and numeric precision.

  • Added optional duration- and monitor-count normalization to HFIRGoniometerIndependentBackground v1. Backgrounds can now be calculated from exposure-normalized rotations and either retained in normalized units or restored to the per-rotation exposure scale. WAND (HB2C) and DEMAND (HB3A) sample-log naming conventions are supported.

  • HFIRGoniometerIndependentBackground v1 no longer accepts a negative BackgroundLevel. The property is a percentile and must be between 0 and 100.

  • MDNorm now supports continuous rotation data (generated by ConvertToMD with useLogTimes).

  • HFIRPowderReduction v1 now attempts to autopopulate the sample absorption parameters if correct data is found in sample run files

  • SumSpectra v1 algorithm has been optimized for better performance.

  • RenameWorkspace can now assign a name to a workspace object that is not already in the Analysis Data Service (ADS). In this case, the workspace will be added to the ADS.

  • The Fit v1 algorithm now allows setting step sizes to customize the perturbation applied to each parameter value while fitting. Setting the StepSizeMethod to Custom will allow the step sizes list to be passed using the CustomStepSizes parameter.

  • EstimatePeakIntensities v1 allows parallel, fit-free estimation of peak intensities within specified windows, using a skew-seeded background estimation.

  • MDNormDirectSC v1 can now handle MDEvent workspaces created by ConvertToMD v1 with the UseLogTimes property.

  • HFIRPowderReduction v1 now has an IDFFilename property to optionally override the instrument geometry from the sample file, and loads MIDAS data with LoadEventAsWorkspace2D v1.

  • Algorithm ConvertToMD v1 with option UseLogTimes can use the time series logs at event times as coordinates for extra dimensions when log names are added in OtherDimensions property.

  • Parallelisation added to ConvertToMD v1 and improved in MDNormDirectSC v1.

  • FileFinder and MultipleFileProperty now resolve multi-run hint strings (ranges and lists) in a single batched archive lookup for HFIR and SNS data, replacing the previous per-run network round trips to ONCat.

  • FitPeaks v1 now has StrictConvergence flag, which decides whether fits which have finished due to the parameter step size passing below the stopping threshold should be considered as successful - default is True to match previous behaviour.

  • FitPeaks v1 now accepts Unweighted least squares cost function.

  • FitPeaks v1 now has PositionToleranceMode input which controls PositionTolerance behaviour. Default is Check which maintains previous behaviour of the positional tolerance being checked after the fit and discarding any fits outside tolerance. This parameter enables Constrain mode, which will instead apply the tolerances as constraints on the fit. Constrain mode requires ConstrainPeakPositions be disabled.

  • FitPeaks v1 now has CalculateUnconstrainedErrors which controls whether the errors for fits should be recomputed after the fit, without the constraints applied. Default is False.

  • FitPeaks v1 now has PositionToleranceFractional which controls whether the PositionTolerance should be treated as a fraction of the peak window (True) or as an absolute value (False, default).

  • Algorithm ConvertToMD v1 now accepts an option, UseLogTimes, to use log times of neutron events in coordinate calculations instead of their average.

  • Stitch1D and Stitch1DMany now have a UseValidDataOnly option which, when true, ignores the contribution of invalid signal values to overlap bins when another workspace has valid data in the same bin. When false (default) previous behaviour is maintained, where presence of invalid data in an overlap bin from either workspace results in the same invalid value in the output workspace.

  • The VesuvioTransmission v1 algorithm has been added which evaluates the transmission spectrum on the VESUVIO spectrometer for measured sample and empty run numbers.

  • A new property OutputWorkspaceSuffixes has been added to the Stitch1DMany v1 algorithm, which allows users to specify custom suffixes for the child workspaces in the output group when stitching workspace groups.

Bugfixes#

  • Unreadable instrument geometry cache is now deleted, and the cache gets recreated to prevent a load failure

  • SaveDaveGrp v1 algorithm now optionally converts the spectrum numbers into Q values using GetQsInQENSData v1 when creating the .grp file.

  • SavePlot1D v1 no longer fails when run with plotly 7.0 or later. The plotly and plotly-full output types used plotly interfaces that were deprecated and then removed.

  • CopySample v1 no longer causes a crash when called with CopyShape = False, CopyMaterial = True and an input workspace that is subsequently overwritten.

  • BinaryOperateMasks v1 no longer throws a spurious validation error when acting upon input workspaces with non-default detector mapping.

  • Algorithm SaveYDA now correctly distinguishes between spectra and bin center axes when saving data.

  • In BeamProfileFactory the auto-generated beam profile dimensions are now correct when the sample bounding box is offset from the origin. The beam half-extent is now taken from the furthest sample face on either side, so the beam remains valid for samples that are translated or rotated into a negative half-space.

  • In EstimateScatteringVolumeCentreOfMass the shape object now accounts for the goniometer set on the workspace. Previously this was not the case which gave erroneous values in non-rotationally symmetric situations.

  • FileFinder now recognises compound file extensions (e.g. .nxs.h5) listed in Facilities.xml when expanding multi-run hints, so ranges such as CNCS100:105.nxs.h5 resolve correctly instead of being misinterpreted as a stem ending in .nxs plus an .h5 extension. As a consequence, a hint that explicitly specifies one extension (e.g. BSS_24234_event.nxs or SXD30904.raw.md5) no longer silently resolves to a file with a different extension; specify the run number without an extension to let the facility’s preferred extensions apply.

  • In FitPeaks v1, the PeakParameterValueTable input option now reads and applies row-per-spectra parameter starting values. Previously this functionality was declared but was not applied.

  • In HFIRPowderReduction v1, the OutputWorskspace field now has a default based on the IPTS and run number. OutputDirectory now browses to a directory and user can manually set the file name by typing it in the box.

  • :ref: CreateDetectorTable <algm-CreateDetectorTable> has received some performance improvements that should speed up the algorithm significantly for large workspaces with many spectra. This algorithm is used in the new Instrument View when opening, so this should improve the performance of that interface as well.

  • ExtractSpectra no longer gives an error when the argument DetectorList is used on focused workspaces where a workspace index maps to several detector IDs.

  • Removed MultipleScattering checkbox from CylinderAbsorptionCW v1, and renamed AttenuationXSection to AbsorptionXSection

Deprecated#

  • The DPDFreduction algorithm has been deprecated and has no direct replacement.

Removed#

  • Removed SofQWCentre and SofQWPolygon (deprecated since release 6.12.0).

  • Removed the deprecated BayesQuasi and BayesStretch algorithms, which were based on the quasielasticbayes library. Users should now use the new quickbayes replacements, BayesQuasi2 v1 and BayesStretch2 v1, respectively.

Fit Functions#

New features#

  • Poisson deviance is now a cost function for the Levenberg-Marquardt minimizer in fitting.

Bugfixes#

  • In an Instrument Parameter File, defined fitting parameters no longer erroneously overwrite if they have the same name but for different functions (e.g. Bk2BkExpConvPV:Gamma and IkedaCarpenterPV:Gamma).

Deprecated#

Removed#

Data Objects#

New features#

  • InstrumentMetadata is now exposed on workspaces and ExperimentInfo objects through instrumentValidFromDate(), instrumentValidToDate(), instrumentFilename(), instrumentXmlText(), instrumentDefaultView() and instrumentDefaultAxis()

  • Sample Environment is now saved in the Nexus File

  • getInstrumentName() can be used on workspaces or ExperimentInfo objects to get the name of the underlying instrument. Use this instead of getInstrument().getName().

Bugfixes#

  • Fixed a boundary-condition bug in MDGridBox splitting where events exactly on a child box’s upper boundary could be dropped during serial or threaded splitting.

Live Data#

New features#

  • The live-data algorithms gain an optional Facility property, naming the facility that Instrument is resolved against. The Mantid default facility is used when it is not set. An instrument name is only meaningful with respect to a facility, so the two are now validated together, and a mismatch is reported against the offending property rather than raising an exception.

Bugfixes#

  • The SNSLiveEventDataListener state machine is refactored to simplify its structure, remove race conditions, and make all state transitions explicit. These changes primarily add to the ILiveListener interface, deprecating its runStatus method, but otherwise leave most ILiveListener implementations largely unchanged.

  • The live-data algorithms, such as StartLiveData, previously could not use an instrument outside the default facility at all, since the allowed values for Instrument were built from the default facility alone. Naming the new Facility property now selects the facility that Instrument is resolved against.

  • Resolving Instrument no longer falls back to searching every other facility once the resolved facility has been tried. That fallback made instrument names shared between facilities ambiguous, and worked against the purpose of having a default facility. Scripts that relied on an instrument being found outside the default facility must now name its Facility.

  • The socket-read poll loop of the SNSLiveEventDataListener is refactored to provide clean detection of a peer disconnect, and to improve its responsiveness. These changes are expected to fix several cases where the live-data system hung up in response to changes in the ADARA-server state.

Python#

New features#

  • Instrument now has getXmlText exposed to python.

  • Output workspace properties of the generic type Workspace now return a WorkspaceGroup object after an algorithm is automatically dispatched over an input workspace group. Previously, the value component of the property would be set to equal the WorkspaceGroup name but the workspace component would be null.

  • The dimensions of an IMDHistoWorkspace can now have their name and units edited from Python via getDimension(i).setName(...) and getDimension(i).setUnits(...). Editing units is supported for HKL and general frames; an HKL dimension accepts r.l.u. or an inverse-Angstrom-style label such as in 2.5 A^-1. This is useful for relabelling the dimensions produced by MDNorm for unusual projections.

  • MeshObject now has getBoundingBox exposed to python.

  • Grid spacing, pixel counts and detector-ID numbering for rectangular/grid arrays can now be accessed from ComponentInfo, using the pixelGrid* methods such as pixelGridNX and pixelGridXStep. Whether a component has such a grid can be tested with isGridDetector.

  • Added mantid.api.MinimizerStatus, exposing the status strings a function minimizer reports through a fit’s OutputStatus and an isConverged test for them, so Python callers no longer have to hard code the wording. By default the tolerance-limited stopping conditions count as converged alongside success; pass strict=True for an exact match.

  • MDHistoWorkspace now provides setNumEventsArray to overwrite the number-of-events array from a numpy array, mirroring the existing setSignalArray and setErrorSquaredArray methods. Manual updates through these array setters clear any link to the original MDEventWorkspace so downstream rebinning or slicing cannot bypass the manually-set values.

Bugfixes#

  • Fixed a crash where a Peak retrieved from a PeaksWorkspace in Python could reference deleted memory after the owning workspace is deleted. Peaks now share ownership of their workspace, keeping it alive for as long as the peak is in use.

Deprecated#

  • MatrixWorkspace now exposes the preferred Histogram data accessors to python: x(), y(), e(), dx() (read-only numpy wrappers) and mutableX(), mutableY(), mutableE(), mutableDx() (writable numpy wrappers). These replace the legacy readX()/readY()/readE()/readDx() and dataX()/dataY()/dataE()/dataDx() methods, which are now deprecated and emit a DeprecationWarning naming the replacement, but continue to work and return the same data. See the Transition to the HistogramData module concept page for more information on the Histogram data model.

  • The deprecation warnings above are emitted via PyErr_Warn(PyExc_DeprecationWarning, …), equivalent to warnings.warn(message, DeprecationWarning), and follow Python’s standard warnings filtering: by default they are printed only for deprecated calls made directly from a user script or interactive session (__main__), once per call site, while calls from inside imported modules are silent. Run Python with -W default (or use warnings.simplefilter("default")) to surface every occurrence, or error in place of default to raise them as exceptions when hunting call sites in tests or CI.

  • dx()/mutableDx() behave the same way readDx()/dataDx() always have: if no Dx (x-error) data has been set on the spectrum, it is first initialized to zeros, so these methods are always safe to call without first checking hasDx().

  • Much of the legacy Instrument object tree exposed to python is now deprecated in favour of the index-based SpectrumInfo/DetectorInfo/ComponentInfo access layers. Calling the deprecated members now emits a DeprecationWarning naming the replacement. Affected members include getInstrument(), Instrument.getComponentByName/getDetector/getSample/getSource/getNumberDetectors/findRectDetectors/findGridDetectors, IComponent.getPos/getName/getFullName/type/getRelativeRot, Component.getRotation/getRelativePos, ICompAssembly.nelements/__len__/__getitem__, IObjComponent.shape and IDetector.getID/solidAngle/getTwoTheta/getPhi. The methods continue to work for now; see the Instrument Access via SpectrumInfo, DetectorInfo, ComponentInfo concept page for the recommended replacements.

  • The deprecation warnings above are emitted via PyErr_Warn(PyExc_DeprecationWarning, …), equivalent to warnings.warn(message, DeprecationWarning), and follow Python’s standard warnings filtering: by default they are printed only for deprecated calls made directly from a user script or interactive session (__main__), once per call site, while calls from inside imported modules are silent. Run Python with -W default (or use warnings.simplefilter("default")) to surface every occurrence, or error in place of default to raise them as exceptions when hunting call sites in tests or CI.

  • ComponentInfo now exposes solidAngle(index, observer) and componentType(index) (returning a ComponentType) to python. These provide index-based replacements for IDetector.solidAngle and the RectangularDetector/GridDetector type checks, as part of the migration to the ComponentInfo/DetectorInfo access layers.

  • PanelSurfaceCalculator.getSideBySideViewPos() will no longer take an instrument parameter.

  • MatrixWorkspace now exposes the preferred Histogram data accessors to python: x(), y(), e(), dx() (read-only numpy wrappers) and mutableX(), mutableY(), mutableE(), mutableDx() (writable numpy wrappers). These replace the legacy readX()/readY()/readE()/readDx() and dataX()/dataY()/dataE()/dataDx() methods, which are now deprecated and emit a DeprecationWarning naming the replacement, but continue to work and return the same data. See the Transition to the HistogramData module concept page for more information on the Histogram data model.

  • dx()/mutableDx() behave the same way readDx()/dataDx() always have: if no Dx (x-error) data has been set on the spectrum, it is first initialized to zeros, so these methods are always safe to call.

  • The deprecation warnings above are emitted via PyErr_Warn(PyExc_DeprecationWarning, …), equivalent to warnings.warn(message, DeprecationWarning), and follow Python’s standard warnings filtering: by default they are printed only for deprecated calls made directly from a user script or interactive session (__main__), once per call site, while calls from inside imported modules are silent. Run Python with -W default (or use warnings.simplefilter("default")) to surface every occurrence, or error in place of default to raise them as exceptions when hunting call sites in tests or CI.

Dependencies#

New features#

  • Upgraded python to 3.13. See the changes made to python here.

  • Automatically set MPLCONFIGDIR to $XDG_CACHE_HOME/matplotlib when XDG_CACHE_HOME is set

  • Remove ArielToMantidXML tool. This is a tool that was used when transitioning instruments to mantid from other reduction software.

  • Removed dependence on the quasielasticbayes library to facilitate the upgrade to Qt6.

Bugfixes#

MantidWorkbench#

See Mantid Workbench Changes.

Release 7.0.0