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

VesuvioL1ThetaResolution v1

../_images/VesuvioL1ThetaResolution-v1_dlg.png

VesuvioL1ThetaResolution dialog.

Summary

Calculates resolution of l1 and theta

Properties

Name Direction Type Default Description
PARFile Input string   PAR file containing calibrated detector positions. Allowed extensions: [‘.par’, ‘.dat’]
SampleWidth Input number 3 With of sample in cm.
SpectrumMin Input number 3 Index of minimum spectrum
SpectrumMax Input number 198 Index of maximum spectrum
NumEvents Input number 1000000 Number of scattering events
Seed Input number 123456789 Seed for random number generator
L1BinWidth Input number 0.05 Bin width for L1 distribution.
ThetaBinWidth Input number 0.05 Bin width for theta distribution.
OutputWorkspace Output MatrixWorkspace Mandatory Output workspace containing mean and standard deviation of resolution per detector.
L1Distribution Output MatrixWorkspace   Distribution of lengths of the final flight path.
ThetaDistribution Output MatrixWorkspace   Distribution of scattering angles.

Description

This algorithm calculates the resolution of the scattering angle (theta) and final flight path (L1) for a VESUVIO calibration provided by a PAR file.

The calculation is performed using a Monte Carlo simulation that simulates the path of a neutron between a random point on the face of the sample to a random point on the face of each detector.

Usage

Example - VesuvioL1ThetaResolution

resolution, l1_dist, theta_dist = VesuvioL1ThetaResolution(NumEvents=1000)

resolution_spec_names = resolution.getAxis(1).extractValues()
print("Resolution spectra: %s" % (', '.join(resolution_spec_names)))

print("L1 distribution spectra count: %d" % (l1_dist.getNumberHistograms()))
print("Theta distribution spectra count: %d" % (theta_dist.getNumberHistograms()))

Output:

Resolution spectra: l1_Mean, l1_StdDev, theta_Mean, theta_StdDev
L1 distribution spectra count: 196
Theta distribution spectra count: 196

Categories: AlgorithmIndex | CorrectionFunctions\SpecialCorrections

Source

C++ header: VesuvioL1ThetaResolution.h (last modified: 2021-03-31)

C++ source: VesuvioL1ThetaResolution.cpp (last modified: 2021-05-24)