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
646356cb
Commit
646356cb
authored
Feb 12, 2020
by
Whitfield, Ross
Browse files
Update Al2O3.py
parent
350282bd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Al2O3.py
0 → 100644
View file @
646356cb
# The following line helps with future compatibility with Python 3
# print must now be used as a function, e.g print('Hello','World')
from
__future__
import
(
absolute_import
,
division
,
print_function
,
unicode_literals
)
# import mantid algorithms, numpy and matplotlib
from
mantid.simpleapi
import
*
import
matplotlib.pyplot
as
plt
import
numpy
as
np
data
=
LoadWANDSCD
(
IPTS
=
22745
,
RunNumbers
=
'145330-147130'
)
mde
=
ConvertHFIRSCDtoMDE
(
data
,
wavelength
=
1.488
)
PredictPeaks
(
InputWorkspace
=
data
,
MinDSpacing
=
0.5
,
ReflectionCondition
=
'Rhombohedrally centred, obverse'
,
CalculateGoniometerForCW
=
True
,
Wavelength
=
1.488
,
MinAngle
=-
90
,
MaxAngle
=
90
,
CalculateStructureFactors
=
True
,
OutputWorkspace
=
'predict'
)
IntegratePeaksMD
(
InputWorkspace
=
mde
,
PeaksWorkspace
=
'predict'
,
PeakRadius
=
0.5
,
OutputWorkspace
=
'integrated'
)
IntegratePeaksMD
(
InputWorkspace
=
mde
,
PeaksWorkspace
=
'predict'
,
PeakRadius
=
0.5
,
BackgroundOuterRadius
=
0.75
,
OutputWorkspace
=
'integrated_bkg'
)
peaks
=
mtd
[
'integrated'
]
for
p
in
range
(
peaks
.
getNumberPeaks
()):
peak
=
peaks
.
getPeak
(
p
)
if
peak
.
getL
()
==
0
:
print
(
"HKL = {:>12} int = {:>8}"
.
format
(
str
(
peak
.
getHKL
()),
peak
.
getIntensity
()))
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