Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Whitfield, Ross
wand
Commits
13897bc8
Commit
13897bc8
authored
Aug 10, 2018
by
Whitfield, Ross
Browse files
Update IPTS-21442/make_4D_temp2.py
parent
63fdac4a
Changes
1
Hide whitespace changes
Inline
Side-by-side
IPTS-21442/make_4D_temp2.py
View file @
13897bc8
from
mantid.simpleapi
import
LoadWAND
,
SetUB
,
ConvertToMD
,
PlusMD
,
mtd
,
DeleteWorkspace
,
CloneMDWorkspace
import
numpy
as
np
import
re
if
'data'
in
mtd
:
DeleteWorkspace
(
'data'
)
for
run
in
range
(
95409
,
98459
,
61
):
ws
=
LoadWAND
(
IPTS
=
21442
,
RunNumber
=
run
,
Grouping
=
'4x4'
)
ws
=
LoadWAND
(
IPTS
=
21442
,
RunNumber
s
=
run
,
Grouping
=
'4x4'
)
ub
=
np
.
array
(
re
.
findall
(
r
'-?\d+\.*\d*'
,
ws
.
run
().
getProperty
(
'HB2C:CS:CrystalAlign:UBMatrix'
).
value
[
0
]),
dtype
=
np
.
float
).
reshape
(
3
,
3
)
sgl
=
np
.
deg2rad
(
_tmp_
ws
.
run
().
getProperty
(
'HB2C:Mot:sgl.RBV'
).
value
[
0
])
# 'HB2C:Mot:sgl.RBV,1,0,0,-1'
sgu
=
np
.
deg2rad
(
_tmp_
ws
.
run
().
getProperty
(
'HB2C:Mot:sgu.RBV'
).
value
[
0
])
# 'HB2C:Mot:sgu.RBV,0,0,1,-1'
sgl
=
np
.
deg2rad
(
ws
.
run
().
getProperty
(
'HB2C:Mot:sgl.RBV'
).
value
[
0
])
# 'HB2C:Mot:sgl.RBV,1,0,0,-1'
sgu
=
np
.
deg2rad
(
ws
.
run
().
getProperty
(
'HB2C:Mot:sgu.RBV'
).
value
[
0
])
# 'HB2C:Mot:sgu.RBV,0,0,1,-1'
sgl_a
=
np
.
array
([[
1
,
0
,
0
],
[
0
,
np
.
cos
(
sgl
),
np
.
sin
(
sgl
)],
[
0
,
-
np
.
sin
(
sgl
),
np
.
cos
(
sgl
)]])
...
...
@@ -21,4 +25,10 @@ for run in range(95409, 98459, 61):
Q3DFrames
=
'HKL'
,
QConversionScales
=
'HKL'
,
OtherDimensions
=
'HB2C:SE:SampleTemp'
)
if
'data'
in
mtd
:
PlusMD
(
LHSWorkspace
=
'data'
,
RHSWorkspace
=
'md'
,
OutputWorkspace
=
'data'
)
else
:
CloneMDWorkspace
(
InputWorkspace
=
'md'
,
OutputWorkspace
=
'data'
)
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment