Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
mantidproject
mantid
Commits
23c69c2d
Commit
23c69c2d
authored
May 28, 2020
by
Gagik Vardanyan
Browse files
fixed the chopper gap unit
parent
d40ee1ee
Changes
2
Hide whitespace changes
Inline
Side-by-side
Framework/DataHandling/src/LoadILLReflectometry.cpp
View file @
23c69c2d
...
...
@@ -809,18 +809,18 @@ void LoadILLReflectometry::initPixelWidth() {
widthInLogs
=
mmToMeter
(
m_localWorkspace
->
run
().
getPropertyValueAsType
<
double
>
(
"PSD.mppx"
));
if
(
std
::
abs
(
widthInLogs
-
m_pixelWidth
)
>
1e-10
)
{
m_log
.
warning
()
<<
"NeXus pixel width (mppx) "
<<
widthInLogs
<<
" differs from the IDF. Using the IDF value "
<<
m_pixelWidth
<<
'\n'
;
m_log
.
information
()
<<
"NeXus pixel width (mppx) "
<<
widthInLogs
<<
" differs from the IDF. Using the IDF value "
<<
m_pixelWidth
<<
'\n'
;
}
}
else
{
m_pixelWidth
=
std
::
abs
(
detector
->
ystep
());
widthInLogs
=
mmToMeter
(
m_localWorkspace
->
run
().
getPropertyValueAsType
<
double
>
(
"PSD.mppy"
));
if
(
std
::
abs
(
widthInLogs
-
m_pixelWidth
)
>
1e-10
)
{
m_log
.
warning
()
<<
"NeXus pixel width (mppy) "
<<
widthInLogs
<<
" differs from the IDF. Using the IDF value "
<<
m_pixelWidth
<<
'\n'
;
m_log
.
information
()
<<
"NeXus pixel width (mppy) "
<<
widthInLogs
<<
" differs from the IDF. Using the IDF value "
<<
m_pixelWidth
<<
'\n'
;
}
}
}
...
...
@@ -983,13 +983,20 @@ double LoadILLReflectometry::sourceSampleDistance() const {
double
pairCentre
;
double
pairSeparation
;
try
{
pairCentre
=
doubleFromRun
(
"VirtualChopper.dist_chop_samp"
);
pairSeparation
=
doubleFromRun
(
"Distance.ChopperGap"
)
/
100
;
pairCentre
=
doubleFromRun
(
"VirtualChopper.dist_chop_samp"
);
// in [m]
pairSeparation
=
doubleFromRun
(
"Distance.ChopperGap"
)
/
100
;
// in [m]
m_localWorkspace
->
mutableRun
().
addProperty
(
"Distance.ChopperGap"
,
pairSeparation
,
"meter"
,
true
);
}
catch
(
std
::
runtime_error
&
)
{
try
{
pairCentre
=
mmToMeter
(
doubleFromRun
(
"VirtualChopper.MidChopper_Sample_distance"
));
pairSeparation
=
doubleFromRun
(
"Distance.ChopperGap"
);
pairCentre
=
mmToMeter
(
doubleFromRun
(
"VirtualChopper.MidChopper_Sample_distance"
));
// in [m]
pairSeparation
=
doubleFromRun
(
"Distance.ChopperGap"
);
// in [m]
m_localWorkspace
->
mutableRun
().
addProperty
(
"Distance.ChopperGap"
,
pairSeparation
,
"meter"
,
true
);
m_localWorkspace
->
mutableRun
().
addProperty
(
"VirtualChopper.MidChopper_Sample_distance"
,
pairCentre
,
"meter"
,
true
);
}
catch
(
std
::
runtime_error
&
)
{
throw
std
::
runtime_error
(
"Unable to extract chopper to sample distance"
);
...
...
Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ReflectometryILL_common.py
View file @
23c69c2d
...
...
@@ -40,7 +40,7 @@ def chopperOpeningAngle(sampleLogs, instrumentName):
def
chopperPairDistance
(
sampleLogs
,
instrumentName
):
"""Return the gap between the two choppers."""
if
instrumentName
==
'D17'
:
return
sampleLogs
.
getProperty
(
'Distance.ChopperGap'
).
value
*
1e-2
return
sampleLogs
.
getProperty
(
'Distance.ChopperGap'
).
value
# in [m]
else
:
return
sampleLogs
.
getProperty
(
'ChopperSetting.distSeparationChopperPair'
).
value
*
1e-3
...
...
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