Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Whitfield, Ross
wand
Commits
571d32fd
Commit
571d32fd
authored
Oct 24, 2018
by
Whitfield, Ross
Browse files
Update omega_scan/omega_scan_integration.py
parent
77d60a94
Changes
1
Hide whitespace changes
Inline
Side-by-side
omega_scan/omega_scan_integration.py
0 → 100644
View file @
571d32fd
import
numpy
as
np
peaks
=
mtd
[
'peaks'
]
data
=
mtd
[
'NaCl'
].
getSignalArray
()
dx
=
dy
=
20
lines
=
[]
for
p
in
range
(
peaks
.
getNumberPeaks
()):
peak
=
peaks
.
getPeak
(
p
)
g
=
peak
.
getGoniometerMatrix
()
detID
=
peak
.
getDetectorID
()
x
=
detID
//
(
4
*
4
*
128
)
-
1
y
=
detID
%
(
4
*
128
)
//
4
-
1
print
(
detID
,
peak
.
getQSampleFrame
(),
np
.
mod
(
np
.
arctan
(
g
[
0
,
2
]
/
g
[
0
,
0
])
*
180
/
np
.
pi
,
-
180
),
x
,
y
)
line
=
IntegrateMDHistoWorkspace
(
'NaCl'
,
P1Bin
=
'{},{}'
.
format
(
y
-
dy
,
y
+
dy
),
P2Bin
=
'{},{}'
.
format
(
x
-
dx
,
x
+
dx
))
lines
.
append
(
line
.
getSignalArray
().
flatten
())
lines
=
np
.
array
(
lines
)
output
=
CreateWorkspace
(
DataY
=
lines
,
DataX
=
range
(
len
(
lines
[
0
])),
NSpec
=
len
(
lines
))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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