Framework Changes#
Algorithms#
New features#
A new algorithm SaveMDToAscii v1 has been added to save an
MDHistoWorkspaceto a plain ASCII file, with configurable exclusion of integrated dimensions, normalization, column separator and numeric precision.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.
The Fit v1 algorithm now allows setting step sizes to customize the perturbation applied to each parameter value while fitting. Setting the
StepSizeMethodtoCustomwill allow the step sizes list to be passed using theCustomStepSizesparameter.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
UseLogTimesproperty.HFIRPowderReduction v1 now has an
IDFFilenameproperty 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
MultipleFilePropertynow 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
StrictConvergenceflag, which decides whether fits which have finished due to the parameter step size passing below the stopping threshold should be considered as successful - default isTrueto match previous behaviour.FitPeaks v1 now accepts
Unweighted least squarescost function.FitPeaks v1 now has
PositionToleranceModeinput which controlsPositionTolerancebehaviour. Default isCheckwhich maintains previous behaviour of the positional tolerance being checked after the fit and discarding any fits outside tolerance. This parameter enablesConstrainmode, which will instead apply the tolerances as constraints on the fit.Constrainmode requiresConstrainPeakPositionsbe disabled.FitPeaks v1 now has
CalculateUnconstrainedErrorswhich controls whether the errors for fits should be recomputed after the fit, without the constraints applied. Default isFalse.FitPeaks v1 now has
PositionToleranceFractionalwhich controls whether thePositionToleranceshould 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
UseValidDataOnlyoption which, whentrue, ignores the contribution of invalid signal values to overlap bins when another workspace has valid data in the same bin. Whenfalse(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
VESUVIOspectrometer for measured sample and empty run numbers.A new property
OutputWorkspaceSuffixeshas 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#
SaveDaveGrp v1 algorithm now optionally converts the spectrum numbers into
Qvalues using GetQsInQENSData v1 when creating the.grpfile.CopySample v1 no longer causes a crash when called with
CopyShape = False,CopyMaterial = Trueand an input workspace that is subsequently overwritten.Algorithm SaveYDA now correctly distinguishes between spectra and bin center axes when saving data.
In
BeamProfileFactorythe 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 inFacilities.xmlwhen expanding multi-run hints, so ranges such asCNCS100:105.nxs.h5resolve correctly instead of being misinterpreted as a stem ending in.nxsplus an.h5extension. As a consequence, a hint that explicitly specifies one extension (e.g.BSS_24234_event.nxsorSXD30904.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
PeakParameterValueTableinput option now reads and applies row-per-spectra parameter starting values. Previously this functionality was declared but was not applied.: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
DetectorListis used on focused workspaces where a workspace index maps to several detector IDs.
Deprecated#
The
DPDFreductionalgorithm 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
quasielasticbayeslibrary. Users should now use the newquickbayesreplacements, BayesQuasi2 v1 and BayesStretch2 v1, respectively.
Fit Functions#
New features#
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:GammaandIkedaCarpenterPV:Gamma).
Deprecated#
Removed#
Data Objects#
New features#
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
MDGridBoxsplitting where events exactly on a child box’s upper boundary could be dropped during serial or threaded splitting.
Live Data#
New features#
Bugfixes#
The
SNSLiveEventDataListenerstate machine is refactored to simplify its structure, remove race conditions, and make all state transitions explicit. These changes primarily add to theILiveListenerinterface, deprecating itsrunStatusmethod, but otherwise leave mostILiveListenerimplementations largely unchanged.
Python#
New features#
Instrumentnow hasgetXmlTextexposed to python.The dimensions of an
IMDHistoWorkspacecan now have theirnameandunitsedited from Python viagetDimension(i).setName(...)andgetDimension(i).setUnits(...). Editing units is supported for HKL and general frames; an HKL dimension acceptsr.l.u.or an inverse-Angstrom-style label such asin 2.5 A^-1. This is useful for relabelling the dimensions produced byMDNormfor unusual projections.MeshObjectnow hasgetBoundingBoxexposed to python.MDHistoWorkspacenow providessetNumEventsArrayto overwrite the number-of-events array from a numpy array, mirroring the existingsetSignalArrayandsetErrorSquaredArraymethods. Manual updates through these array setters clear any link to the originalMDEventWorkspaceso downstream rebinning or slicing cannot bypass the manually-set values.
Bugfixes#
Fixed a crash where a
Peakretrieved from aPeaksWorkspacein 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#
MatrixWorkspacenow exposes the preferredHistogramdata accessors to python:x(),y(),e(),dx()(read-only numpy wrappers) andmutableX(),mutableY(),mutableE(),mutableDx()(writable numpy wrappers). These replace the legacyreadX()/readY()/readE()/readDx()anddataX()/dataY()/dataE()/dataDx()methods, which are now deprecated and emit aDeprecationWarningnaming the replacement, but continue to work and return the same data. See the Transition to the HistogramData module concept page for more information on theHistogramdata 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 usewarnings.simplefilter("default")) to surface every occurrence, orerrorin place ofdefaultto raise them as exceptions when hunting call sites in tests or CI.dx()/mutableDx()behave the same wayreadDx()/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 checkinghasDx().Much of the legacy
Instrumentobject tree exposed to python is now deprecated in favour of the index-basedSpectrumInfo/DetectorInfo/ComponentInfoaccess layers. Calling the deprecated members now emits aDeprecationWarningnaming the replacement. Affected members includegetInstrument(),Instrument.getComponentByName/getDetector/getSample/getSource/getNumberDetectors/findRectDetectors/findGridDetectors,IComponent.getPos/getName/getFullName/type/getRelativeRot,Component.getRotation/getRelativePos,ICompAssembly.nelements/__len__/__getitem__,IObjComponent.shapeandIDetector.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 usewarnings.simplefilter("default")) to surface every occurrence, orerrorin place ofdefaultto raise them as exceptions when hunting call sites in tests or CI.ComponentInfonow exposessolidAngle(index, observer)andcomponentType(index)(returning aComponentType) to python. These provide index-based replacements forIDetector.solidAngleand theRectangularDetector/GridDetectortype checks, as part of the migration to theComponentInfo/DetectorInfoaccess layers.MatrixWorkspacenow exposes the preferredHistogramdata accessors to python:x(),y(),e(),dx()(read-only numpy wrappers) andmutableX(),mutableY(),mutableE(),mutableDx()(writable numpy wrappers). These replace the legacyreadX()/readY()/readE()/readDx()anddataX()/dataY()/dataE()/dataDx()methods, which are now deprecated and emit aDeprecationWarningnaming the replacement, but continue to work and return the same data. See the Transition to the HistogramData module concept page for more information on theHistogramdata model.dx()/mutableDx()behave the same wayreadDx()/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 usewarnings.simplefilter("default")) to surface every occurrence, orerrorin place ofdefaultto 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.
Removed dependence on the
quasielasticbayeslibrary to facilitate the upgrade to Qt6.