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
595e6357
Commit
595e6357
authored
4 years ago
by
Jose Borreguero
Browse files
Options
Downloads
Patches
Plain Diff
Refs #30887 operator "/" not exported for V3D
Signed-off-by:
Jose Borreguero
<
borreguero@gmail.com
>
parent
cb67cda6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Framework/PythonInterface/plugins/algorithms/SaveHKLCW.py
+2
-2
2 additions, 2 deletions
Framework/PythonInterface/plugins/algorithms/SaveHKLCW.py
with
2 additions
and
2 deletions
Framework/PythonInterface/plugins/algorithms/SaveHKLCW.py
+
2
−
2
View file @
595e6357
...
...
@@ -73,7 +73,7 @@ class SaveHKLCW(PythonAlgorithm):
sample_pos
=
peak_ws
.
getInstrument
().
getSample
().
getPos
()
source_pos
=
peak_ws
.
getInstrument
().
getSource
().
getPos
()
ki_n
=
sample_pos
-
source_pos
# direction of incident wavevector
ki_n
=
ki_n
/
ki_n
.
norm
()
ki_n
=
ki_n
*
(
1.
/
ki_n
.
norm
()
)
for
p
in
peak_ws
:
if
directionCosines
:
...
...
@@ -81,7 +81,7 @@ class SaveHKLCW(PythonAlgorithm):
RU
=
np
.
dot
(
R
,
U
)
ki
=
ki_n
*
(
2
*
np
.
pi
/
p
.
getWavelength
())
kf_n
=
ki
+
p
.
getQLabFrame
()
# direction of scattered wavevector
kf_n
=
kf_n
/
kf_n
.
norm
()
kf_n
=
kf_n
*
(
1.
/
kf_n
.
norm
()
)
dir_cos_1
=
np
.
dot
(
RU
.
T
,
-
ki_n
)
# notice ki direction is reversed
dir_cos_2
=
np
.
dot
(
RU
.
T
,
kf_n
)
f
.
write
(
...
...
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