Q1D v2¶
Summary¶
SANS 1D reduction. Converts a workspace in wavelength into a workspace of momentum transfer, assuming elastic scattering
See Also¶
Properties¶
Name |
Direction |
Type |
Default |
Description |
---|---|---|---|---|
DetBankWorkspace |
Input |
Mandatory |
Particle counts as a function of wavelength |
|
OutputWorkspace |
Output |
Mandatory |
Name of the workspace that will contain the result of the calculation |
|
OutputBinning |
Input |
dbl list |
Mandatory |
A comma separated list of first bin boundary, width, last bin boundary. Optionally this can be followed by a comma and more widths and last boundary pairs. Negative width values indicate logarithmic binning. |
PixelAdj |
Input |
Scaling to apply to each spectrum. Must have the same number of spectra as the DetBankWorkspace |
||
WavelengthAdj |
Input |
Scaling to apply to each bin. Must have the same number of bins as the DetBankWorkspace |
||
WavePixelAdj |
Input |
Scaling that depends on both pixel and wavelength together. Must have the same number of bins and spectra as the DetBankWorkspace. |
||
AccountForGravity |
Input |
boolean |
False |
Whether to correct for the effects of gravity |
SolidAngleWeighting |
Input |
boolean |
True |
If true, pixels will be weighted by their solid angle. |
RadiusCut |
Input |
number |
0 |
To increase resolution some wavelengths are excluded within this distance from the beam center (mm). Note that RadiusCut and WaveCut both need to be larger than 0 to affect the effective cutoff. See the algorithm description for a detailed explanation of the cutoff. |
WaveCut |
Input |
number |
0 |
To increase resolution by starting to remove some wavelengths below this threshold (angstrom). Note that WaveCut and RadiusCut both need to be larger than 0 to affect on the effective cutoff. See the algorithm description for a detailed explanation of the cutoff. |
OutputParts |
Input |
boolean |
False |
Set to true to output two additional workspaces which will have the names OutputWorkspace_sumOfCounts OutputWorkspace_sumOfNormFactors. The division of _sumOfCounts and _sumOfNormFactors equals the workspace returned by the property OutputWorkspace (default is false). |
ExtraLength |
Input |
number |
0 |
Additional length for gravity correction. |
QResolution |
Input |
Workspace to calculate the Q resolution. |
Description¶
Output unit¶
The unit of the output workspace is 1/cm. Assuming this algorithm is called with the appropriate input correction workspaces, include accounting for absolute scaling, the output is meant to represent a macroscopic cross section, hence the reason the output unit is 1/cm.
Q Unit Conversion¶
This section includes an explanation for the effect of setting
AccountForGravity
to true along with ExtraLength
.
The equation for
where
Including gravity this becomes:
where
The correction assumes that ExtraLength
property) can be included in the
numerator where
The value of
Normalizing the input workspace¶
This section describes the normalisation/scaling/correction of the input workspace using PixelAdj, WavelengthAdj and WavePixelAdj.
This algorithm takes as input a workspace of neutron counts against wavelength and creates a workspace of cross section against Q. The output Q bins boundaries are defined by setting the property OutputBinning.
Below is the formula used to calculate the cross section, here denoted

In the equation the number of counts in the input spectrum number is
denoted by
The wavelength dependent correction is supplied to the algorithm through the WavelengthAdj property and this workspace must have the same wavelength binning as the input workspace and should be equal to the following:
where
Normally there will be many spectra each from a different pixel with a
row number
where
Some corrections will be both pixel and wavelength dependent, for example an angle transmission correction. Such corrections can be taken into account by specifying WavePixelAdj.
Resolution and Cutoffs¶
There are two sources of uncertainty in the intensity: the statistical (counting) error and the finite size of the bins, i.e. both time bins and the spatial extent of the detectors (pixels). The first error is reducible by increasing the length of the experiment or bin sizes while the second reduces with smaller bin sizes. The first is represented by the errors on the output workspace but the second is not included in the error calculation although it increases uncertainties and degrades the effective resolution of the data none the less. This algorithm allows the resolution to be improved by removing the bins with the worst resolution.
Normally the bins that give the worst resolution are those near the beam
center and with short wavelengths. When the optional properties
The bin that contains the wavelength
From the equation it is possible to see that for pixels in
Practically, it is more likely to be necessary to implement
Examples¶
For an example of how Q1D is used see ISIS SANS data reduction.
References
R.P. Hjelm Jr. *J. Appl. Cryst.* (1988), 21, 618-628.
P.A. Seeger & R.P. Hjelm Jr. *J. Appl. Cryst.* (1991), 24, 467-478.
Variations on applying the normalization¶
It is possible to divide the input workspace by the WavelenghAdj and PixelAdj workspaces prior to calling this algorithm. The results will be same as if these workspaces were passed to Q1D instead when there are high numbers of particle counts. However, in this scheme the probabilities tend to converge on the true high count probabablities more slowly with increasing number of counts and so the result is less accuate.
Depending on the input and output bins there could be a significant difference in CPU time required by these two methods.
References¶
Calculation of Q is from Seeger, P. A. and Hjelm, R. P. Jr, “Small-Angle Neutron Scattering at Pulsed Spallation Sources” (1991) J. Appl 24 467-478
Previous Versions¶
Version 1¶
Before July 2011 the intensity was calculated with an equation like the following:
where G is the input workspace normally related to the raw counts workspace as:
That is the normalization was performed before the Q calculation which
gives the same probilities at high numbers of particles counts but
weighted noisy, low count data too highly, giving more noise in
The error was calculation did not include the errors due the normalization or any corrections.
Properties¶
Order |
Name |
Direction |
Type |
Default |
Description |
---|---|---|---|---|---|
1 |
InputWorkspace |
Input |
MatrixWorkspace |
Mandatory |
The (partly) corrected data in units of wavelength. |
2 |
InputForErrors |
Input |
MatrixWorkspace |
Mandatory |
The workspace containing the counts to use for the error calculation. Must also be in units of wavelength and have matching bins to the InputWorkspace. |
3 |
OutputWorkspace |
Output |
MatrixWorkspace |
Mandatory |
The workspace name under which to store the result histogram. |
4 |
OutputBinning |
Input |
String |
Mandatory |
The bin parameters to use for the final result (in the format used by the Rebin v1 algorithm). |
5 |
AccountForGravity |
Input |
Boolean |
False |
Whether to correct for the effects of gravity. |
Categories: AlgorithmIndex | SANS
Source¶
C++ header: Q1D2.h
C++ source: Q1D2.cpp