Framework Changes#
Algorithms#
New features#
Append Spectra has a new property
RewriteSpectraMapto append two workspaces with spectra having same detector IDs at different positions by rewriting the spectrum to detector mapping.
Bugfixes#
Mantid now keeps asynchronously started algorithms, including live-data monitoring algorithms, active during startup so they can be cancelled safely if Mantid shuts down immediately.
A mesh sample’s baked goniometer rotation is now saved to and loaded from NeXus, so a saved and reloaded sample is no longer rotated a second time. Files saved before this change, and samples in their own frame, load as unrotated exactly as before.
On Windows, algorithms that split their work into tasks, such as LoadEventNexus v1, now respect the
MultiThreaded.MaxCoressetting rather than always using every core.ClearInstrumentParameters v1 now reports an error for workspaces with a detector scan, instead of silently discarding the scan and leaving the workspace in an inconsistent state.
LoadParameterFile v1 now adds parameters whose values come from sample logs to the given workspace only. Previously they were also applied to every other workspace with the same instrument, including workspaces loaded later in the session, the next time their instrument parameters were refreshed from their logs.
CopyInstrumentParameters no longer fails when the input workspace has masked detectors and its instrument differs from that of the output workspace. The masking is now copied along with the other parameters.
Deprecated#
Removed#
The following deprecated algorithms have now been removed:
LoadSINQFocus(deprecated 2013-10-28). Use LoadSINQ v1 instead.LoadPreNexus(deprecated 2025-04-10). There is no replacement.LoadPreNexusMonitors(deprecated 2025-04-10). There is no replacement.LoadEventPreNexus(deprecated 2025-05-06). There is no replacement.LoadPreNexusLive(deprecated 2025-05-27), which depended onLoadEventPreNexus. There is no replacement.
DetermineChunking v1 no longer accepts SNS
_runinfo.xml(PreNeXus) files.DgsReduction v1 no longer loads monitors from PreNeXus
_neutron_event.datfiles when determining the incident energy.The algorithm
IntegratePeaksMD v1was deprecated in Release 6.13.0 and has now been removed. Use IntegratePeaksMD v2 instead.The algorithm
IntegratePeaksCWSDwas deprecated in Release 6.13.0 and has now been removed. There is no replacement. As a result, theIntegrate Peaksbutton on theScans Processingtab and theIntegrate Peakbutton on thePeak Integrationtab of the HFIR 4-Circle Reduction interface have been removed.Removed UnwrapMonitorsInTOF and UnwrapSNS (deprecated since release 6.13.0).
Removed
MaskInstrument(deprecated since release 5.1.0), use MaskDetectors instead.Removed version 1 of
SCDCalibratePanels(deprecated since release 6.14.0), use SCDCalibratePanels v2 instead.
Fit Functions#
New features#
Bugfixes#
Fixed a crash in UserFunction1D when the function has no fitting parameters or all parameters are fixed. An error is now raised suggesting EvaluateFunction instead.
Copying or saving a multi-domain fit function that contains an empty composite function, such as an empty
ProductFunction, now keeps each member assigned to its own dataset. Previously, all members were assigned to the first dataset.
Deprecated#
Removed#
Data Objects#
New features#
Bugfixes#
componentInfo()andinstrumentMetadata()now return the instrument of an experiment info that has not yet been read from its file, such as one in an MD workspace loaded withFileBackEndin LoadMD v1, instead of an empty instrument.
Python#
New features#
ComponentInfoin Python has new methodspixelGridXSizeandpixelGridYSizefor finding the physical size (in m) if a grid or rectangular detector.Workspaces now provide
getLabFrameSampleShape, returning the sample shape as it sits in the lab frame, rotated by whatever part of the workspace’s goniometer rotation the shape does not already carry. The workspace’s own sample is left unchanged. A flat-plate shape offers no way to express a rotation, so it is taken to be defined in the frame it is meant to be used in and returned unchanged with a warning. A CSG shape rotated with RotateSampleShape v1 and saved by an earlier version cannot be told apart from one already in the lab frame, sogetLabFrameSampleShapereplaces that rotation with the workspace’s goniometer rotation rather than adding to it.Sample shapes now expose
getAppliedRotation, the goniometer rotation baked into the shape. This says which frame the shape is in, not every rotation it has ever had: rotations that re-express the shape within its own frame - theXDegreesproperties of LoadSampleShape v1,rotate-alltags and RotateSampleShape v1 - are excluded, so the identity means the shape is in its own frame however much its definition has been rotated within that frame.ComponentInfohas new methodsgetPositionParameter,getRotationParameter,getParameterAsString,getParameterVisible,getParamDescription,getParamShortDescription,getDescription,getShortDescriptionandsetDescription. They give the same results as the methods of the same name on instrument components, so they can be used in their place. See Instrument Access via SpectrumInfo, DetectorInfo, ComponentInfo.ComponentInfohas a new methodreferenceFrame(), returning the instrument’sReferenceFrame(which axes point up and along the beam), asInstrument.getReferenceFrame()did. Use it asworkspace.componentInfo().referenceFrame(). See Instrument Access via SpectrumInfo, DetectorInfo, ComponentInfo.DetectorInfoandSpectrumInfoin Python have new methodsphiandphiOffset, and new versions oftwoThetaandsignedTwoThetathat take an observer position and axis. These give the same results asgetPhi,getPhiOffset,getTwoThetaandgetSignedTwoThetaon detector objects, so they can be used in their place.IMDHistoWorkspacemethodssetSignalArray,setErrorSquaredArrayandsetNumEventsArrayare now much faster for large arrays: setting the 160 million bins of a WAND scan takes 0.16 s instead of 19 s.MatrixWorkspacein Python has a new methodgetXMinMax, which returns the lowest and highest X values of all spectra or of the given workspace indices. Spectra with a non-finite first or last value are skipped unlessincludeNonFiniteSpectrais true, in which case they contribute their finite values.
Bugfixes#
Live data monitoring no longer stalls when C++ log messages are forwarded to Python while another Python thread holds the global interpreter lock.
Deprecation and other warnings raised by Mantid’s Python API are now raised as the warning itself when Python is set to treat warnings as errors (for example with
-W errororwarnings.simplefilter("error")), making it possible to find deprecated calls this way. Previously they caused aSystemErrorinstead.Python algorithms no longer deadlock during
AlgorithmManager.shutdown()when they need to reacquire Python’s global interpreter lock (GIL) to finish.ComponentInfomethodindexOfAny(name)now returns the same component asInstrument.getComponentByName(name)when several components share a name: the one closest to the root of the instrument. Previously it could return a different component with that name.
Deprecated#
Instrument.getBaseInstrument()is deprecated and now raises aDeprecationWarning. To get the instrument geometry before any moves, rotations or calibration were applied, use the newbaseComponentInfo()method on the workspace, which returns aComponentInfowith the same component indices ascomponentInfo(). See Instrument Access via SpectrumInfo, DetectorInfo, ComponentInfo.