\(\renewcommand\AA{\unicode{x212B}}\)
Table of Contents
Separates magnetic, nuclear coherent, and incoherent components for diffraction and spectroscopy data,and corrects the sample data for detector efficiency and normalises it to the chosen standard.
Name | Direction | Type | Default | Description |
---|---|---|---|---|
InputWorkspace | Input | WorkspaceGroup | Mandatory | The input workspace with spin-flip and non-spin-flip data. |
RotatedXYZWorkspace | Input | WorkspaceGroup | The workspace used in 10p method when data is taken as two XYZ measurements rotated by 45 degress. | |
OutputWorkspace | Output | WorkspaceGroup | The output workspace. | |
CrossSectionSeparationMethod | Input | string | None | What type of cross-section separation to perform. Allowed values: [‘None’, ‘Z’, ‘XYZ’, ‘10p’] |
OutputUnits | Input | string | Default | The choice to display the output as a function of detector twoTheta, the momentum exchange, the 2D momentum exchange, or as a function of momentum and energy exchange. Default will provide output appropriate to the technique used. Allowed values: [‘Default’, ‘TwoTheta’, ‘Q’, ‘Qxy’, ‘Qw’, ‘Input’] |
NormalisationMethod | Input | string | None | Method to correct detector efficiency and normalise data. Allowed values: [‘None’, ‘Vanadium’, ‘Incoherent’, ‘Paramagnetic’] |
OutputTreatment | Input | string | Individual | Which treatment of the provided scan should be used to create output. Allowed values: [‘Individual’, ‘Merge’] |
MeasurementTechnique | Input | string | Powder | What type of measurement technique has been used to collect the data. Allowed values: [‘Powder’, ‘SingleCrystal’, ‘TOF’] |
SampleAndEnvironmentProperties | Input | Dictionary | null | Dictionary for the information about sample and its environment. |
ScatteringAngleBinSize | Input | number | 0.5 | Scattering angle bin size in degrees used for expressing scan data on a single TwoTheta axis. |
VanadiumInputWorkspace | Input | WorkspaceGroup | The name of the vanadium workspace. | |
QBinning | Input | dbl list | Manual Q-binning parameters. | |
AbsoluteUnitsNormalisation | Input | boolean | True | Whether or not express the output in absolute units. |
IsotropicMagnetism | Input | boolean | True | Whether the paramagnetism is isotropic (Steward, Ehlers) or anisotropic (Schweika). |
ClearCache | Input | boolean | True | Whether or not to delete intermediate workspaces. |
DebugMode | Input | boolean | False | Whether to create and show all intermediate workspaces at each correction step. |
This is the algorithm that performs cross-section separation and allows for sample data normalisation to absolute scale. The cross-section separation provides information about magnetic, nuclear coherent, and spin-incoherent contributions to the measured cross-section. The absolute scale normalisation uses either the output from cross-section separation or a vanadium reference sample for polarised diffraction and spectroscopy data measured by D7 instrument at the ILL.
Three types of cross-section separation are supported: Z, XYZ, and 10p, for which 2, 6, and 10 distributions with spin-flip and non-spin-flip cross-sections are required. In addition, the XYZ cross-section separation can be executed either assuming isotropic magnetism, such as in Ref. [3], or when the magnetism cannot be assumed to be isotropic, for example in single crystals, as described in Ref. [4]. Which set of equations is used is controlled by setting IsotropicMagnetism to either True or False. The expected input for the cross-section separation is a workspace group containing spin-flip and non-spin-flip cross-sections, with the following order of axis directions: Z, Y, X, X-Y, X+Y. This step can be skipped by setting CrossSectionSeparationMethod parameter to ‘None’.
Three ways of sample data normalisation are supported: Vanadium, Paramagnetic, and Incoherent, for which either the output from vanadium data reduction, or from the cross-section separation (magnetic and spin-incoherent respectively) is used. This step can also be skipped by setting NormalisationMethod parameter to ‘None’.
MeasurementTechnique property allows to distinguish between data reduced as Powder, SingleCrystal, or TOF by PolDiffILLReduction. Paramagnetic and Incoherent data normalisation approaches are not possible when the was data reduced in the TOF mode.
The choice for the output units are set with OutputUnits property. The options are: TwoTheta, Q, Qxy, Qw, Default, and Input. The first two are the most relevant for Powder measurement technique. Single crystal data would be best shown on the Qx - Qy plane, which can be achieved by setting OutputUnit to Qxy. The TOF-mode specific output unit is Qw, which allows to obtain data on the momentum exchange (Q) - energy exchange plane (w, which stands for \(\omega\)). The Input setting allows for preserving the input unit without undergoing any conversions, which can be useful when trying to find a source of issue in the reduction. The Default mode will show the most relevant output, depending on the technique. It will be equivalent to Q option for Powder data, Qxy for single crystal, and in the TOF mode, it will be a group of data as a function of spectrum number versus energy exchange (equivalent to Input in TOF), \(2\theta\) versus energy exchange, and \(S (Q, \omega)\) distribution (as in Qw).
For the TOF-mode, it is possible to provide user-defined binning for the momentum-exchange axis, used by SofQWNormalisedPolygon algorithm. If this property is not defined, the algorithm will automatically provide non-equidistant binning that is suitable for the data distribution.
This algorithm is indended to be invoked on sample data that is fully corrected and needs to be normalised to an appropriate scale.
This property is a dictionary containing all of the information about the sample and its environment, in the same fashion as in PolDiffILLReduction. This information is used for proper normalisation of the given sample.
The following keys need to be defined:
Keys required when the MeasurementTechnique is SingleCrystal:
Optional keys when the MeasurementTechnique is SingleCrystal:
nQ allows the user to decide how many bins should the Q_{x} and Q_{y} axes be split into, 80 by default. fld is used to decide whether to expand the distribution symmetrically to the negative side of Q_{x} and Q_{y} axes, equal to 1 (True) by default.
Below are presented formulae used to separate magnetic (M), nuclear coherent (N), and spin-incoherent (I) cross-sections using spin-flip \(\left(\frac{d\sigma}{d\Omega}\right)_{\text{sf}}\) and non-spin-flip \(\left(\frac{d\sigma}{d\Omega}\right)_{\text{nsf}}\) cross-sections from the provided input WorkspaceGroup.
At least two separate measurements along the same axis with opposite spin orientations are needed for this method to work. Usually, the measured axis is the ‘Z’ axis that is colinear with the beam axis, thus the spin-flip and non-spin-flip cross-sections are measured along the longitudinal axis. This method does not allow for separation of magnetic cross-section.
In this case, the magnetic cross-section cannot be separated from data.
This method is an expansion of the Z method, that requires measurements of spin-flip and non-spin-flip cross-sections along three orthogonal axes. This method allows for separation of magnetic cross-section from nuclear coherent and spin-incoherent.
The following set of equations applies to the isotropic magnetism case, such as in powder samples, and are based on Ref. [2] and [3].
The equations below apply to the case of anisotropic magnetism, such as in single crystals, and are based on Ref. [4]. The total cross-section is calculated the same way in both cases.
where \(\alpha\) is the Sharpf angle, which for elastic scattering is equal to half of the (signed) in-plane scattering angle and \(\theta_{0}\) is an experimentally fixed offset (see more in Ref. [1]).
The 10-point method is an expansion of the XYZ method, that requires measurements of spin-flip and non-spin-flip cross-sections along three orthogonal axes as in the XYZ and two additional axes that are rotated by 45 degrees around the Z axis, labelled ‘x-y’ and ‘x+y’. Similarly to the XYZ method, it is possible to separate magnetic cross-section from nuclear coherent and spin-incoherent ones, and additionally the method offers a possibility to separate the magnetic cross-section and the term dependent on azimuthal angle.
where \(\alpha\) is the Sharpf angle, which for elastic scattering is equal to half of the (signed) in-plane scattering angle and \(\theta_{0}\) is an experimentally fixed offset (see more in Ref. [1]).
where \(c_{0} = \text{cos}^{2} \alpha\) and \(c_{4} = \text{cos}^{2} (\alpha - \frac{\pi}{4})\)
The sample data normalisation is the final step of data reduction of D7 sample, and allows to simultaneously correct for detector efficiency and set the output to the absolute scale.
There are three options for the normalisation; it uses either the input from a reference sample with a well-known cross-section, namely vanadium, or the output from the cross-section separation, either magnetic or spin-incoherent cross-sections. A relative normalisation of the sample workspace to the detector with the highest counts is always performed.
where I is the sample intensity distribution corrected for all effects, and D is the normalisation factor.
If the data is to be expressed in absolute units, the normalisation factor is the reduced vanadium data, normalised by the number of moles of the sample material \(N_{S}\):
If data is not to be expressed in absolute units, the normalisation factor depends only on the vanadium input:
This normalisation is not valid for TOF data, and requires input from XYZ or 10-point cross-section separation. The paramagnetic measurement does not need to have background subtracted, as the background is self-subtracted in an XYZ measurement.
where \(\gamma\) is the neutron gyromagnetic ratio, \(r_{0}\) is the electron’s classical radius, and S is the spin of the sample.
Similarly to the paramagnetic normalisation, it is also not valid for TOF data, and requires input from XYZ or 10-point cross-section separation. This normalisation assumes that the spin-incoherent contribution is isotropic and flat in \(Q\).
The data can be put on absolute scale if the nuclear-spin-incoherent (NSI) cross-section for the sample is known, then:
If only the detector efficiency is to be corrected, then it is sufficient to use only the nuclear-spin-incoherent cross-section input:
Note
To run these usage examples please first download the usage data, and add these to your path. In Mantid this is done using Manage User Directories.
Example - D7AbsoluteCrossSections - XYZ cross-section separation of vanadium data
sampleProperties = {'SampleMass': 2.932, 'FormulaUnitMass': 50.942}
Load('ILL/D7/vanadium_xyz.nxs', OutputWorkspace='vanadium_xyz') # loads already reduced data
D7AbsoluteCrossSections(
InputWorkspace='vanadium_xyz',
CrossSectionSeparationMethod='XYZ',
SampleAndEnvironmentProperties=sampleProperties,
OutputTreatment='Merge',
OutputWorkspace='xyz',
OutputUnits='TwoTheta')
print("Number of separated cross-sections: {}".format(mtd['xyz'].getNumberOfEntries()))
Integration(InputWorkspace=mtd['xyz'][1], OutputWorkspace='sum_coherent')
Integration(InputWorkspace=mtd['xyz'][2], OutputWorkspace='sum_incoherent')
Divide(LHSWorkspace='sum_incoherent', RHSWorkspace='sum_coherent', OutputWorkspace='ratio')
print("Ratio of spin-incoherent to nuclear coherent cross-sections measured for vanadium is equal to: {0:.0f}".format(mtd['ratio'].readY(0)[0]))
Output:
Number of separated cross-sections: 6
Ratio of spin-incoherent to nuclear coherent cross-sections measured for vanadium is equal to: 170
Example - D7AbsoluteCrossSections - Sample normalisation to vanadium data
sampleProperties = {'SampleMass': 2.932, 'FormulaUnitMass': 182.54}
Load('ILL/D7/396993_reduced.nxs', OutputWorkspace='vanadium_input')
GroupWorkspaces(InputWorkspaces='vanadium_input', OutputWorkspace='vanadium_data')
Load('ILL/D7/397004_reduced.nxs', OutputWorkspace='sample_data')
D7AbsoluteCrossSections(InputWorkspace='sample_data', OutputWorkspace='normalised_sample_vanadium',
CrossSectionSeparationMethod='XYZ', NormalisationMethod='Vanadium',
SampleAndEnvironmentProperties=sampleProperties,
VanadiumInputWorkspace='vanadium_data', AbsoluteUnitsNormalisation=False)
print("The number of entries in the normalised data is: {}".format(mtd['normalised_sample_vanadium'].getNumberOfEntries()))
Output:
The number of entries in the normalised data is: 6
Example - D7D7AbsoluteCrossSections - Sample normalisation to paramagnetic cross-section
sampleProperties = {'SampleMass': 2.932, 'FormulaUnitMass': 182.54, 'SampleSpin':0.5}
Load('ILL/D7/397004_reduced.nxs', OutputWorkspace='sample_data')
D7AbsoluteCrossSections(InputWorkspace='sample_data', OutputWorkspace='normalised_sample_magnetic',
CrossSectionSeparationMethod='XYZ', NormalisationMethod='Paramagnetic',
SampleAndEnvironmentProperties=sampleProperties, AbsoluteUnitsNormalisation=False)
print("The number of entries in the normalised data is: {}".format(mtd['normalised_sample_magnetic'].getNumberOfEntries()))
Output:
The number of entries in the normalised data is: 6
Example - D7D7AbsoluteCrossSections - Single crystal sample XYZ cross-section separation
sampleProperties = {'SampleMass': 2.932, 'FormulaUnitMass': 182.54, 'OmegaShift': 0.0, 'KiXAngle': 45.0}
Load('ILL/D7/399870_400288_by_25.nxs', OutputWorkspace='sample_data')
D7AbsoluteCrossSections(
InputWorkspace='sample_data',
OutputWorkspace='sample_data_qxy',
CrossSectionSeparationMethod='XYZ',
NormalisationMethod='None',
OutputUnits='Qxy',
SampleAndEnvironmentProperties=sampleProperties,
AbsoluteUnitsNormalisation=False,
IsotropicMagnetism=True,
MeasurementTechnique='SingleCrystal',
ClearCache=True
)
print("The number of entries in the output data is: {}".format(mtd['sample_data_qxy'].getNumberOfEntries()))
Output:
The number of entries in the output data is: 6
Example - D7D7AbsoluteCrossSections - Time-of-flight measurement with Z-only cross-section separation
sample_dictionary_H2O = {'SampleMass':0.874, 'FormulaUnitMass':18.0, 'SampleChemicalFormula':'H2O'}
Load('ILL/D7/395639_reduced.nxs', OutputWorkspace='h2O_ws')
D7AbsoluteCrossSections(
InputWorkspace='h2O_ws',
OutputWorkspace='h2O_reduced',
CrossSectionSeparationMethod='Z',
NormalisationMethod='None',
OutputUnits='Default',
SampleAndEnvironmentProperties=sample_dictionary_H2O,
AbsoluteUnitsNormalisation=True,
MeasurementTechnique='TOF',
ClearCache=True,
QBinning='-5,0.04,1.5'
)
print("The number of entries in the output data is: {}".format(mtd['h2O_reduced'].getNumberOfEntries()))
Output:
The number of entries in the output data is: 9
[1] | (1, 2) Scharpf, O. and Capellmann, H. The XYZ‐Difference Method with Polarized Neutrons and the Separation of Coherent, Spin Incoherent, and Magnetic Scattering Cross Sections in a Multidetector Physica Status Solidi (A) 135 (1993) 359-379 doi: 10.1002/pssa.2211350204 |
[2] | Stewart, J. R. and Deen, P. P. and Andersen, K. H. and Schober, H. and Barthelemy, J.-F. and Hillier, J. M. and Murani, A. P. and Hayes, T. and Lindenau, B. Disordered materials studied using neutron polarization analysis on the multi-detector spectrometer, D7 Journal of Applied Crystallography 42 (2009) 69-84 doi: 10.1107/S0021889808039162 |
[3] | (1, 2) Ehlers G., Stewart J. R., Wildes A. R., Deen P. P., and Andersen K. H. Generalization of the classical xyz-polarization analysis technique to out-of-plane and inelastic scattering Review of Scientific Instruments 84 (2013), 093901 doi: 10.1063/1.4819739 |
[4] | (1, 2) Schweika W. XYZ-polarisation analysis of diffuse magnetic neutron scattering from single crystals J. Phys.: Conf. Ser. 211 (2010) 012026 doi: 10.1088/1742-6596/211/1/012026 |
Categories: AlgorithmIndex | ILL\Diffraction
Python: D7AbsoluteCrossSections.py