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
mantidproject
mantid
Commits
9e95288d
Commit
9e95288d
authored
Feb 05, 2021
by
Gagik Vardanyan
Committed by
mantid-builder
Feb 06, 2021
Browse files
add a wrapper detector to D22B, remove from facilities.xml
parent
4b59758f
Changes
7
Hide whitespace changes
Inline
Side-by-side
Framework/DataHandling/src/LoadILLSANS.cpp
View file @
9e95288d
...
...
@@ -28,7 +28,8 @@
#include <Poco/Path.h>
#include <cmath>
#include <limits>
#include <numeric> // std::accumulate
#include <numeric>
#include <boost/algorithm/string/predicate.hpp>
namespace
Mantid
{
namespace
DataHandling
{
...
...
@@ -171,24 +172,24 @@ void LoadILLSANS::exec() {
// first we move the central detector
double
distance
=
firstEntry
.
getFloat
(
instrumentPath
+
"/Detector 2/det2_calc"
);
moveDetectorDistance
(
distance
,
"detector"
);
moveDetectorDistance
(
distance
,
"detector
_back
"
);
API
::
Run
&
runDetails
=
m_localWorkspace
->
mutableRun
();
runDetails
.
addProperty
<
double
>
(
"L2"
,
distance
,
true
);
double
offset
=
firstEntry
.
getFloat
(
instrumentPath
+
"/Detector 2/dtr2_actual"
);
moveDetectorHorizontal
(
-
offset
/
1000
,
"detector"
);
// mm to meter
moveDetectorHorizontal
(
-
offset
/
1000
,
"detector
_back
"
);
// mm to meter
// then the right one
distance
=
firstEntry
.
getFloat
(
instrumentPath
+
"/Detector 1/det1_calc"
);
moveDetectorDistance
(
distance
,
"detector_
righ
t"
);
moveDetectorDistance
(
distance
,
"detector_
fron
t"
);
// mm to meter
offset
=
firstEntry
.
getFloat
(
instrumentPath
+
"/Detector 1/dtr1_actual"
);
moveDetectorHorizontal
(
-
offset
/
1000
,
"detector_
righ
t"
);
moveDetectorHorizontal
(
-
offset
/
1000
,
"detector_
fron
t"
);
double
angle
=
firstEntry
.
getFloat
(
instrumentPath
+
"/Detector 1/dan1_actual"
);
rotateInstrument
(
-
angle
,
"detector_
righ
t"
);
rotateInstrument
(
-
angle
,
"detector_
fron
t"
);
}
else
{
// D11 and D22
...
...
@@ -619,6 +620,7 @@ LoadILLSANS::getInstrumentFilePath(const std::string &instName) const {
return
fullPath
.
toString
();
}
/**
* Loads the instrument from the IDF
*/
...
...
@@ -626,8 +628,10 @@ void LoadILLSANS::runLoadInstrument() {
IAlgorithm_sptr
loadInst
=
createChildAlgorithm
(
"LoadInstrument"
);
if
(
m_resMode
==
"nominal"
)
{
loadInst
->
setPropertyValue
(
"InstrumentName"
,
m_instrumentName
);
loadInst
->
setPropertyValue
(
"Filename"
,
getInstrumentFilePath
(
m_instrumentName
));
}
else
if
(
m_resMode
==
"low"
)
{
// low resolution mode we have only defined for the old D11 and D22
loadInst
->
setPropertyValue
(
"Filename"
,
getInstrumentFilePath
(
m_instrumentName
+
"lr"
));
}
...
...
Framework/DataHandling/test/LoadILLSANSTest.h
View file @
9e95288d
...
...
@@ -204,7 +204,8 @@ public:
const
auto
&
instrument
=
outputWS
->
getInstrument
();
const
auto
&
run
=
outputWS
->
run
();
IComponent_const_sptr
comp
=
instrument
->
getComponentByName
(
"detector"
);
IComponent_const_sptr
comp
=
instrument
->
getComponentByName
(
"detector_back"
);
V3D
pos
=
comp
->
getPos
();
TS_ASSERT
(
run
.
hasProperty
(
"Detector 2.det2_calc"
))
double
det2_calc
=
run
.
getLogAsSingleValue
(
"Detector 2.det2_calc"
);
...
...
@@ -216,7 +217,7 @@ public:
double
l2
=
run
.
getLogAsSingleValue
(
"L2"
);
TS_ASSERT_DELTA
(
l2
,
det2_calc
,
1E-6
)
comp
=
instrument
->
getComponentByName
(
"detector_
righ
t"
);
comp
=
instrument
->
getComponentByName
(
"detector_
fron
t"
);
pos
=
comp
->
getPos
();
TS_ASSERT
(
run
.
hasProperty
(
"Detector 1.det1_calc"
))
double
det1_calc
=
run
.
getLogAsSingleValue
(
"Detector 1.det1_calc"
);
...
...
Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSILLIntegration.py
View file @
9e95288d
...
...
@@ -181,12 +181,9 @@ class SANSILLIntegration(PythonAlgorithm):
XMax
=
self
.
_lambda_range
[
1
])
self
.
_input_ws
=
cut_input_ws
# re-calculate the Q-range after lambda cut
CalculateDynamicRange
(
Workspace
=
self
.
_input_ws
,
ComponentNames
=
[
'back_detector'
,
'front_detector_right'
,
'front_detector_left'
,
'front_detector_top'
,
'front_detector_bottom'
])
# TOF is only D33 which has panels
panel_names
=
mtd
[
self
.
_input_ws
].
getInstrument
().
getStringParameter
(
'detector_panels'
)[
0
].
split
(
','
)
CalculateDynamicRange
(
Workspace
=
self
.
_input_ws
,
ComponentNames
=
panel_names
)
self
.
_integrate
(
self
.
_input_ws
,
self
.
_output_ws
)
self
.
setProperty
(
'OutputWorkspace'
,
self
.
_output_ws
)
panels_out_ws
=
self
.
getPropertyValue
(
'PanelOutputWorkspaces'
)
...
...
instrument/D11B_Definition.xml
View file @
9e95288d
<?xml version='1.0' encoding='ASCII'?>
<instrument
xmlns=
"http://www.mantidproject.org/IDF/1.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
name=
"D11B"
valid-from=
"2020-12-01 00:00:00"
valid-to=
"2100-01-31 23:59:59"
last-modified=
"202
0-12-18 13:20:29.148515
"
xsi:schemaLocation=
"http://www.mantidproject.org/IDF/1.0 http://schema.mantidproject.org/IDF/1.0/IDFSchema.xsd"
>
<instrument
xmlns=
"http://www.mantidproject.org/IDF/1.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
name=
"D11B"
valid-from=
"2020-12-01 00:00:00"
valid-to=
"2100-01-31 23:59:59"
last-modified=
"202
1-02-05 11:11:33.671604
"
xsi:schemaLocation=
"http://www.mantidproject.org/IDF/1.0 http://schema.mantidproject.org/IDF/1.0/IDFSchema.xsd"
>
<!-- This is the instrument definition file of the D11B SANS instrument at the ILL.
Generated file, PLEASE DO NOT EDIT THIS FILE!
This file was automatically generated by mantidgeometry/ILL/IDF/d11b_generateIDF.py
...
...
instrument/D22B_Definition.xml
View file @
9e95288d
<?xml version='1.0' encoding='ASCII'?>
<instrument
xmlns=
"http://www.mantidproject.org/IDF/1.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
name=
"D22B"
valid-from=
"2020-12-01 00:00:00"
valid-to=
"2100-01-31 23:59:59"
last-modified=
"2021-0
1-29 07:34:14.273668
"
xsi:schemaLocation=
"http://www.mantidproject.org/IDF/1.0 http://schema.mantidproject.org/IDF/1.0/IDFSchema.xsd"
>
<instrument
xmlns=
"http://www.mantidproject.org/IDF/1.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
name=
"D22B"
valid-from=
"2020-12-01 00:00:00"
valid-to=
"2100-01-31 23:59:59"
last-modified=
"2021-0
2-05 11:11:38.500792
"
xsi:schemaLocation=
"http://www.mantidproject.org/IDF/1.0 http://schema.mantidproject.org/IDF/1.0/IDFSchema.xsd"
>
<!-- This is the instrument definition file of the D22B Large dynamic range small-angle diffractometer
at the ILL.
Generated file, PLEASE DO NOT EDIT THIS FILE!
...
...
@@ -86,14 +86,19 @@
<id
val=
"100001"
/>
</idlist>
<!--DETECTOR-->
<component
type=
"detector"
idstart=
"0"
idfillbyfirst=
"y"
idstepbyrow=
"256"
>
<location
x=
"0.0"
y=
"0.0"
z=
"12.8"
/>
</component>
<type
xstart=
"0.508"
xstep=
"-0.008"
xpixels=
"128"
ystart=
"-0.51"
ystep=
"0.004"
ypixels=
"256"
name=
"detector"
is=
"rectangular_detector"
type=
"pixel"
/>
<component
type=
"detector_right"
idstart=
"32768"
idfillbyfirst=
"y"
idstepbyrow=
"256"
>
<location
x=
"-0.896"
y=
"0.0"
z=
"12.8"
/>
<component
type=
"detector"
>
<location
x=
"0.0"
y=
"0.0"
z=
"0.0"
/>
</component>
<type
xstart=
"0.38"
xstep=
"-0.008"
xpixels=
"96"
ystart=
"-0.51"
ystep=
"0.004"
ypixels=
"256"
name=
"detector_right"
is=
"rectangular_detector"
type=
"pixel"
/>
<type
name=
"detector"
>
<component
type=
"detector_back"
idstart=
"0"
idfillbyfirst=
"y"
idstepbyrow=
"256"
>
<location
x=
"0.0"
y=
"0.0"
z=
"12.8"
/>
</component>
<component
type=
"detector_front"
idstart=
"32768"
idfillbyfirst=
"y"
idstepbyrow=
"256"
>
<location
x=
"-0.896"
y=
"0.0"
z=
"12.8"
/>
</component>
</type>
<type
xstart=
"0.508"
xstep=
"-0.008"
xpixels=
"128"
ystart=
"-0.51"
ystep=
"0.004"
ypixels=
"256"
name=
"detector_back"
is=
"rectangular_detector"
type=
"pixel"
/>
<type
xstart=
"0.38"
xstep=
"-0.008"
xpixels=
"96"
ystart=
"-0.51"
ystep=
"0.004"
ypixels=
"256"
name=
"detector_front"
is=
"rectangular_detector"
type=
"pixel"
/>
<!--PIXEL, EACH PIXEL IS A DETECTOR-->
<type
name=
"pixel"
is=
"detector"
>
<cuboid
id=
"pixel-shape"
>
...
...
instrument/D22B_Parameters.xml
View file @
9e95288d
...
...
@@ -4,7 +4,7 @@
<component-link
name=
"D22B"
>
<!-- The name of the panels for separate I(Q) calculations, the names are from the IDF -->
<parameter
name=
"detector_panels"
type=
"string"
>
<value
val=
"detector,detector_
righ
t"
/>
<value
val=
"detector
_back
,detector_
fron
t"
/>
</parameter>
<!-- Tau coefficient for DeadTimeCorrection, to be applied tube by tube -->
<parameter
name=
"tau"
type=
"number"
>
...
...
@@ -29,7 +29,7 @@
</parameter>
</component-link>
<!-- These parameters are used in ParallaxCorrection algorithm -->
<component-link
name=
"detector"
>
<component-link
name=
"detector
_back
"
>
<parameter
name=
"parallax"
type=
"string"
>
<value
val=
"1+0.14*exp(-4*ln(2.)*((t-0.588)/0.414)^2)"
/>
</parameter>
...
...
@@ -37,7 +37,7 @@
<value
val=
"y"
/>
</parameter>
</component-link>
<component-link
name=
"detector_
righ
t"
>
<component-link
name=
"detector_
fron
t"
>
<parameter
name=
"parallax"
type=
"string"
>
<value
val=
"1+0.14*exp(-4*ln(2.)*((t-0.588)/0.414)^2)"
/>
</parameter>
...
...
instrument/Facilities.xml
View file @
9e95288d
...
...
@@ -684,10 +684,6 @@
<technique>
SANS
</technique>
</instrument>
<instrument
name=
"D11B"
>
<technique>
SANS
</technique>
</instrument>
<instrument
name=
"D16"
>
<technique>
SANS
</technique>
</instrument>
...
...
@@ -696,10 +692,6 @@
<technique>
SANS
</technique>
</instrument>
<instrument
name=
"D22B"
>
<technique>
SANS
</technique>
</instrument>
<instrument
name=
"D33"
>
<technique>
SANS
</technique>
</instrument>
...
...
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