SingleReadoutDeadTimeCorrection

Dead time is the time after an event that a detector is not able to detect another event. For a paralyzable detector, an event that happens during the dead time restarts the dead time. For a non-paralyzable detector, the event is simply lost and does not cause additional dead time.

Dead-time correction corrects for detector dead time by weighing the events according to:

\[N = M \frac{1}{(1-\mathrm{rate} \cdot (\frac{t_{\mathrm{dead}}}{t_{\mathrm{bin}}}))}\]

for non-paralyzable detectors and

\[N = M \frac{\mathrm{Re} (\mathrm{W}(-\mathrm{rate} \cdot (\frac{t_{\mathrm{dead}}}{t_{\mathrm{bin}}})) )}{\frac{\mathrm{rate}}{t_{\mathrm{bin}}}}\]

for paralyzable detectors, where

\(N\) = true count
\(M\) = measured count
\(t_{\mathrm{dead}}\) = dead time
\(t_{\mathrm{bin}}\) = TOF bin width
\(\mathrm{rate}\) = measured count rate
\(\mathrm{W}\) = Lambert W function

The class SingleReadoutDeadTimeCorrection is a Mantid-style algorithm for computing the dead-time correction for an event workspace. One can optionally include error events in the dead-time computation.

Properties

Name

Direction

Type

Default

Description

InputWorkspace

Input

EventWorkspace

Mandatory

Input workspace used to compute dead-time correction

InputErrorEventsWorkspace

Input

EventWorkspace

Input workspace with error events used to compute dead-time correction

DeadTime

Input

number

4.2

Dead time in microseconds

TOFStep

Input

number

100.0

TOF bins to compute dead-time correction, in microseconds

Paralyzable

Input

boolean

False

If True, paralyzable correction will be applied, non-paralyzable otherwise

TOFRange

Input

dbl list

[0.0, 0.0]

TOF range to use to compute dead-time correction

OutputWorkspace

Output

MatrixWorkspace

Mandatory

Output workspace containing the dead-time correction factor for each TOF bin

Usage

Example using SingleReadoutDeadTimeCorrection (requires Test Data files)

import mantid.simpleapi as api
import os
import sys
from pathlib import Path
from mr_reduction import dead_time_correction
from mr_reduction.mantid_algorithm_utils import mantid_algorithm_exec
# Load events
path = Path().resolve() / "test" / "data" / "quicknxs-data" / "REF_M_42112.nxs.h5"
path = path.as_posix()
ws = api.LoadEventNexus(Filename=path, OutputWorkspace="raw_events")
# Load error events
err_ws = api.LoadErrorEventsNexus(path)
# Compute dead-time correction
tof_min = ws.getTofMin()
tof_max = ws.getTofMax()
corr_ws = mantid_algorithm_exec(
    dead_time_correction.SingleReadoutDeadTimeCorrection,
    InputWorkspace=ws,
    InputErrorEventsWorkspace=err_ws,
    Paralyzable=False,
    DeadTime=4.2,
    TOFStep=100.0,
    TOFRange=[tof_min, tof_max],
    OutputWorkspace="corr",
)
# Apply dead-time correction
ws = api.Multiply(ws, corr_ws, OutputWorkspace=str(ws))