\(\renewcommand\AA{\unicode{x212B}}\)

Framework Changes

Logging

  • We have changed the logging in Mantid to stop writing the high level version of the log to a file. This had been causing numerous problems including inconsistent behaviour with multiple instances of Mantid, performance problems when logging at detailed levels, and excessive network usage in some scenarios. This does not change the rest of the logging that you see in the message display in Mantidplot or the console window. A warning message will appear if configuration for the removed components of logging is found.

  • Associated with this we have also simplified the python methods used to control logging.

# The two methods
ConfigService.SetConsoleLogLevel(int)
ConfigService.SetFileLogLevel(int)

# Have been replaced by
ConfigService.SetLogLevel(int)
  • Increased the log level from information to notice when creating an instrument geometry.

Nexus Geometry Loading

  • LoadEmptyInstrument will now load instrument geometry from hdf5 NeXus format files. Files consistent with the standard following the introduction of NXoff_geometry and NXcylindrical_geometry will be used to build the entire in-memory instrument geometry within Mantid. This IDF-free route is primarily envisioned for the ESS. While dependent on the instrument, we are overall seeing significant improvements in instrument load times over loading from equivalent IDF based implementations. LoadInstrument also supports the nexus geometry format in the same was as LoadEmptyInstrument.

  • The changes above have also been incorporated directly into LoadEventNexus, so it is possible to store data and geometry together for the first time in a NeXus compliant format for Mantid. These changes have made it possible to load experimental ESS event data files directly into Mantid.

Instruments

  • New helper function ExperimentInfo.getResourceFilenames returns a list of instrument definition files and/or parameter files in accordance to a query time stamp.

  • A bug has been fixed that caused each workspace to hold a separate copy of the instrument. In the case of large instruments such as WISH this added 200MB to each workspace, even in the case of a single spectrum workspace.

Archive Searching

SNS / ONCat

  • SNS file searching has been moved to ONCAT. Due to auto-updating of the Facilities.xml, this was done by directing SNSDataSearch and ORNLDataSearch to both use ONCAT.

  • For HFIR instruments that write out raw files with run numbers, we have enabled functionality that allows for the searching of file locations by making calls to ONCat. To use this, make sure that the “Search Data Archive” option is checked in your “Manage User Directories” settings. The FileFinder and algorithms such as Load will then accept inputs such as “HB2C_143210”.

ISIS / ICat

  • The path returned by ICat starting \\isis\inst$ is now overridden by the fully-qualified path starting \\isis.cclrc.ac.uk\inst$ on Windows machines. This makes accessing the archive more reliable over the VPN.

  • On Linux and Mac machines, it is overridden by a path starting /archive.

  • On all machines, you can override this locally by setting icatDownload.mountPoint=<my_path> in your Mantid.user.properties file.

Algorithms

New Algorithms

  • DeadTimeCorrection will correct for the detector dead time.

  • CalculateDynamicRange will calculate the Q range of a SANS workspace.

  • MatchSpectra is an algorithm that calculates factors to match all spectra to a reference spectrum.

  • MaskBinsIf is an algorithm to mask bins according to criteria specified as a muparser expression.

  • MaskNonOverlappingBins masks the bins that do not overlap with another workspace.

  • LoadSampleEnvironment loads or adds to a sample environment from a .stl file, as well as allowing setting the material of the environment to load.

  • ParallaxCorrection will perform a geometric correction for the so-called parallax effect in tube based SANS detectors.

  • CalculateEfficiencyCorrection will calculate a detection efficiency correction with multiple and flexible inputs for calculation.

  • LinkedUBs is an algorithm that ensures continuity of indexing across single crystal runs, as well as indirectly performing a U matrix correction for mis-centered samples or cases where there is error in the gonio angles. Results in a separate UB for each run when used on a whole dataset.

  • CopyDataRange will replace a block of data in a destination workspace with a continuous block of data from an input workspace.

  • CalculateFlux computes the incident flux wavelength profile using an empty beam SANS measurement.

Improvements

  • CompressEvents now correctly sets the weighted events x-value (i.e. time-of-flight)

  • AppendSpectra can append now multiple times the same event workspace.

  • ConjoinXRuns can merge sample logs according to the parameter file independently from MergeRuns. All parameter names must have the prefix conjoin_ appended by the corresponding default parameter names (which are used by MergeRuns).

  • CropToComponent now supports scanning workspaces.

  • SumOverlappingTubes will produce histogram data, and will not split the counts between bins by default.

  • SumSpectra has an additional option, MultiplyBySpectra, which controls whether or not the output spectra are multiplied by the number of bins. This property should be set to False for summing spectra as PDFgetN does.

  • Live Data for events with PreserveEvents=True now produces workspaces that have bin boundaries which encompass the total x-range (TOF) for all events across all spectra if the data was not binned during the process step.

  • RebinToWorkspace now checks if the WorkspaceToRebin and WorkspaceToMatch already have the same binning. Added support for ragged workspaces.

  • GroupWorkspaces supports glob patterns for matching workspaces in the ADS.

  • LoadSampleShape now supports loading from binary .stl files.

  • MaskDetectorsIf now supports masking a workspace in addition to writing the masking information to a calfile.

  • ApplyDetectorScanEffCorr will correctly propagate the masked bins in the calibration map to the output workspace.

  • LoadNexusLogs now will load files that have 1D arrays for each time value in the logs, but will not load this data.

  • GroupDetectors now takes masked bins correctly into account when processing histogram workspaces.

  • SaveNexusProcessed and LoadNexusProcessed can now save and load a MaskWorkspace.

  • ConvertToMD now has ConverterType = {Default, Indexed} setting: Default keeps the old (see ConvertToMD Notes).

  • FitPeaks can output parameters’ uncertainty (fitting error) in an optional workspace.

  • SaveNXcanSAS now has uncertainties parameter as well as uncertainty. They point to the same data. Having both tags makes output compatible with various interpretations of the standards.

  • The documentation in Event Filtering and FilterEvents have been extensively rewritten to aid in understanding what the code does.

  • All of the numerical integration based absorption corrections which use AbsorptionCorrection will generate an exception when they fail to generate a gauge volume. Previously, they would silently generate a correction workspace that was all not-a-number (NAN). If the sample shape is a cylinder it will use the specialized code for rasterizing it.

  • CylinderAbsorption now will check the workspace’s sample object for geometry.

  • Various clarifications and additional links in the geometry and material documentation pages.

  • SetSample and SetSampleMaterial now accept materials without ChemicalFormula or AtomicNumber. In this case, all cross sections and SampleNumberDensity have to be given.

  • SetSampleMaterial and LoadSampleEnvironment accept number densities as formula units per cubic Ångström in addition to atoms per cubic Ångström.

  • LoadEventNexus experimental option LoadType = {Default, Multiprocess} is added, Multiprocess should work faster for big files and it is experimental, available only in Linux.

  • The history generated from a call to SetSample can now be re-executed without error.

  • MonteCarloAbsorption no more fails with ‘Unable to generate point in object’ errors if the sample shape is cuboid, cylinder, or sphere.

  • Changes in Q1DWeighted:

    • Significant speedup for TOF mode due to reorganization of the code.

    • An option for asymmetric wedges for an anisotropic scatterer

    • The bins masked in the input will be discarded from the calculation

    • An option to account for the nominal gravity drop

Bugfixes

  • SaveGDA Now takes a parameter of OutputFilename instead of Filename to better match with similar algorithms.

  • Bugfix in ConvertToMatrixWorkspace with Workspace2D as the InputWorkspace not being cloned to the OutputWorkspace. Added support for ragged workspaces.

  • SolidAngle Now properly accounts for a given StartWorkspaceIndex.

  • FilterEvents output workspaces now contain the goniometer.

  • Fixed an issue where a workspace’s history wouldn’t update for some algorithms.

  • Fixed a std::bad_cast error in LoadLiveData v1 when the data size changes.

  • Fit now applies the ties in correct order independently on the order they are set. If any circular dependencies are found Fit will give an error.

  • Fixed a rare bug in MaskDetectors where a workspace could become invalidated in Python if it was a MaskWorkspace.

  • Fixed a crash in MaskDetectors when a non-existent component was given in ComponentList.

  • The output workspace now keeps the units of the input workspace for all sample log entries of algorithms MergeRuns and ConjoinXRuns.

  • History for algorithms that took groups sometimes would get incorrect history causing history to be incomplete, so now full group history is saved for all items belonging to the group.

  • Fixed a bug in SetGoniometer where it would use the mean log value rather than the time series average value for goniometer angles.

  • Fixed a bug in AlignAndFocusPowderFromFiles for using the passed on CompressTolerance and CompressWallClockTolerance in the child CompressEvents algorithm instead of just in the child AlignAndFocusPowder algorithm.

  • ConvertToMD now uses the time-average value for logs when using them as OtherDimensions.

  • The input validator is fixed in MostLikelyMean avoiding a segmentation fault.

  • The inputs of the algorithm MergeLogs are improved and a segmentation fault will not happen, if logs are not time series. The merging is now compliant with Mantid wide time series merging for example when adding workspaces.

  • Fixed a bug in AlignAndFocusPowder where a histogram input workspace did not clone propertly to the output workspace and properly masking a grouping workspace passed to DiffractionFocussing. Also adds initial unit tests for AlignAndFocusPowder.

  • Fixed a bug in ExtractSpectra which was causing a wrong last value in the output’s vertical axis if the axis type was BinEdgeAxis.

  • Fixed an issue in Rebin2D where NaN values would result if there were zero-area bins in the input workspace.

  • Fixed the CheckSample option of algorithm CompareWorkspaces: it crashed Mantid when comparing the run’s sample logs. The algorithm’s debug logging will now tell explicitly about the first entry which caused the log mismatch.

  • Fixed a bug in MayersSampleCorrection when using the multiple scattering correction.

  • Fixed a bug in IntegrateMDHistoWorkspace in some cases where NaN’s are present outside the integration range.

  • SaveNexusProcessed and LoadNexusProcessed now save and load an empty sample name correctly. Note, that files saved before this change will still load with an empty sample name replaced by a space as before.

  • Fixed a bug in IkedaCarpenterPV where a sign in zv was different from FullProf NPROF=13.

  • SaveNexusProcessed now save and load spectrum numbers even when histograms have no detectors.

  • SavePlot1D has been updated to follow changes to the plotly api.

  • LoadAndMerge allows now international execution.

Python

New

  • All python methods accepting basic strings now also accept unicode strings.

  • New python validator type: OrientedLattice checks whether a workspace has an oriented lattice object attached.

  • The windows python bundle now includes numpy=1.15.4, scipy=1.1.0, matplotlib=2.2.3, pip=18.1

  • We have been making major performance improvements to geometry access in Mantid over the last few releases. We are now exposing these features via Python to give our users direct access to the same benefits as part of their scripts. The newly exposed objects are now available via workspaces and include:

  • mantid.geometry.ComponentInfo is exposed to allow the user to access geometric information about the components which are part of a beamline. Iterator support is also provided via python.

  • mantid.geometry.DetectorInfo offers the user the ability to access geometric information about the detector(s) which are part of a beamline. DetectorInfo has also been given a python iterator.

  • mantid.api.SpectrumInfo allows the user to access information about the spectra being used in a beamline. SpectrumInfo has also been given an iterator to allow users to write more Pythonic loops rather than normal index based loops. In addition to this SpectrumDefinition objects can also be accessed via a mantid.api.SpectrumInfo object. The SpectrumDefinition object can be used to obtain information about the spectrum to detector mapping and provides a definition of what a spectrum comprises, i.e. indices of all detectors that contribute to the data stored in the spectrum.

  • Added new unit called Temperature which has units of Kelvin.

  • Importing mantid no longer initializes the FrameworkManager. This allows separate classes to be imported without requiring a long delay in waiting for the framework to start. Amongst other things this allows the application name to be set correctly:

from mantid import FrameworkManager, UsageService
UsageService.setApplicationName('myapp')
FrameworkManager.Instance()
  • FileFinder.findRuns now optionally accepts a list of file extensions to search, called exts, and a boolean flag useExtsOnly. If this flag is True, FileFinder will search for the passed in extensions ONLY. If it is False, it will search for passed in extensions and then facility extensions.

Improvements

  • ChudleyElliot includes hbar in the definition.

  • The calculations for mantid.kernel.Material have been changed to match the equations in Sears, Varley F. “Neutron scattering lengths and cross sections.” Neutron News 3.3 (1992): 26-37

  • Functions may now have their constraint penalties for fitting set in python using function.setConstraintPenaltyFactor("parameterName", double).

  • mantid.kernel.Logger now handles unicode in python2.

  • mantid.api.ITableWorkspace.columnTypes() now returns human readable strings for non-primitive column types.

  • It is now possible to build custom materials with mantid.kernel.MaterialBuilder without setting a formula or atomic number. In this case, all cross sections and number density have to be given.

  • Python plotting now handles twinx and twiny axes for workspaces.

  • mantid.kernel.MaterialBuilder now supports number densities in formula units per cubic Ångström.

  • IPython on Windows has been upgraded to v5.8.0. This is the last version that supports Python 2.

Release 4.0.0