$$\renewcommand\AA{\unicode{x212B}}$$

## Summary¶

Apply deadtime correction to each spectrum of a workspace.

## Properties¶

Name

Direction

Type

Default

Description

InputWorkspace

Input

MatrixWorkspace

Mandatory

The name of the input workspace containing measured counts

Input

TableWorkspace

Mandatory

Name of the Dead Time Table

OutputWorkspace

Output

MatrixWorkspace

Mandatory

The name of the output workspace containing corrected counts

## Description¶

Assuming that the InputWorkspace contains measured counts as a function of time, the algorithm returns a workspace containing true counts as a function of the same time binning according to

$N = \frac{M}{(1-M*(\frac{t_{\mathrm{dead}}}{t_{\mathrm{bin}}*F}))}$

where

$$N$$ = true count
$$M$$ = measured count
$$t_{\mathrm{dead}}$$ = dead-time
$$t_{\mathrm{bin}}$$ = time bin width
$$F$$ = number of good frames

DeadTimeTable is expected to have 2 columns:

1. Integer type, containing spectrum number (not index)

2. Double type, containing $$t_{\mathrm{dead}}$$ value of the spectrum

It is assumed that all bins in the InputWorkspace are the same size (to within reasonable rounding error). If they are not, the algorithm will exit with an error.

The InputWorkspace must contain a sample log goodfrm (number of good frames) for the algorithm to run successfully.

## Usage¶

Note

Example - Applying the correction using custom dead times:

# Load single period of a MUSR run

# Remove uninteresting bins
input = CropWorkspace('input', XMin=0.55, XMax=12)

# Create a table with some arbitrary dead times

for i in range(1,65):

original = Integration('input')
corrected = Integration('output')

format_str = 'Spectrum: {0:d}; original: {1:.3f}; corrected: {2:.3f}'

for s in [0,32,63]:


Output:

Spectrum: 0; original: 6643.000; corrected: 7100.833
Spectrum: 32; original: 10384.000; corrected: 11559.134
Spectrum: 63; original: 8875.000; corrected: 9724.937


Example - Applying the correction using dead times stored in the Nexus file:

# Load a MUSR run

# Remove uninteresting bins
input = CropWorkspace('input', XMin=0.55, XMax=12)

original = Integration(input.getItem(0))
corrected = Integration(output.getItem(0))

format_str = 'Spectrum: {0:d}; original: {1:.3f}; corrected: {2:.3f}'

for s in [0,32,63]:


Output:

Spectrum: 0; original: 6643.000; corrected: 6697.453
Spectrum: 32; original: 10384.000; corrected: 10520.529
Spectrum: 63; original: 8875.000; corrected: 8969.891