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
6dc86420
Commit
6dc86420
authored
Sep 23, 2019
by
Whitfield, Ross
Browse files
Update integration_test_MDE.py
parent
2bd97d04
Changes
1
Hide whitespace changes
Inline
Side-by-side
integration_test_MDE.py
View file @
6dc86420
...
...
@@ -103,4 +103,64 @@ Wavelength=1.488,
MaxAngle
=
0
,
ReflectionCondition
=
'Hexagonally centred, reverse'
,
CalculateStructureFactors
=
True
,
OutputWorkspace
=
'predict2'
)
\ No newline at end of file
OutputWorkspace
=
'predict2'
)
#####
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
=
21362
,
RunNumbers
=
'120754-122554'
,
Grouping
=
'4x4'
)
norm
=
LoadWANDSCD
(
"HB2C137518"
,
Grouping
=
'4x4'
)
mde
=
ConvertWANDSCDtoMDE
(
data
)
ConvertWANDSCDtoQ
(
InputWorkspace
=
'data'
,
NormalisationWorkspace
=
'norm'
,
OutputWorkspace
=
'Q'
,
BinningDim1
=
'-1,1,21'
)
FindPeaksMD
(
InputWorkspace
=
'mde'
,
PeakDistanceThreshold
=
1
,
DensityThresholdFactor
=
10000
,
CalculateGoniometerForCW
=
True
,
OutputWorkspace
=
'peaks'
)
IndexPeaks
(
PeaksWorkspace
=
'peaks'
)
OptimizeLatticeForCellType
(
PeaksWorkspace
=
'peaks'
,
CellType
=
'Hexagonal'
,
Apply
=
True
,
OutputDirectory
=
'/home/rwp/build/mantid/.'
)
PredictPeaks
(
InputWorkspace
=
'peaks'
,
MinDSpacing
=
0.1
,
CalculateGoniometerForCW
=
True
,
Wavelength
=
1.488
,
MaxAngle
=
0
,
ReflectionCondition
=
'Hexagonally centred, reverse'
,
CalculateStructureFactors
=
True
,
OutputWorkspace
=
'predict'
)
ol
=
mtd
[
'peaks'
].
sample
().
getOrientedLattice
()
a
=
ol
.
a
();
b
=
ol
.
b
()
c
=
ol
.
c
()
ol
.
seta
(
a
*
2
)
ol
.
setb
(
b
*
2
)
ol
.
setc
(
c
*
4
)
PredictPeaks
(
InputWorkspace
=
'peaks'
,
MinDSpacing
=
0.1
,
CalculateGoniometerForCW
=
True
,
Wavelength
=
1.488
,
MaxAngle
=
0
,
ReflectionCondition
=
'Hexagonally centred, reverse'
,
OutputWorkspace
=
'predict2'
)
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