diff --git a/Code/Mantid/Framework/Algorithms/src/RemoveExpDecay.cpp b/Code/Mantid/Framework/Algorithms/src/RemoveExpDecay.cpp index fed9f4e43d067627bd00bf696c3bc60fe2e41fa2..b1fd93b0ac90289289b69d1a45b55091dab151da 100644 --- a/Code/Mantid/Framework/Algorithms/src/RemoveExpDecay.cpp +++ b/Code/Mantid/Framework/Algorithms/src/RemoveExpDecay.cpp @@ -33,7 +33,7 @@ void MuonRemoveExpDecay::init() declareProperty(new API::WorkspaceProperty<API::MatrixWorkspace>("OutputWorkspace", "", Direction::Output), "The name of the output 2D workspace."); std::vector<int> empty; - declareProperty(new Kernel::ArrayProperty<int>("Spectra", empty), "The workspace indeces to remove the exponential decay from."); + declareProperty(new Kernel::ArrayProperty<int>("Spectra", empty), "The workspace indices to remove the exponential decay from."); } /** Executes the algorithm diff --git a/Code/Mantid/docs/source/algorithms/RemoveExpDecay-v1.rst b/Code/Mantid/docs/source/algorithms/RemoveExpDecay-v1.rst index 749c0255c773b2df111a22291072632f07dd5b7a..05dbb641e3ac5ac9a5aad8c05fe8a011e3aa01d1 100644 --- a/Code/Mantid/docs/source/algorithms/RemoveExpDecay-v1.rst +++ b/Code/Mantid/docs/source/algorithms/RemoveExpDecay-v1.rst @@ -16,7 +16,42 @@ The formula for removing the exponential decay is given by: .. math:: NewData = (OldData\times{e^\frac{t}{\tau}})/N_0 - 1.0 -where Ï„ is the muon lifetime (2.197019e-6 seconds). :math:`N_0` is a +where :math:`\tau` is the muon lifetime (2.197019e-6 seconds). :math:`N_0` is a fitted normalisation constant. +Usage +----- + +.. include:: ../usagedata-note.txt + +**Example - Removing exponential decay from a MUSR run:** + +.. testcode:: ExMUSR + + # Load first period of a MUSR run + input = LoadMuonNexus('MUSR0015189.nxs', EntryNumber=1) + + # Remove uninteresting bins + input = CropWorkspace('input', XMin=0.55, XMax=12) + + # Remove exp. decay + output = RemoveExpDecay('input') + + # Bins to compare + bins_to_compare = [0, 150, 300, 450, 600] + + # Get values before&after and format them as strings for output + init_values = ["{:.3f}".format(input.readY(0)[bin]) for bin in bins_to_compare] + exp_dec_removed = ["{:.3f}".format(output.readY(0)[bin]) for bin in bins_to_compare] + + print "Initial values", ", ".join(init_values) + print "Exp. decay removed:", ", ".join(exp_dec_removed) + +Output: + +.. testoutput:: ExMUSR + + Initial values 49.000, 17.000, 2.000, 3.000, 0.000 + Exp. decay removed: 0.090, 0.127, -0.605, 0.768, -0.824 + .. categories::