Skip to content
Snippets Groups Projects
Commit 47fcc83f authored by Antti Soininen's avatar Antti Soininen
Browse files

Fix DirectILL* usage examples

Facility has to be set to 'ILL' in testsetup.

Re #20453
parent 9bea67ab
No related merge requests found
...@@ -22,6 +22,11 @@ Usage ...@@ -22,6 +22,11 @@ Usage
**Example - Absorption corrections and empty container subtraction** **Example - Absorption corrections and empty container subtraction**
.. testsetup:: IN4Example
config['default.facility'] = 'ILL'
config['default.instrument'] = 'IN4'
.. testcode:: IN4Example .. testcode:: IN4Example
import numpy import numpy
......
...@@ -120,6 +120,11 @@ Usage ...@@ -120,6 +120,11 @@ Usage
**Example - Basic usage as an advanced loader** **Example - Basic usage as an advanced loader**
.. testsetup:: IN4Example
config['default.facility'] = 'ILL'
config['default.instrument'] = 'IN4'
.. testcode:: IN4Example .. testcode:: IN4Example
# It is recommended to use DirectILLCollectData over the basic Load # It is recommended to use DirectILLCollectData over the basic Load
......
...@@ -105,6 +105,11 @@ Usage ...@@ -105,6 +105,11 @@ Usage
**Example - Diagnostics on IN4 workspace** **Example - Diagnostics on IN4 workspace**
.. testsetup:: IN4Example
config['default.facility'] = 'ILL'
config['default.instrument'] = 'IN4'
.. testcode:: IN4Example .. testcode:: IN4Example
DirectILLCollectData( DirectILLCollectData(
...@@ -138,6 +143,11 @@ Output: ...@@ -138,6 +143,11 @@ Output:
**Example - Diagnostics on IN5 workspace** **Example - Diagnostics on IN5 workspace**
.. testsetup:: IN5Example
config['default.facility'] = 'ILL'
config['default.instrument'] = 'IN4'
.. testcode:: IN5Example .. testcode:: IN5Example
# On IN5 we don't usually diagnose the pixels, but apply # On IN5 we don't usually diagnose the pixels, but apply
......
...@@ -31,6 +31,11 @@ Usage ...@@ -31,6 +31,11 @@ Usage
**Example - Integrating vanadium** **Example - Integrating vanadium**
.. testsetup:: IN4Example
config['default.facility'] = 'ILL'
config['default.instrument'] = 'IN4'
.. testcode:: IN4Example .. testcode:: IN4Example
DirectILLCollectData( DirectILLCollectData(
......
...@@ -24,6 +24,11 @@ Usage ...@@ -24,6 +24,11 @@ Usage
**Example - Calculating absorption corrections** **Example - Calculating absorption corrections**
.. testsetup:: IN4Example
config['default.facility'] = 'ILL'
config['default.instrument'] = 'IN4'
.. testcode:: IN4Example .. testcode:: IN4Example
preprocessed = DirectILLCollectData(Run='ILL/IN4/087294-087295') preprocessed = DirectILLCollectData(Run='ILL/IN4/087294-087295')
......
...@@ -59,6 +59,11 @@ A very basic reduction would include a vanadium reference and a sample and follo ...@@ -59,6 +59,11 @@ A very basic reduction would include a vanadium reference and a sample and follo
On instruments like IN4 and IN6, these steps would translate to something like the following simple Python script: On instruments like IN4 and IN6, these steps would translate to something like the following simple Python script:
.. testsetup:: BasicIN4Reduction
config['default.facility'] = 'ILL'
config['default.instrument'] = 'IN4'
.. testcode:: BasicIN4Reduction .. testcode:: BasicIN4Reduction
# Uncomment to add a temporary data search directory. # Uncomment to add a temporary data search directory.
...@@ -187,6 +192,11 @@ A more complete reduction example would include corrections for self-shielding: ...@@ -187,6 +192,11 @@ A more complete reduction example would include corrections for self-shielding:
The above workflow would translate to this kind of Python script for IN4 and IN6: The above workflow would translate to this kind of Python script for IN4 and IN6:
.. testsetup:: SelfShieldingReduction
config['default.facility'] = 'ILL'
config['default.instrument'] = 'IN4'
.. testcode:: SelfShieldingReduction .. testcode:: SelfShieldingReduction
# Uncomment to add a temporary data search directory. # Uncomment to add a temporary data search directory.
...@@ -266,6 +276,11 @@ Mantid can be picky with binning when doing arithmetics between workspaces. This ...@@ -266,6 +276,11 @@ Mantid can be picky with binning when doing arithmetics between workspaces. This
To alleviate the situation, the output workspaces of :ref:`algm-DirectILLCollectData` can be forced to use the same wavelength. The following Python script shows how to propagate the calibrated incident energy from the first loaded workspace into the rest: To alleviate the situation, the output workspaces of :ref:`algm-DirectILLCollectData` can be forced to use the same wavelength. The following Python script shows how to propagate the calibrated incident energy from the first loaded workspace into the rest:
.. testsetup:: SampleContainerCompatibility
config['default.facility'] = 'ILL'
config['default.instrument'] = 'IN4'
.. testcode:: SampleContainerCompatibility .. testcode:: SampleContainerCompatibility
# Sample # Sample
...@@ -320,6 +335,11 @@ With empty container data, the steps to reduce the experimental data might look ...@@ -320,6 +335,11 @@ With empty container data, the steps to reduce the experimental data might look
A corresponding Python script follows. A corresponding Python script follows.
.. testsetup:: ContainerSubtraction
config['default.facility'] = 'ILL'
config['default.instrument'] = 'IN4'
.. testcode:: ContainerSubtraction .. testcode:: ContainerSubtraction
# Uncomment to add a temporary data search directory. # Uncomment to add a temporary data search directory.
...@@ -401,6 +421,11 @@ Interpolation of container data to different temperatures ...@@ -401,6 +421,11 @@ Interpolation of container data to different temperatures
Sometimes the empty container is not measured at all the experiment's temperature points. One can use Mantid's workspace arithmetics to perform simple linear interpolation in temperature: Sometimes the empty container is not measured at all the experiment's temperature points. One can use Mantid's workspace arithmetics to perform simple linear interpolation in temperature:
.. testsetup:: ContainerInterpolation
config['default.facility'] = 'ILL'
config['default.instrument'] = 'IN4'
.. testcode:: ContainerInterpolation .. testcode:: ContainerInterpolation
import numpy import numpy
...@@ -479,6 +504,11 @@ Lets put it all together into a complex Python script. The script below reduces ...@@ -479,6 +504,11 @@ Lets put it all together into a complex Python script. The script below reduces
* Need to interpolate to 50K. * Need to interpolate to 50K.
.. testsetup:: FullExample
config['default.facility'] = 'ILL'
config['default.instrument'] = 'IN4'
.. testcode:: FullExample .. testcode:: FullExample
# Uncomment to add a temporary data search directory. # Uncomment to add a temporary data search directory.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment