\(\renewcommand\AA{\unicode{x212B}}\)
Table of Contents
Name | Direction | Type | Default | Description |
---|---|---|---|---|
ReflectedBeamWorkspace | InOut | MatrixWorkspace | Mandatory | A reflected beam workspace. |
ReflectedForeground | Input | int list | Mandatory | A list of three workspace indices [start, beam centre, end] defining the reflected foreground. |
DirectLineWorkspace | InOut | MatrixWorkspace | Mandatory | A direct beam workspace. |
DirectForeground | Input | int list | Mandatory | A list of three workspace indices [start, beam centre, end] defining the direct foreground. |
PixelSize | Input | number | Mandatory | Detector pixel size, in meters. |
DetectorResolution | Input | number | Mandatory | Detector pixel resolution, in meters. |
FirstSlitName | Input | string | Mandatory | Name of the first slit component. |
FirstSlitSizeSampleLog | Input | string | Mandatory | The sample log entry for the first slit opening. |
SecondSlitName | Input | string | Mandatory | Name of the second slit component. |
SecondSlitSizeSampleLog | Input | string | Mandatory | The sample log entry for the second slit opening. |
This algorithm computes quantities needed by ReflectometryMomentumTransfer and ReflectometrySumInQ, and adds the results to the sample logs of ReflectedBeamWorkspace. The following sample logs get added:
beam_stats.beam_rms_variation
beam_stats.bent_sample
bean_stats.first_slit_angular_spread
beam_stats.incident_angular_spread
beam_stats.sample_waviness
beam_stats.second_slit_angular_spread
Additionally, beam_stats.beam_rms_variation
is cached to the sample logs of DirectLineWorkspace removing the need to recalculate the quantity every time the same direct beam passed to this algorithm.
Example - ReflectometryBeamStatistics
dir = Load('ILL/D17/317369.nxs')
ref = Load('ILL/D17/317370.nxs')
ReflectometryBeamStatistics(
ReflectedBeamWorkspace=ref,
ReflectedForeground=[199, 202, 205],
DirectLineWorkspace=dir,
DirectForeground=[200, 202, 205],
PixelSize=0.001195,
DetectorResolution=0.00022,
FirstSlitName='slit2',
FirstSlitSizeSampleLog='VirtualSlitAxis.s2w_actual_width',
SecondSlitName='slit3',
SecondSlitSizeSampleLog='VirtualSlitAxis.s3w_actual_width')
run = ref.run()
bent = run.getProperty('beam_stats.bent_sample').value
print('Bent sample? {}'.format('yes' if bent == 1 else 'no'))
rms = run.getProperty('beam_stats.beam_rms_variation').value
print('Beam RMS variation: {:.3}'.format(rms))
run = dir.run()
rms = run.getProperty('beam_stats.beam_rms_variation').value
print('RMS variation cached in dir: {:.3}'.format(rms))
Output:
Bent sample? no
Beam RMS variation: 0.00236
RMS variation cached in dir: 0.00208
Categories: AlgorithmIndex | ILL\Reflectometry | Reflectometry
C++ header: ReflectometryBeamStatistics.h (last modified: 2021-03-31)
C++ source: ReflectometryBeamStatistics.cpp (last modified: 2021-03-31)