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
d2a7f2fa
Commit
d2a7f2fa
authored
9 years ago
by
Dan Nixon
Browse files
Options
Downloads
Patches
Plain Diff
Add check for sample log existance
Refs #11464
parent
ffb7163d
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
Code/Mantid/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ElasticWindowMultiple.py
+11
-8
11 additions, 8 deletions
...ns/algorithms/WorkflowAlgorithms/ElasticWindowMultiple.py
with
11 additions
and
8 deletions
Code/Mantid/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ElasticWindowMultiple.py
+
11
−
8
View file @
d2a7f2fa
...
...
@@ -328,16 +328,19 @@ class ElasticWindowMultiple(DataProcessorAlgorithm):
# Get temperature from log file
LoadLog
(
Workspace
=
ws_name
,
Filename
=
log_path
)
run_logs
=
mtd
[
ws_name
].
getRun
()
tmp
=
run_logs
[
self
.
_sample_log_name
].
value
temp
=
tmp
[
len
(
tmp
)
-
1
]
logger
.
debug
(
'
Temperature %d K found for run: %s
'
%
(
temp
,
run_name
))
return
temp
if
self
.
_sample_log_name
in
run_logs
:
tmp
=
run_logs
[
self
.
_sample_log_name
].
value
temp
=
tmp
[
len
(
tmp
)
-
1
]
logger
.
debug
(
'
Temperature %d K found for run: %s
'
%
(
temp
,
run_name
))
return
temp
else
:
logger
.
warning
(
'
Log entry %s for run %s not found
'
%
(
self
.
_sample_log_name
,
run_name
))
else
:
# Can't find log file
logger
.
warning
(
'
Log file for run %s not found
'
%
run_name
)
logger
.
warning
(
'
No temperature found for run: %s
'
%
run_name
)
return
None
# Can't find log file
logger
.
warning
(
'
No temperature found for run: %s
'
%
run_name
)
return
None
# Register algorithm with Mantid
...
...
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