Table of Contents
Name | Direction | Type | Default | Description |
---|---|---|---|---|
InputWorkspace | Input | EventWorkspace | Mandatory | An input workspace. |
OutputWorkspace | Output | EventWorkspace | An output workspace. | |
TimingOffset | Input | number | Mandatory | Correlation chopper TDC timing offset in nanoseconds. |
The algorithm calculates the elastic signal for the Corelli diffractometer. This is done by calculating the cross-correlation with the correlation chopper. The correlation chopper modulates the incident neutron beam with a pseudo-random sequence. The calculated signal is applied the each event in the form of a weight.
The weights that the events are scaled by are for transparent and for absorbing, where is the duty cycle ().
The algorithm requires the timing offset of the TDC signal from the correlation chopper to run. The timing offset is dependent on the frequency of the chopper and should not change if the frequency has not changed.
Example - CorelliCrossCorrelate
# Load a Corelli data file.
ws = Load('CORELLI_2100')
# You will need to load the instrument if the one in the NeXus file doesn't contain the chopper sequence.
LoadInstrument(ws, InstrumentName='CORELLI', RewriteSpectraMap=False)
# Run the cross-correlation. This is using a TDC timing offset of 56000ns.
wsOut = CorelliCrossCorrelate(ws, 56000)
print 'The detector 172305 has ' + str(ws.getSpectrum(172305).getNumberEvents()) + ' events.'
print 'The event weights before cross-correlation are ' + str(ws.getSpectrum(172305).getWeights())
print 'The event weights after cross-correlation are ' + str(wsOut.getSpectrum(172305).getWeights())
Output:
The detector 172305 has 3 events.
The event weights before cross-correlation are [ 1. 1. 1.]
The event weights after cross-correlation are [-0.99391854 1. 1. ]
Categories: Algorithms | Diffraction\Calibration | Events