Skip to content

Latest commit

 

History

History
43 lines (25 loc) · 867 Bytes

RemoveExpDecay-v1.rst

File metadata and controls

43 lines (25 loc) · 867 Bytes

Description

This algorithm removes the exponential time decay from a specified muon spectra. By default, all the spectra in a workspace will be corrected.

The formula for removing the exponential decay is given by:

$$NewData = (OldData\times{e^\frac{t}{\tau}})/N_0 - 1.0$$

where τ is the muon lifetime (2.197019e-6 seconds). N0 is a fitted normalisation constant.

Usage

Example - Removing exponential decay:

ExSimple

y = [100, 150, 50, 10, 5] x = [1,2,3,4,5,6] input = CreateWorkspace(x,y)

output = RemoveExpDecay(input)

print "Exp. decay removed:", ', '.join(['{:.3f}'.format(y) for y in output.readY(0)])

Output:

ExSimple

Exp. decay removed: -0.243, 0.791, -0.059, -0.703, -0.766