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
14032eef
Commit
14032eef
authored
Aug 17, 2018
by
Whitfield, Ross
Browse files
Update .#Pr2NiO4_new.py Pr2NiO4_new.py
parent
ea0e4f82
Changes
2
Hide whitespace changes
Inline
Side-by-side
.#Pr2NiO4_new.py
0 → 120000
View file @
14032eef
rwp
@
diffuse
.
16111
:
1534510807
\ No newline at end of file
Pr2NiO4_new.py
View file @
14032eef
LoadWANDSCD
(
IPTS
=
7776
,
RunNumbers
=
'4756-6557'
,
Grouping
=
'4x4'
,
OutputWorkspace
=
'data'
)
ConvertWANDSCDtoQ
(
InputWorkspace
=
'data'
,
NormaliseBy
=
'None'
,
KeepTemporaryWorkspaces
=
True
,
OutputWorkspace
=
'q'
,
BinningDim0
=
'-8.01,8.01,801'
,
BinningDim1
=
'-0.81,0.81,81'
,
BinningDim2
=
'-8.01,8.01,801'
)
FindPeaksMD
(
InputWorkspace
=
'q_data'
,
PeakDistanceThreshold
=
1
,
MaxPeaks
=
100
,
DensityThresholdFactor
=
500
,
CalculateGoniometerForCW
=
True
,
Wavelength
=
1.488
,
OutputWorkspace
=
'peaks'
)
FindUBUsingLatticeParameters
(
'peaks'
,
5.414
,
5.414
,
12.457
,
90
,
90
,
90
)
ws
=
LoadEventNexus
(
Filename
=
'/HFIR/HB2C/IPTS-7776/nexus/HB2C_4756.nxs.h5'
,
MetaDataOnly
=
True
)
AddSampleLog
(
ws
,
LogName
=
'HB2C:Mot:detz.RBV'
,
LogText
=
'3.4'
,
LogType
=
'Number Series'
)
LoadInstrument
(
ws
,
InstrumentName
=
'WAND'
,
RewriteSpectraMap
=
'True'
)
grouping
=
4
tmp_group
,
_
,
_
=
CreateGroupingWorkspace
(
InputWorkspace
=
ws
)
group_number
=
0
for
x
in
range
(
0
,
480
*
8
,
grouping
):
for
y
in
range
(
0
,
512
,
grouping
):
group_number
+=
1
for
j
in
range
(
grouping
):
for
i
in
range
(
grouping
):
tmp_group
.
dataY
(
y
+
i
+
(
x
+
j
)
*
512
)[
0
]
=
group_number
tmp_ws
=
GroupDetectors
(
InputWorkspace
=
ws
,
CopyGroupingFromWorkspace
=
tmp_group
)
table
=
PreprocessDetectorsToMD
(
tmp_ws
)
twotheta
=
table
.
column
(
2
)
azimuthal
=
table
.
column
(
3
)
data
.
getExperimentInfo
(
0
).
run
().
addProperty
(
'twotheta'
,
twotheta
,
True
)
data
.
getExperimentInfo
(
0
).
run
().
addProperty
(
'azimuthal'
,
azimuthal
,
True
)
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