\(\renewcommand\AA{\unicode{x212B}}\)
Framework Changes¶
Instrument Definition Updates¶
The MAPS IDF has been updated following its upgrade.
Instrument Definitions¶
Warning
Users: Instruments in Mantid will no longer silently discard detectors defined with duplicate IDs. This has been a long-standing source of hard to find issue in Mantid. We have endeavoured to ensure that all Instrument Definition Files shipped with Mantid are now corrected. If you have local IDFs, please update them to remove any duplicate IDs, or ask the Mantid Team for help, the warning and error information in Mantid will give details about duplicates in IDFs that cannot be loaded.
Beware that LoadNexusProcessed will now NOT load the Instrument from historic Processed Nexus files if the embedded IDF is corruped with duplicate detector IDs. The workspace (data) part will still load, but the workspace will not have any Instrument attached. There are new warnings generated that describe the exact problem and the remedy when this happens. Note that the fix is generally easy. You should be able to run LoadInstrument on the Workspace, pointing it to an updated IDF, which is free of duplicates.
Please contact the Mantid Team if you experience any further problems as a result of these changes.
Algorithms¶
New¶
MostLikelyMean is a new algorithm that computes the mean of the given array, that has the least distance from the rest of the elements.
LoadAndMerge is a new algorithm that can load and merge multiple runs.
CropWorkspaceRagged: New algorithm that will crop each spectrum with a different x-range.
LoadLamp: New algorithm to load processed HDF5 files produced by LAMP program at ILL.
SaveReflections is a new algorithm to save PeaksWorkspaces to Fullprof, Jana, GSAS, and SHELX text formats.
Improved¶
NormaliseToMonitor now supports workspaces with detector scans and workspaces with single-count point data.
CalculatePolynomialBackground: It is now possible to choose between weighted and unweighted fitting.
CreateWorkspace will no longer create a default (and potentially wrong) mapping from spectra to detectors, unless a parent workspace is given. This change ensures that accidental bad mappings that could lead to corrupted data are not created silently anymore. This change does not affect the use of this algorithm if: (1) a parent workspace is given, or (2) no instrument is loaded into to workspace at a later point, or (3) an instrument is loaded at a later point but
LoadInstrument
is used withRewriteSpectraMapping=True
. See also the algorithm documentation for details.ConjoinWorkspaces now supports non-constant bins.
Fit will now respect excluded ranges when
CostFunction = 'Unweighted least squares'
.NormaliseToMonitor now supports a non-constant number of bins.
CompressEvents now supports compressing events with pulse time.
MaskBins now uses a modernized and standardized way for providing a list of workspace indices. For compatibility reasons the previous
SpectraList
property is still supported.LoadMcStas now loads event data in separate workspaces (single scattering, multiple scattering) as well as all scattering.
MaxEnt: The
EvolChi
andEvolAngle
workspaces now only contain data up until the result has converged.SaveNexus will no longer crash when passed a
PeaksWorkspace
with integrated peaks that have missing radius information.ConjoinXRuns will now accept workspaces with varying x-axes per spectrum.
LoadEXED has better handling of monitor workspace and sample logs.
Bugfixes¶
Known Issues¶
LoadEventNexus is incorrectly ignoring the FilterMonBy* properties. When loading monitors as events the output *_monitors workspace then contains all recorded events rather than those accepted by the filters. To work around this issue run the FilterByTime algorithm on the output *_monitors workspace with the same values as passed to the FilterMonBy* properties.
Fitting¶
Improved¶
EISFDiffSphere fits the Q-dependence on the EISF of a particle undergoing continuous diffusion but confined to a spherical volume.
EISFDiffSphereAlkyl fits the Q-dependence on the EISF of an alkyl molecule, like a membrane lipd.
EISFDiffCylinder models the elastic incoherent scattering intensity of a particle diffusing within a cylinder.
Bugfixes¶
Fix for a bug in calculating numerical derivatives by applying ties correctly.
Core Functionality¶
New¶
Added new classes
ConfigObserver
for listening for changes to any configuration property andConfigPropertyObserver
for listening to changes to an individual config property of interest.
Improved¶
DEB and RPM package sizes reduced by 17% and 6% respectively.
mantid.kernel.FloatTimeSeriesProperty
now returnsnumpy.datetime64
for the log times.The duration reported by a running algorithm now includes time spent for validation of properties and inputs. This fixes a discrepancy between observed and reported timings if validation is expensive, e.g., when checking if a file exists. More detailed timing information is now available when setting the log level to
debug
.The status of a fit in the fit window is now at the top of the of the dialog instead of the bottom.
Condition to check if a property is enabled when serializing.
Workspace locking no longer prevents simple read operations required to display the workspace context menu in Mantidplot.
TableWorkspaces can now be converted to a Python dictionary by calling the
table.toDict()
function.MultiFileProperty
now accepts complex summation ranges for run numbers, such as111-113+115
and111-115+123-132
.
Bugfixes¶
Fixed an issue where certain isotopes could not be accessed using the Atom classes, e.g Si28.
datasearch.searcharchive
property has new functionality to only search the default facility.Fixed the calculation of scattering length and scattering length squared for
Material
.Fixed the behaviour of
UpdateInstrumentDefinitions.OnStartup
in the properties file. It was not being used correctly for using the updatedFacilities.xml
file.
Live Data¶
New¶
KafkaEventListener
is a new live listener for neutron event and sample environment data which is in development for the ESS and ISIS.
Performance¶
Improved¶
LoadEmptyInstrument and load algorithms that are using it. Improved performance for second and consecutive loads of instrument geometry, particularly for instruments with many detector pixels.
CropToComponent: Up to 30% performance improvement, based on ongoing work on Instrument-2.0.
MaxEnt: Improved rate of convergence. The
ChiTarget
property has been replaced byChiTargetOverN
.
Bugfixes¶
A bug in the handling of fractional bin weights in a specialised form (RebinnedOutput) of Workspace2D has been fixed. This mainly affects the algorithms SofQWNormalisedPolygon v1 and Rebin2D v1, which underlies the SliceViewer.
Python¶
New¶
mantid.api.IPeak
has three new functions:getEnergyTransfer
which returns the difference between the initial and final energy.getIntensityOverSigma
which returns the peak intensity divided by the error in intensity.getGoniometerMatrix
which returns the goniometer rotation matrix associated with the peak.
Improved¶
In
mantid.simpleapi
, a keyword has been implemented for function-like algorithm calls to control the storing on the Analysis Data Service.StoreInADS=False
can be passed to function calls to not to store their output on the ADS.The standard Python operators, e.g.
+
,+=
, etc., now work also with workspaces not in the ADS.The
isDefault
attribute for workspace properties now works correctly with workspaces not in the ADS.The previously mentioned
ConfigObserver
andConfigPropertyObserver
classes are also exposed to Python.mantid.kernel.V3D
vectors now support negation through the usual-
operator.It is now possible to pickle and de-pickle Workspace2D and TableWorkspace in Python. This has been added to make it easier to transfer your workspaces over a network. Only these two workspace types currently supports the pickling process, and there are limitations to be aware of described here.
Support for unicode property names has been added to Python. This means that one can run the following in Python2 or Python3.
from mantid.simpleapi import *
import json
source = json.loads('{"Filename":"CNCS_7860_event.nxs"}')
props = json.loads('{"InputWorkspace":"eventWS", "Params":"1000"}')
eventWS = Load(**source)
rebinned = Rebin(**props)
Deprecated¶
MantidPlot.pyplot was an early attempt to provide Matplotlib style syntax over Mantidplot plotting. This will be replaced in Mantid 4.0 with MatPlotlib itself, and this packages would cause namespace clashes and confusion. This package is now deprecated, and will not be included in future releases of Mantid. To the best of our knowledge the impact of this should be minimal as it is at best only rarely used.
Bugfixes¶
Fixed an issue with coercing data from python lists or numpy arrays where the datatype!=float64 into a workspace