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
67b11bba
Commit
67b11bba
authored
Apr 12, 2021
by
Whitfield, Ross
Browse files
Update optimizecelltype.py
parent
fe3e4c43
Changes
1
Hide whitespace changes
Inline
Side-by-side
optimizecelltype.py
View file @
67b11bba
...
...
@@ -3,13 +3,19 @@ from mantid.simpleapi import *
import
matplotlib.pyplot
as
plt
import
numpy
as
np
#LoadWANDSCD(IPTS='7776', RunNumbers='26640-27944', Grouping='4x4', OutputWorkspace='data')
LoadMD
(
'HB2C_WANDSCD_data.nxs'
,
OutputWorkspace
=
'data'
)
SetGoniometer
(
'data'
,
Axis0
=
's1,0,1,0,1'
,
Average
=
False
)
Q
=
ConvertHFIRSCDtoMDE
(
InputWorkspace
=
'data'
,
Wavelength
=
1.488
)
peaks
=
FindPeaksMD
(
InputWorkspace
=
Q
,
PeakDistanceThreshold
=
2.2
,
CalculateGoniometerForCW
=
True
,
Wavelength
=
1.488
)
FindUBUsingLatticeParameters
(
peaks
,
a
=
5.6
,
b
=
5.6
,
c
=
5.6
,
alpha
=
90
,
beta
=
90
,
gamma
=
90
)
IndexPeaks
(
peaks
)
TransformHKL
(
peaks
,
HKLTransform
=
'0,1,0,0,0,1,1,0,0'
)
print
(
"Starting"
,
peaks
.
sample
().
getOrientedLattice
())
OptimizeLatticeForCellType
(
peaks
,
CellType
=
'Cubic'
)
OptimizeLatticeForCellType
(
peaks
,
CellType
=
'Tetragonal'
)
OptimizeLatticeForCellType
(
peaks
,
CellType
=
'Orthorhombic'
)
print
(
"Orthorhombic"
,
peaks
.
sample
().
getOrientedLattice
())
OptimizeLatticeForCellType
(
peaks
,
CellType
=
'Tetragonal'
)
print
(
"Tetragonal"
,
peaks
.
sample
().
getOrientedLattice
())
OptimizeLatticeForCellType
(
peaks
,
CellType
=
'Cubic'
)
print
(
"Cubic"
,
peaks
.
sample
().
getOrientedLattice
())
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