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
d76caffc
Commit
d76caffc
authored
9 years ago
by
Elliot Oram
Browse files
Options
Downloads
Patches
Plain Diff
Adapt algorithm to have an output for the table workspace
Refs #13985
parent
1d53d9b1
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ResNorm2.py
+8
-1
8 additions, 1 deletion
...terface/plugins/algorithms/WorkflowAlgorithms/ResNorm2.py
with
8 additions
and
1 deletion
Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ResNorm2.py
+
8
−
1
View file @
d76caffc
#pylint: disable=no-init
from
mantid.api
import
(
PythonAlgorithm
,
AlgorithmFactory
,
MatrixWorkspaceProperty
,
WorkspaceGroup
,
WorkspaceGroupProperty
,
Progress
)
WorkspaceGroup
,
WorkspaceGroupProperty
,
ITableWorkspaceProperty
,
Progress
)
from
mantid.kernel
import
Direction
from
mantid.simpleapi
import
*
...
...
@@ -13,6 +14,7 @@ class ResNorm(PythonAlgorithm):
_e_max
=
None
_create_output
=
None
_out_ws
=
None
_out_ws_table
=
None
def
category
(
self
):
...
...
@@ -52,6 +54,9 @@ class ResNorm(PythonAlgorithm):
self
.
declareProperty
(
WorkspaceGroupProperty
(
'
OutputWorkspace
'
,
''
,
direction
=
Direction
.
Output
),
doc
=
'
Fitted parameter output
'
)
self
.
declareProperty
(
ITableWorkspaceProperty
(
'
OutputWorkspaceTable
'
,
''
,
direction
=
Direction
.
Output
),
doc
=
'
Table workspace of fit parameters
'
)
def
validateInputs
(
self
):
...
...
@@ -81,6 +86,7 @@ class ResNorm(PythonAlgorithm):
self
.
_e_max
=
self
.
getProperty
(
'
EnergyMax
'
).
value
self
.
_create_output
=
self
.
getProperty
(
'
CreateOutput
'
).
value
self
.
_out_ws
=
self
.
getPropertyValue
(
'
OutputWorkspace
'
)
self
.
_out_ws_table
=
self
.
getPropertyValue
(
'
OutputWorkspaceTable
'
)
def
PyExec
(
self
):
...
...
@@ -130,6 +136,7 @@ class ResNorm(PythonAlgorithm):
GroupWorkspaces
(
InputWorkspaces
=
result_workspaces
,
OutputWorkspace
=
self
.
_out_ws
)
self
.
setProperty
(
'
OutputWorkspace
'
,
self
.
_out_ws
)
self
.
setProperty
(
'
OutputWorkspaceTable
'
,
fit_params
)
DeleteWorkspace
(
van_ws
)
DeleteWorkspace
(
padded_res_ws
)
...
...
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