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
5dc8d231
Commit
5dc8d231
authored
9 years ago
by
Elliot Oram
Browse files
Options
Downloads
Patches
Plain Diff
Added progress tracking to ISIS Energy Transfer
Refs #13974
parent
96df753c
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/ISISIndirectEnergyTransfer.py
+11
-0
11 additions, 0 deletions
...gorithms/WorkflowAlgorithms/ISISIndirectEnergyTransfer.py
with
11 additions
and
0 deletions
Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ISISIndirectEnergyTransfer.py
+
11
−
0
View file @
5dc8d231
...
@@ -138,14 +138,19 @@ class ISISIndirectEnergyTransfer(DataProcessorAlgorithm):
...
@@ -138,14 +138,19 @@ class ISISIndirectEnergyTransfer(DataProcessorAlgorithm):
plot_reduction
)
plot_reduction
)
self
.
_setup
()
self
.
_setup
()
load_prog
=
Progress
(
self
,
start
=
0.0
,
end
=
0.10
,
nreports
=
2
)
load_prog
.
report
(
'
loading files
'
)
self
.
_workspace_names
,
self
.
_chopped_data
=
load_files
(
self
.
_data_files
,
self
.
_workspace_names
,
self
.
_chopped_data
=
load_files
(
self
.
_data_files
,
self
.
_ipf_filename
,
self
.
_ipf_filename
,
self
.
_spectra_range
[
0
],
self
.
_spectra_range
[
0
],
self
.
_spectra_range
[
1
],
self
.
_spectra_range
[
1
],
self
.
_sum_files
,
self
.
_sum_files
,
self
.
_load_logs
)
self
.
_load_logs
)
load_prog
.
report
(
'
files loaded
'
)
process_prog
=
Progress
(
self
,
start
=
0.1
,
end
=
0.9
,
nreports
=
len
(
self
.
_workspace_names
))
for
c_ws_name
in
self
.
_workspace_names
:
for
c_ws_name
in
self
.
_workspace_names
:
process_prog
.
report
(
'
processing workspace
'
+
c_ws_name
)
is_multi_frame
=
isinstance
(
mtd
[
c_ws_name
],
WorkspaceGroup
)
is_multi_frame
=
isinstance
(
mtd
[
c_ws_name
],
WorkspaceGroup
)
# Get list of workspaces
# Get list of workspaces
...
@@ -263,13 +268,17 @@ class ISISIndirectEnergyTransfer(DataProcessorAlgorithm):
...
@@ -263,13 +268,17 @@ class ISISIndirectEnergyTransfer(DataProcessorAlgorithm):
# Rename output workspaces
# Rename output workspaces
output_workspace_names
=
[
rename_reduction
(
ws_name
,
self
.
_sum_files
)
for
ws_name
in
self
.
_workspace_names
]
output_workspace_names
=
[
rename_reduction
(
ws_name
,
self
.
_sum_files
)
for
ws_name
in
self
.
_workspace_names
]
summary_prog
=
Progress
(
self
,
start
=
0.9
,
end
=
1.0
,
nreports
=
4
)
# Save result workspaces
# Save result workspaces
if
self
.
_save_formats
is
not
None
:
if
self
.
_save_formats
is
not
None
:
summary_prog
.
report
(
'
saving
'
)
save_reduction
(
output_workspace_names
,
save_reduction
(
output_workspace_names
,
self
.
_save_formats
,
self
.
_save_formats
,
self
.
_output_x_units
)
self
.
_output_x_units
)
# Group result workspaces
# Group result workspaces
summary_prog
.
report
(
'
grouping workspaces
'
)
GroupWorkspaces
(
InputWorkspaces
=
output_workspace_names
,
GroupWorkspaces
(
InputWorkspaces
=
output_workspace_names
,
OutputWorkspace
=
self
.
_output_ws
)
OutputWorkspace
=
self
.
_output_ws
)
...
@@ -277,8 +286,10 @@ class ISISIndirectEnergyTransfer(DataProcessorAlgorithm):
...
@@ -277,8 +286,10 @@ class ISISIndirectEnergyTransfer(DataProcessorAlgorithm):
# Plot result workspaces
# Plot result workspaces
if
self
.
_plot_type
!=
'
None
'
:
if
self
.
_plot_type
!=
'
None
'
:
summary_prog
.
report
(
'
Plotting
'
)
for
ws_name
in
mtd
[
self
.
_output_ws
].
getNames
():
for
ws_name
in
mtd
[
self
.
_output_ws
].
getNames
():
plot_reduction
(
ws_name
,
self
.
_plot_type
)
plot_reduction
(
ws_name
,
self
.
_plot_type
)
summary_prog
.
report
(
'
Algorithm complete
'
)
def
validateInputs
(
self
):
def
validateInputs
(
self
):
...
...
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