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
a889a2ef
Commit
a889a2ef
authored
10 years ago
by
Dan Nixon
Browse files
Options
Downloads
Patches
Plain Diff
Fix JumpFit usage example test
Refs #11083
parent
ddbe3037
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/PythonInterface/plugins/algorithms/WorkflowAlgorithms/JumpFit.py
+6
-0
6 additions, 0 deletions
...nterface/plugins/algorithms/WorkflowAlgorithms/JumpFit.py
Code/Mantid/docs/source/algorithms/JumpFit-v1.rst
+8
-7
8 additions, 7 deletions
Code/Mantid/docs/source/algorithms/JumpFit-v1.rst
with
14 additions
and
7 deletions
Code/Mantid/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/JumpFit.py
+
6
−
0
View file @
a889a2ef
...
@@ -108,7 +108,13 @@ class JumpFit(PythonAlgorithm):
...
@@ -108,7 +108,13 @@ class JumpFit(PythonAlgorithm):
# Run fit function
# Run fit function
if
self
.
_out_name
is
""
:
if
self
.
_out_name
is
""
:
# Find the last underscore
ws_suffix_index
=
self
.
_in_ws
.
rfind
(
'
_
'
)
ws_suffix_index
=
self
.
_in_ws
.
rfind
(
'
_
'
)
if
ws_suffix_index
==
-
1
:
# Use the entire string if underscore not found
ws_suffix_index
=
len
(
self
.
_in_ws
)
self
.
_out_name
=
self
.
_in_ws
[:
ws_suffix_index
]
+
'
_
'
+
self
.
_jump_function
+
'
_fit
'
self
.
_out_name
=
self
.
_in_ws
[:
ws_suffix_index
]
+
'
_
'
+
self
.
_jump_function
+
'
_fit
'
Fit
(
Function
=
function
,
InputWorkspace
=
spectrum_ws
,
CreateOutput
=
True
,
Output
=
self
.
_out_name
,
Fit
(
Function
=
function
,
InputWorkspace
=
spectrum_ws
,
CreateOutput
=
True
,
Output
=
self
.
_out_name
,
...
...
This diff is collapsed.
Click to expand it.
Code/Mantid/docs/source/algorithms/JumpFit-v1.rst
+
8
−
7
View file @
a889a2ef
...
@@ -20,25 +20,26 @@ of 4 models (the fit function used is given in brackets):
...
@@ -20,25 +20,26 @@ of 4 models (the fit function used is given in brackets):
Usage
Usage
-----
-----
**Example - Chudley-Elliot
t
fit**
**Example - Chudley-Elliot fit**
.. testcode:: exChudleyElliot
t
Fit
.. testcode:: exChudleyElliotFit
data = Load(Filename='irs26176_graphite002_conv_2LFixF_s0_to_9_Result.nxs')
data = Load(Filename='irs26176_graphite002_conv_2LFixF_s0_to_9_Result.nxs')
JumpFit(InputWorkspace=data,
JumpFit(InputWorkspace=data,
FUnction='ChudleyElliot',
QMin=0.6,
QMin=0.6,
QMax=1.8)
QMax=1.8)
fit = mtd['
irs26176_graphite002_conv_2LFixF_s0_to_9
_ChudleyElliot_fit_Workspace']
fit = mtd['
data
_ChudleyElliot_fit_Workspace']
params = mtd['
irs26176_graphite002_conv_2LFixF_s0_to_9
_ChudleyElliot_fit_Parameters']
params = mtd['
data
_ChudleyElliot_fit_Parameters']
print 'Fit parameters: %s' % params.column(0)
print 'Fit parameters: %s' %
', '.join(
params.column(0)
)
**Output:**
**Output:**
.. testoutput:: exChudleyElliot
t
Fit
.. testoutput:: exChudleyElliotFit
Tau, L, Cost function value
Fit parameters:
Tau, L, Cost function value
.. 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