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
37cfccb9
Commit
37cfccb9
authored
11 years ago
by
Vickie Lynch
Browse files
Options
Downloads
Patches
Plain Diff
Refs #7553 mpi chunks for can and vanadium
parent
2cc88f73
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/SNSPowderReduction.py
+2
-18
2 additions, 18 deletions
.../PythonInterface/plugins/algorithms/SNSPowderReduction.py
with
2 additions
and
18 deletions
Code/Mantid/Framework/PythonInterface/plugins/algorithms/SNSPowderReduction.py
+
2
−
18
View file @
37cfccb9
...
...
@@ -427,12 +427,7 @@ class SNSPowderReduction(PythonAlgorithm):
elif
canRun
<
0
:
# turn off the correction
canRun
=
0
if
canRun
>
0
:
canFile
=
"
%s_%d
"
%
(
self
.
_instrument
,
canRun
)
+
"
.nxs
"
if
HAVE_MPI
and
os
.
path
.
exists
(
canFile
):
if
rank
==
0
:
canRun
=
"
%s_%d
"
%
(
self
.
_instrument
,
canRun
)
canRun
=
api
.
Load
(
Filename
=
canFile
,
OutputWorkspace
=
canRun
)
elif
(
"
%s_%d
"
%
(
self
.
_instrument
,
canRun
))
in
mtd
:
if
(
"
%s_%d
"
%
(
self
.
_instrument
,
canRun
))
in
mtd
:
canRun
=
mtd
[
"
%s_%d
"
%
(
self
.
_instrument
,
canRun
)]
canRun
=
api
.
ConvertUnits
(
InputWorkspace
=
canRun
,
OutputWorkspace
=
canRun
,
Target
=
"
TOF
"
)
else
:
...
...
@@ -443,9 +438,6 @@ class SNSPowderReduction(PythonAlgorithm):
canRun
=
self
.
_focusChunks
(
canRun
,
SUFFIX
,
(
0.
,
0.
),
calib
,
preserveEvents
=
preserveEvents
)
canRun
=
api
.
ConvertUnits
(
InputWorkspace
=
canRun
,
OutputWorkspace
=
canRun
,
Target
=
"
TOF
"
)
if
HAVE_MPI
:
if
rank
==
0
:
api
.
SaveNexus
(
InputWorkspace
=
canRun
,
Filename
=
canFile
)
workspacelist
.
append
(
str
(
canRun
))
else
:
canRun
=
None
...
...
@@ -460,12 +452,7 @@ class SNSPowderReduction(PythonAlgorithm):
vanRun
=
0
self
.
log
().
information
(
"
F313C: Correction SamRun = %s, VanRun = %s of type %s
"
%
(
str
(
samRun
),
str
(
vanRun
),
str
(
type
(
vanRun
))))
if
vanRun
>
0
:
vanFile
=
"
%s_%d
"
%
(
self
.
_instrument
,
vanRun
)
+
"
.nxs
"
if
HAVE_MPI
and
os
.
path
.
exists
(
vanFile
):
if
rank
==
0
:
vanRun
=
"
%s_%d
"
%
(
self
.
_instrument
,
vanRun
)
vanRun
=
api
.
Load
(
Filename
=
vanFile
,
OutputWorkspace
=
vanRun
)
elif
(
"
%s_%d
"
%
(
self
.
_instrument
,
vanRun
))
in
mtd
:
if
(
"
%s_%d
"
%
(
self
.
_instrument
,
vanRun
))
in
mtd
:
vanRun
=
mtd
[
"
%s_%d
"
%
(
self
.
_instrument
,
vanRun
)]
vanRun
=
api
.
ConvertUnits
(
InputWorkspace
=
vanRun
,
OutputWorkspace
=
vanRun
,
Target
=
"
TOF
"
)
else
:
...
...
@@ -561,9 +548,6 @@ class SNSPowderReduction(PythonAlgorithm):
SampleNumberDensity
=
0.0721
,
CylinderSampleRadius
=
.
3175
)
vanRun
=
api
.
SetUncertainties
(
InputWorkspace
=
vanRun
,
OutputWorkspace
=
vanRun
)
vanRun
=
api
.
ConvertUnits
(
InputWorkspace
=
vanRun
,
OutputWorkspace
=
vanRun
,
Target
=
"
TOF
"
)
if
HAVE_MPI
:
if
rank
==
0
:
api
.
SaveNexus
(
InputWorkspace
=
vanRun
,
Filename
=
vanFile
)
workspacelist
.
append
(
str
(
vanRun
))
else
:
vanRun
=
None
...
...
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