Skip to content

Latest commit

 

History

History
599 lines (445 loc) · 19.6 KB

Indirect_DataAnalysis.rst

File metadata and controls

599 lines (445 loc) · 19.6 KB

Indirect Data Analysis

Table of Contents

Overview

Data Analysis

The Indirect Data Analysis interface is a collection of tools within MantidPlot for analysing reduced data from indirect geometry spectrometers, such as IRIS and OSIRIS.

The majority of the functions used within this interface can be used with both reduced files (_red.nxs) and workspaces (_red) created using the Indirect Data Reduction interface or using S(Q, ω) files (_sqw.nxs) and workspaces (_sqw) created using either the Indirect Data Reduction interface or taken from a bespoke algorithm or auto reduction.

Action Buttons

?

Opens this help page.

Py

Exports a Python script which will replicate the processing done by the current tab.

Run

Runs the processing configured on the current tab.

Manage Directories

Opens the Manage Directories dialog allowing you to change your search directories and default save directory and enable/disable data archive search.

Elwin

Data Analysis

Provides an interface for the ElasticWindow <algm-ElasticWindow> algorithm, with the option of selecting the range to integrate over as well as the background range. An on-screen plot is also provided.

For workspaces that have a sample log or have a sample log file available in the Mantid data search paths that contains the sample environment information the ELF workspace can also be normalised to the lowest temperature run in the range of input files.

Options

Input File

Specify a range of input files that are either reduced (_red.nxs) or S(Q, ω).

Range One

The energy range over which to integrate the values.

Use Two Ranges

If checked a background will be calculated and subtracted from the raw data.

Range Two

The energy range over which a background is calculated which is subtracted from the raw data.

Normalise to Lowest Temp

If checked the raw files will be normalised to the run with the lowest temperature, to do this there must be a valid sample environment entry in the sample logs for each of the input files.

SE log name

The name of the sample environment log entry in the input files sample logs (defaults to sample).

Plot Result

If enabled will plot the result as a spectra plot.

Save Result

If enabled the result will be saved as a NeXus file in the default save directory.

MSD Fit

Data Analysis

Given either a saved NeXus file or workspace generated using the ElWin tab, this tab fits log(intensity) vs. Q2 with a straight line for each run specified to give the Mean Square Displacement (MSD). It then plots the MSD as function of run number.

MSDFit searches for the log files named <runnumber>_sample.txt in your chosen raw file directory (the name ‘sample’ is for OSIRIS). If they exist the temperature is read and the MSD is plotted versus temperature; if they do not exist the MSD is plotted versus run number (last 3 digits).

The fitted parameters for all runs are in _msd_Table and the <u2> in _msd. To run the Sequential fit a workspace named <inst><first-run>_to<last-run>_lnI is created of ln(I) v. Q2 for all runs. A contour or 3D plot of this may be of interest.

A sequential fit is run by clicking the Run button at the bottom of the tab, a single fit can be done using the Fit Single Spectrum button underneath the preview plot.

Options

Input File

A file that has been created using the Elwin tab with an x axis of Q2.

StartX & EndX

The x range to perform fitting over.

Plot Spectrum

The spectrum shown in the preview plot and will be fitted by running Fit Single Spectrum.

Spectra Range

The spectra range over which to perform sequential fitting.

Verbose

Enables outputting additional information to the Results Log.

Plot Result

If enabled will plot the result as a spectra plot.

Save Result

If enabled the result will be saved as a NeXus file in the default save directory.

Fury

Data Analysis

Given sample and resolution inputs, carries out a fit as per the theory detailed in the TransformToIqt <algm-TransformToIqt> algorithm.

Options

Sample

Either a reduced file (_red.nxs) or workspace (_red) or an S(Q, ω) file (_sqw.nxs) or workspace (_sqw).

Resolution

Either a resolution file (_res.nxs) or workspace (_res) or an S(Q, ω) file (_sqw.nxs) or workspace (_sqw).

ELow, EHigh

The rebiinning range.

SampleBinning

The ratio at which to decrease the number of bins by through merging of intensities from neighbouring bins.

Verbose

Enables outputting additional information to the Results Log.

Plot Result

If enabled will plot the result as a spectra plot.

Save Result

If enabled the result will be saved as a NeXus file in the default save directory.

Binning

As a bin width that is a factor of the binning range is required for this analysis the bin width is calculated automatically based on the binning range and the number of desired bins in the output which is in turn calculated by reducing the number of sample bins by a given factor.

The calculated binning parameters are displayed alongside the binning options:

EWidth

The calculated bin width.

SampleBins

Number of bins in the sample after rebinning.

ResolutionBins

Number of bins in the resolution after rebinning, typically this should be at least 5 and a warning will be shown if it is less.

Fury Fit

Data Analysis

FuryFit provides a simplified interface for controlling various fitting functions (see the Fit <algm-Fit> algorithm for more info). The functions are also available via the fit wizard.

Additionally, in the bottom-right of the interface there are options for doing a sequential fit. This is where the program loops through each spectrum in the input workspace, using the fitted values from the previous spectrum as input values for fitting the next. This is done by means of the PlotPeakByLogValue <algm-PlotPeakByLogValue> algorithm.

A sequential fit is run by clicking the Run button at the bottom of the tab, a single fit can be done using the Fit Single Spectrum button underneath the preview plot.

Options

Input

Either a file (_iqt.nxs) or workspace (_iqt) that has been created using the Fury tab.

Fit Type

The type of fitting to perform.

Constrain Intensities

Check to ensure that the sum of the background and intensities is always equal to 1.

Constrain Beta over all Q

Check to use a multi-domain fitting function with the value of beta constrained.

Plot Guess

When checked a curve will be created on the plot window based on the bitting parameters.

StartX & EndX

The range of x over which the fitting will be applied (blue lines on preview plot).

Linear Background A0

The constant amplitude of the background (horizontal green line on the preview plot).

Fitting Parameters

Depending on the Fit Type the parameters shown for each of the fit functions will differ, for more information refer to the documentation pages for the fit function in question.

Plot Spectrum

The spectrum shown in the preview plot and will be fitted by running Fit Single Spectrum.

Spectra Range

The spectra range over which to perform sequential fitting.

Verbose

Enables outputting additional information to the Results Log.

Plot Output

Allows plotting spectra plots of fitting parameters, the options available will depend on the type of fit chosen.

Save Result

If enabled the result will be saved as a NeXus file in the default save directory.

Conv Fit

Data Analysis

Similarly to FuryFit, ConvFit provides a simplified interface for controlling various fitting functions (see the Fit <algm-Fit> algorithm for more info). The functions are also available via the fit wizard.

Additionally, in the bottom-right of the interface there are options for doing a sequential fit. This is where the program loops through each spectrum in the input workspace, using the fitted values from the previous spectrum as input values for fitting the next. This is done by means of the PlotPeakByLogValue <algm-PlotPeakByLogValue> algorithm.

A sequential fit is run by clicking the Run button at the bottom of the tab, a single fit can be done using the Fit Single Spectrum button underneath the preview plot.

Options

Sample

Either a reduced file (_red.nxs) or workspace (_red) or an S(Q, ω) file (_sqw.nxs) or workspace (_sqw).

Resolution

Either a resolution file (_res.nxs) or workspace (_res) or an S(Q, ω) file (_sqw.nxs) or workspace (_sqw).

Fit Type

The type of fitting to perform.

Background

Select the background type, see options below.

Plot Guess

When checked a curve will be created on the plot window based on the bitting parameters.

StartX & EndX

The range of x over which the fitting will be applied (blue lines on preview plot).

A0 & A1 (background)

The A0 and A1 parameters as they appear in the LinearBackground fir function, depending on the Fit Type selected A1 may not be shown.

Delta Function

Enables use of a delta function.

Fitting Parameters

Depending on the Fit Type the parameters shown for each of the fit functions will differ, for more information refer to the documentation pages for the fit function in question.

Plot Spectrum

The spectrum shown in the preview plot and will be fitted by running Fit Single Spectrum.

Spectra Range

The spectra range over which to perform sequential fitting.

Verbose

Enables outputting additional information to the Results Log.

Plot Output

Allows plotting spectra plots of fitting parameters, the options available will depend on the type of fit chosen.

Save Result

If enabled the result will be saved as a NeXus file in the default save directory.

Background Options

Fixed Flat

The A0 parameter is applied to all points in the data.

Fit Flat

Similar to Fixed Flat, however the A0 parameter is treated as an initial guess and will be included as a parameter to the LinearBackground fit function with the coefficient of the linear term fixed to 0.

Fit Linear

The A0 and A1 parameters are used as parameters to the LinearBackground fit function and the best possible fit will be used as the background.

Theory

The measured data I(Q, ω) is proportional to the convolution of the scattering law S(Q, ω) with the resolution function R(Q, ω) of the spectrometer via I(Q, ω) = S(Q, ω) ⊗ R(Q, ω). The traditional method of analysis has been to fit the measured I(Q, ω) with an appropriate set of functions related to the form of S(Q, ω) predicted by theory.

  • In quasielastic scattering the simplest form is when both the S(Q, ω) and the R(Q, ω) have the form of a Lorentzian - a situation which is almost correct for reactor based backscattering spectrometers such as IN10 & IN16 at ILL. The convolution of two Lorentzians is itself a Lorentzian so that the spectrum of the measured and resolution data can both just be fitted with Lorentzians. The broadening of the sample spectrum is then just the difference of the two widths.
  • The next easiest case is when both S(Q, ω) and R(Q, ω) have a simple functional form and the convolution is also a function containing the parameters of the S(Q, ω) and R(Q, omega) functions. The convoluted function may then be fitted to the data to provide the parameters. An example would be the case where the S(Q, ω) is a Lorentzian and the R(Q, ω) is a Gaussian.
  • For diffraction, the shape of the peak in time is a convolution of a Gaussian with a decaying exponential and this function can be used to fit the Bragg peaks.
  • The final case is where R(Q, ω) does not have a simple function form so that the measured data has to be convoluted numerically with the S(Q, ω) function to provide an estimate of the sample scattering. The result is least-squares fitted to the measured data to provide values for the parameters in the S(Q, ω) function.

This latter form of peak fitting is provided by SWIFT. It employs a least-squares algorithm which requires the derivatives of the fitting function with respect to its parameters in order to be faster and more efficient than those algorithms which calculate the derivatives numerically. To do this the assumption is made that the derivative of a convolution is equal to the convolution of the derivative-as the derivative and the convolution are performed over different variables (function parameters and energy transfer respectively) this should be correct. A flat background is subtracted from the resolution data before the convolution is performed.

Four types of sample function are available for S(Q, ω):

Quasielastic

This is the most common case and applies to both translational (diffusion) and rotational modes, both of which have the form of a Lorentzian. The fitted function is a set of Lorentzians centred at the origin in energy transfer.

Elastic

Comprising a central elastic peak together with a set of quasi-elastic Lorentzians also centred at the origin. The elastic peak is taken to be the un-broadened resolution function.

Shift

A central Lorentzian with pairs of energy shifted Lorentzians. This was originally used for crystal field splitting data but more recently has been applied to quantum tunnelling peaks. The fitting function assumes that the peaks are symmetric about the origin in energy transfer both in position and width. The widths of the central and side peaks may be different.

Polymer

A single quasi-elastic peak with 3 different forms of shape. The theory behind this is described elsewhere [1,2]. Briefly, polymer theory predicts 3 forms of the I(Q, t) in the form of exp( − at2/b) where b can be 2, 3 or 4. The Full Width Half-Maximum (FWHM) then has a Q-dependence (power law) of the form Qb. The I(Q, t) has been numerically Fourier transformed into I(Q, ω) and the I(Q, ω) have been fitted with functions of the form of a modified Lorentzian. These latter functions are used in the energy fitting procedures.

References:

  1. J S Higgins, R E Ghosh, W S Howells & G Allen, JCS Faraday II 73 40 (1977)
  2. J S Higgins, G Allen, R E Ghosh, W S Howells & B Farnoux, Chem Phys Lett 49 197 (1977)

Calculate Corrections

Warning

This interface is only available on Windows

Data Analysis

Calculates absorption corrections that could be applied to the data when given information about the sample (and optionally can) geometry.

Options

Input

Either a reduced file (_red.nxs) or workspace (_red) or an S(Q, ω) file (_sqw.nxs) or workspace (_sqw).

Use Can

If checked allows you to select a workspace for the container in the format of either a reduced file (_red.nxs) or workspace (_red) or an S(Q, ω) file (_sqw.nxs) or workspace (_sqw).

Sample Shape

Sets the shape of the sample, this affects the options for the sample details, see below.

Beam Width

Width of the incident beam.

Verbose

Enables outputting additional information to the Results Log.

Plot Result

Plots the As, s, As, sc, Ac, sc and Ac, c workspaces as spectra plots.

Save Result

If enabled the result will be saved as a NeXus file in the default save directory.

Sample Details

Depending on the shape of the sample different parameters for the sample dimension are required and are detailed below.

Flat

Data Analysis

Thickness

Thickness of sample (cm).

Can Front Thickness

Thickness of front container (cm).

Can Back Thickness

Thickness of back container (cm).

Sample Angle

Sample angle (degrees).

Cylinder

Data Analysis

Radius 1

Sample radius 1 (cm).

Radius 2

Sample radius 2 (cm).

Can Radius

Radius of inside of the container (cm).

Step Size

Step size used in calculation.

Theory

The main correction to be applied to neutron scattering data is that for absorption both in the sample and its container, when present. For flat plate geometry, the corrections can be analytical and have been discussed for example by Carlile [1]. The situation for cylindrical geometry is more complex and requires numerical integration. These techniques are well known and used in liquid and amorphous diffraction, and are described in the ATLAS manual [2]. The routines used here have been developed from the corrections programs in the ATLAS suite and take into account the wavelength variation of both the absorption and the scattering cross-sections for the inelastic flight paths.

The absorption corrections use the formulism of Paalman and Pings [3] and involve the attenuation factors Ai, j where i refers to scattering and j attenuation. For example, As, sc is the attenuation factor for scattering in the sample and attenuation in the sample plus container. If the scattering cross sections for sample and container are Σs and Σc respectively, then the measured scattering from the empty container is Ic = ΣcAc, c and that from the sample plus container is Isc = ΣsAs, sc + ΣcAc, sc, thus Σs = (Isc − IcAc, sc/Ac, c)/As, sc. In the package, the program Acorn calculates the attenuation coefficients Ai, j and the routine Analyse uses them to calculate Σs which we identify with S(Q, ω).

References:

  1. C J Carlile, Rutherford Laboratory report, RL-74-103 (1974)
  2. A K Soper, W S Howells & A C Hannon, RAL Report RAL-89-046 (1989)
  3. H H Paalman & C J Pings, J Appl Phys 33 2635 (1962)

Apply Corrections

Data Analysis

The Apply Corrections tab applies the corrections calculated in the Calculate Corrections tab of the Indirect Data Analysis interface.

This tab will expect to find the ass file generated in the previous tab. If Use Can is selected, it will also expect the assc, acsc and acc files. It will take the run number from the sample file, and geometry from the option you select.

Once run the corrected output and can correction is shown in the preview plot, the Spectrum spin box can be used to scroll through each spectrum.

Options

Input

Either a reduced file (_red.nxs) or workspace (_red) or an S(Q, ω) file (_sqw.nxs) or workspace (_sqw).

Geometry

Sets the sample geometry (this must match the sample shape used when running Calculate Corrections).

Use Can

If checked allows you to select a workspace for the container in the format of either a reduced file (_red.nxs) or workspace (_red) or an S(Q, ω) file (_sqw.nxs) or workspace (_sqw).

Corrections File

The output file (_Abs.nxs) or workspace group (_Abs) generated by Calculate Corrections.

Verbose

Enables outputting additional information to the Results Log.

Plot Output

Gives the option to create either a spectra or contour plot (or both) of the corrected workspace.

Save Result

If enabled the result will be saved as a NeXus file in the default save directory.

Interfaces Indirect