Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mantidproject
mantid
Commits
3327e2c7
Commit
3327e2c7
authored
10 years ago
by
Arturs Bekasovs
Browse files
Options
Downloads
Patches
Plain Diff
Refs #9568. RemoveExpDecay
parent
4d6af782
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Code/Mantid/Framework/Algorithms/src/RemoveExpDecay.cpp
+1
-1
1 addition, 1 deletion
Code/Mantid/Framework/Algorithms/src/RemoveExpDecay.cpp
Code/Mantid/docs/source/algorithms/RemoveExpDecay-v1.rst
+36
-1
36 additions, 1 deletion
Code/Mantid/docs/source/algorithms/RemoveExpDecay-v1.rst
with
37 additions
and
2 deletions
Code/Mantid/Framework/Algorithms/src/RemoveExpDecay.cpp
+
1
−
1
View file @
3327e2c7
...
@@ -33,7 +33,7 @@ void MuonRemoveExpDecay::init()
...
@@ -33,7 +33,7 @@ void MuonRemoveExpDecay::init()
declareProperty
(
new
API
::
WorkspaceProperty
<
API
::
MatrixWorkspace
>
(
"OutputWorkspace"
,
""
,
declareProperty
(
new
API
::
WorkspaceProperty
<
API
::
MatrixWorkspace
>
(
"OutputWorkspace"
,
""
,
Direction
::
Output
),
"The name of the output 2D workspace."
);
Direction
::
Output
),
"The name of the output 2D workspace."
);
std
::
vector
<
int
>
empty
;
std
::
vector
<
int
>
empty
;
declareProperty
(
new
Kernel
::
ArrayProperty
<
int
>
(
"Spectra"
,
empty
),
"The workspace ind
e
ces to remove the exponential decay from."
);
declareProperty
(
new
Kernel
::
ArrayProperty
<
int
>
(
"Spectra"
,
empty
),
"The workspace ind
i
ces to remove the exponential decay from."
);
}
}
/** Executes the algorithm
/** Executes the algorithm
...
...
This diff is collapsed.
Click to expand it.
Code/Mantid/docs/source/algorithms/RemoveExpDecay-v1.rst
+
36
−
1
View file @
3327e2c7
...
@@ -16,7 +16,42 @@ The formula for removing the exponential decay is given by:
...
@@ -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
.. 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.
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::
.. categories::
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment