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

CalMuonDeadTime v1

Summary

Calculate Muon deadtime for each spectra in a workspace.

See Also

ApplyDeadTimeCorr

Properties

Name

Direction

Type

Default

Description

InputWorkspace

Input

MatrixWorkspace

Mandatory

Name of the input workspace

DeadTimeTable

Output

TableWorkspace

Mandatory

The name of the TableWorkspace in which to store the list of deadtimes for each spectrum

FirstGoodData

Input

number

0.5

The first good data point in units of micro-seconds as measured from time zero (default to 0.5)

LastGoodData

Input

number

5

The last good data point in units of micro-seconds as measured from time zero (default to 5.0)

DataFitted

Output

Workspace

Mandatory

The data which the deadtime equation is fitted to

Description

Calculate muon deadtime for each spectra in a workspace, by fitting the DataFitted to the function detailed below between the times FirstGoodData and LastGoodData. Using the equation from ApplyDeadTimeCorr v1 and \(N(t) = N_0 {\rm exp} (- t / \tau)\) results in;

\[M(t)\exp \left( \frac{t}{\tau} \right)=N_0 - M(t)*N_0*\left(\frac{t_{\mathrm{dead}}}{t_{\mathrm{bin}}*F}\right)\]

where,

\({\displaystyle{N}(t)}\) = true count (unused) as a function of time \(t\)
\({\displaystyle{N_0}}\) = true count at time zero
\({\displaystyle{M}(t)}\) = measured count
\({\displaystyle{t_{\mathrm{dead}}}}\) = deadtime (fitted)
\({\displaystyle{t_{\mathrm{bin}}}}\) = time bin width
\({\displaystyle{\tau}}\) = Muon lifetime
\({\displaystyle{F}}\) = Number of good frames

Then, \(t_{\rm dead}\) is found by fitting to the straight line \(\displaystyle{M\exp ( t/\tau)}\) vs \({\displaystyle{M}}\), with intercept \({\displaystyle{N_0}}\) and slope \({\displaystyle{N_0*\left(\frac{t_{\mathrm{dead}}}{t_{\mathrm{bin}}*F}\right)}}\).

The number of good frames is obtained from the sample log goodfrm in the input workspace. This log must be present for the algorithm to run successfully.

Usage

Note

To run these usage examples please first download the usage data, and add these to your path. In Mantid this is done using Manage User Directories.

Example - Calculating dead times for a file

ws = Load("MUSR00015189")
#CalMuonDeadTime outputs two workspaces so catch them both
(wsOut,wsFitted) = CalMuonDeadTime('ws_1')

print("First five dead times:")
for i in range(5):
    print("  Spectrum {} -> {:.4f}".format(wsOut.column(0)[i], wsOut.column(1)[i]))

Output:

First five dead times:
  Spectrum 1 -> -0.3135
  Spectrum 2 -> -0.2902
  Spectrum 3 -> -0.2746
  Spectrum 4 -> -0.3151
  Spectrum 5 -> -0.5266

Categories: AlgorithmIndex | Muon

Source

C++ header: CalMuonDeadTime.h

C++ source: CalMuonDeadTime.cpp