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
a880b9c1
Commit
a880b9c1
authored
9 years ago
by
Elliot Oram
Browse files
Options
Downloads
Patches
Plain Diff
Ammended delete statement for create output option
Refs #13985
parent
79e18e7a
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
+11
-8
11 additions, 8 deletions
...terface/plugins/algorithms/WorkflowAlgorithms/ResNorm2.py
with
11 additions
and
8 deletions
Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ResNorm2.py
+
11
−
8
View file @
a880b9c1
#pylint: disable=no-init
from
mantid.api
import
(
PythonAlgorithm
,
AlgorithmFactory
,
MatrixWorkspaceProperty
,
WorkspaceGroup
,
WorkspaceGroupProperty
,
ITableWorkspaceProperty
,
Progress
)
Progress
,
PropertyMode
)
from
mantid.kernel
import
Direction
from
mantid.simpleapi
import
*
...
...
@@ -54,8 +54,10 @@ class ResNorm(PythonAlgorithm):
self
.
declareProperty
(
WorkspaceGroupProperty
(
'
OutputWorkspace
'
,
''
,
direction
=
Direction
.
Output
),
doc
=
'
Fitted parameter output
'
)
self
.
declareProperty
(
ITableWorkspaceProperty
(
'
OutputWorkspaceTable
'
,
''
,
direction
=
Direction
.
Output
),
self
.
declareProperty
(
ITableWorkspaceProperty
(
'
OutputWorkspaceTable
'
,
''
,
optional
=
PropertyMode
.
Optional
,
direction
=
Direction
.
Output
),
doc
=
'
Table workspace of fit parameters
'
)
...
...
@@ -86,11 +88,12 @@ 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
):
from
IndirectCommon
import
getWSprefix
if
self
.
_create_output
:
self
.
_out_ws_table
=
self
.
getPropertyValue
(
'
OutputWorkspaceTable
'
)
# Process vanadium workspace
van_ws
=
ConvertSpectrumAxis
(
InputWorkspace
=
self
.
_van_ws
,
...
...
@@ -136,14 +139,14 @@ 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
)
prog_process
.
report
(
'
Deleting workspaces
'
)
if
not
self
.
_create_output
:
DeleteWorkspace
(
fit_params
)
if
self
.
_create_output
:
self
.
setProperty
(
'
OutputWorkspaceTable
'
,
fit_params
)
def
_process_res_ws
(
self
,
num_hist
):
"""
...
...
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