<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>http://shadow.nd.rl.ac.uk/wiki/idr/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=130.246.50.68</id>
	<title>InelasticDataReduction - User contributions [en-gb]</title>
	<link rel="self" type="application/atom+xml" href="http://shadow.nd.rl.ac.uk/wiki/idr/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=130.246.50.68"/>
	<link rel="alternate" type="text/html" href="http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Special:Contributions/130.246.50.68"/>
	<updated>2026-05-13T00:01:41Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.13</generator>
	<entry>
		<id>http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=ISIS_direct_reduction_script_description.&amp;diff=213</id>
		<title>ISIS direct reduction script description.</title>
		<link rel="alternate" type="text/html" href="http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=ISIS_direct_reduction_script_description.&amp;diff=213"/>
		<updated>2016-03-09T19:57:34Z</updated>

		<summary type="html">&lt;p&gt;130.246.50.68: /* Reduction Scripts in Depth */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
All ISIS direct inelastic reduction scripts have similar interface and layout, with only parameters different for different instruments. Some parameters change from one cycle and sometimes one experiment to another but most of them are instrument specific and changes only when instrument is modified. &lt;br /&gt;
Instrument scientists prepare sample Mantid python reduction scripts, which are then automatically distributed to [http://isiscompute.nd.rl.ac.uk Isiscompute] users according to the rules described [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_sample_scripts_used_in_data_processing here].&lt;br /&gt;
&lt;br /&gt;
From the links below one can retrieve resent versions of these scripts and their default reduction parameters stored in XML files, namely:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;color:blue;&lt;br /&gt;
| Instrument&lt;br /&gt;
| Simple reduction script&lt;br /&gt;
| Full reduction script&lt;br /&gt;
| Default reduction parameters&lt;br /&gt;
| User Settings Description file&lt;br /&gt;
|-&lt;br /&gt;
| MARI: &lt;br /&gt;
|[https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/MARI/template_mari.py template_mari.py]&lt;br /&gt;
|[https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/MARI/MARIReduction_Sample.py MARIReduction_Sample.py]&lt;br /&gt;
|[https://github.com/mantidproject/mantid/blob/master/instrument/MARI_Parameters.xml MARI_Parameters.xml]&lt;br /&gt;
|[https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/MARI/USER_Files_description.xml MARI User settings ]&lt;br /&gt;
|-&lt;br /&gt;
| MAPS:&lt;br /&gt;
|[https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/MAPS/template_maps.py template_maps.py]&lt;br /&gt;
|[https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/MAPS/MAPSReduction_Sample.py MAPSReduction_Sample.py]&lt;br /&gt;
|[https://github.com/mantidproject/mantid/blob/master/instrument/MAPS_Parameters.xml MAPS_Parameters.xml]&lt;br /&gt;
|[https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/MAPS/USER_Files_description.xml MARI User settings]&lt;br /&gt;
|-&lt;br /&gt;
| MERLIN: &lt;br /&gt;
| ---&lt;br /&gt;
| [https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/MERLIN/MERLINReduction_Sample.py MERLINReduction_Sample.py]&lt;br /&gt;
| [https://github.com/mantidproject/mantid/blob/master/instrument/MERLIN_Parameters_after2013_4.xml MERLIN_Parameters.xml]&lt;br /&gt;
| [https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/MERLIN/USER_Files_description.xml MERLIN User settings] &lt;br /&gt;
|-&lt;br /&gt;
| LET: &lt;br /&gt;
| ---&lt;br /&gt;
| [https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/LET/LETReduction_Sample.py LETReduction_Sample.py]&lt;br /&gt;
| [https://github.com/mantidproject/mantid/blob/master/instrument/LET_Parameters_dr1to12.xml LET_Parameters.xml]&lt;br /&gt;
| [https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/LET/USER_Files_description.xml LET User settings]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;teplate_instrument_name.py&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;InstrumentReduction_Sample.py&amp;#039;&amp;#039;&amp;#039; files referenced in column two and three above are processed by [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/ISISDirecInelasticConfig.py MantidConfigurationScript], which replaces the strings, specified in correspondent &amp;#039;&amp;#039;User Settings Description&amp;#039;&amp;#039; file (Column 5)  and produces [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Automatic_user_configuration simple and full reduction scripts for users].&lt;br /&gt;
&lt;br /&gt;
Simple reduction script created for users who prefer old functional interface used by &amp;#039;&amp;#039;&amp;#039;[https://github.com/mantidproject/scriptrepository/tree/master/direct_inelastic/ISIS/qtiGenie qtiGenie]&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;Libisis&amp;#039;&amp;#039;&amp;#039;. It highlights only the parameters user needs to change during an experiment and allows users to separate all parameters, necessary to reduce data and user&amp;#039;s parameters in different files. User parameters are usually the &amp;#039;&amp;#039;run number&amp;#039;&amp;#039; or &amp;#039;&amp;#039;list of run numbers&amp;#039;&amp;#039; to process, run &amp;#039;&amp;#039;number for a white beam vanadium run&amp;#039;&amp;#039;, &amp;#039;&amp;#039;energies&amp;#039;&amp;#039; the user is interested in and &amp;#039;&amp;#039;energy binning&amp;#039;&amp;#039;. There are couple of other parameters, directly related to the experiment in progress. These parameters are better described in the script itself. &lt;br /&gt;
&lt;br /&gt;
Simple reduction script is then imports full reduction script, which sets up the parameters specific to a cycle and may be to an experiment. After that the advanced script picks up all other parameter&amp;#039;s default values from the appropriate &amp;#039;&amp;#039;xml&amp;#039;&amp;#039; file and runs the reduction algorithms itself. &lt;br /&gt;
&lt;br /&gt;
User may work directly with the full reduction script as this one has all necessary parameters which can then be fine tuned for particular runs in the &amp;#039;&amp;#039;&amp;#039;__main__&amp;#039;&amp;#039;&amp;#039; section of the script as described in the script. In fact, setting up small number of simple parameters in a separate script or setting up all parameters together in one big script is the matter of personal choice between using one big file with all parameters or two files with different sets of parameters. &lt;br /&gt;
&lt;br /&gt;
For instruments, where simple reduction script is present, user can find the &amp;#039;&amp;#039;&amp;#039;iliad&amp;#039;&amp;#039;&amp;#039; function, used by the simple reduction script inside the advanced reduction script.&lt;br /&gt;
&lt;br /&gt;
== Reduction Scripts in Depth ==&lt;br /&gt;
This chapter intended for advanced users or instrument scientists who wants to modify reduction scripts and add some new features to them.&lt;br /&gt;
&lt;br /&gt;
ISIS reduction scripts are part of Mantid and located under Mantid installation folder in &amp;#039;&amp;#039;/scripts/Inelastic/Direct&amp;#039;&amp;#039; directory (&amp;#039;&amp;#039;/opt/Mantid/scripts/Inelastic/Direct&amp;#039;&amp;#039; on Unix, &amp;#039;&amp;#039;c:\Mantid\scripts\Inelastic\Direct&amp;#039;&amp;#039; under Windows or see it on the web [https://github.com/mantidproject/mantid/tree/master/scripts/Inelastic/Direct here])&lt;br /&gt;
&lt;br /&gt;
In Direct folder the following important files can be found:&lt;br /&gt;
&lt;br /&gt;
 &amp;#039;&amp;#039;DirectEnergyConversion.py&amp;#039;&amp;#039;  -- The python class implementing ISIS direct inelastic reduction workflow. Its most important method is &amp;#039;&amp;#039;&amp;#039;convert_to_energy&amp;#039;&amp;#039;&amp;#039; method,&lt;br /&gt;
                               invoked for each  run or sum of runs, and converting data, obtained in experiment into reduced data. All other methods of this&lt;br /&gt;
                                class are directly or indirectly called by this method.&lt;br /&gt;
 &amp;#039;&amp;#039;PropertyManager.py&amp;#039;&amp;#039;         -- The python class, responsible for processing user input, Instrument parameter files described above and other properties, attached to &lt;br /&gt;
                               and providing these data to &amp;#039;&amp;#039;DirectEnergyConversion&amp;#039;&amp;#039;. This class instantiates four other files: &amp;#039;&amp;#039;NonIDF_Properties.py&amp;#039;&amp;#039;, &lt;br /&gt;
                               the input data &amp;#039;&amp;#039;PropertiesDescriptors.py&amp;#039;&amp;#039;, &amp;#039;&amp;#039;RunDescriptor.py&amp;#039;&amp;#039; and &amp;#039;&amp;#039;ReductionHelpers.py&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
These files contain small classes and functions helping to process various input parameters, namely:&lt;br /&gt;
&lt;br /&gt;
  &amp;#039;&amp;#039;ReductionHelpers.py&amp;#039;&amp;#039;  -- file containing range of helper functions and the class, which is automatically instantiated for the &amp;#039;&amp;#039;&amp;#039;Instrument_Parameters.xml&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
                           fields, which do not need complex behaviour (e.g. &amp;#039;&amp;#039;&amp;#039;load_monitors_with_workspace&amp;#039;&amp;#039;&amp;#039; &amp;#039;&amp;#039;&amp;#039;True&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;False&amp;#039;&amp;#039;&amp;#039;)&lt;br /&gt;
  &amp;#039;&amp;#039;NonIDF_Properties.py&amp;#039;&amp;#039; -- file containing classes (Property Descriptors in Python terms) which are not related to the properties found &lt;br /&gt;
                           in  &amp;#039;&amp;#039;&amp;#039;Instrument_Parameters.xml&amp;#039;&amp;#039;&amp;#039; file. (e.g. &amp;#039;&amp;#039;&amp;#039;incident_energy&amp;#039;&amp;#039;&amp;#039;)&lt;br /&gt;
  &amp;#039;&amp;#039;PropertiesDescriptors.py&amp;#039;&amp;#039; -- file, containing classes related to properties, described in &amp;#039;&amp;#039;&amp;#039;Instrument_Parameters.xml&amp;#039;&amp;#039;&amp;#039; but providing&lt;br /&gt;
                             more complex behaviour for such properties. E.g. &amp;#039;&amp;#039;&amp;#039;DetCalFile&amp;#039;&amp;#039;&amp;#039; class describes detector calibration file &amp;#039;&amp;#039;det_cal_file&amp;#039;&amp;#039; &lt;br /&gt;
                             &amp;#039;&amp;#039;&amp;#039;Instrument_Parameters.xml&amp;#039;&amp;#039;&amp;#039; but contains valiadators, used to check correct file extension and if the calibration file &lt;br /&gt;
                             is present.&lt;br /&gt;
  &amp;#039;&amp;#039;RunDescriptor.py&amp;#039;&amp;#039;    -- contains one but most important property, related to the reduced and auxiliary experimental data. It&amp;#039;s responsible for &lt;br /&gt;
                          conversion between run numbers and file names, loading appropriate files to Mantid to use in reduction, renaming workspaces&lt;br /&gt;
                          according to different stages of reduction process, etc.&lt;br /&gt;
&lt;br /&gt;
All these subclasses are instantiated by &amp;#039;&amp;#039;PropertyManager&amp;#039;&amp;#039; and &amp;#039;&amp;#039;PropertyManager&amp;#039;&amp;#039; is implemented as a singleton so any property instance can be accessed in reduction as:&lt;br /&gt;
   prop = PropertyManager.property_name&lt;br /&gt;
e.g.: &lt;br /&gt;
 is_multirep  = PropertyManager.incident_energy.multirep_mode()    &amp;quot;&amp;quot;&amp;quot;return true if energy is defined as list of energies or multirep m and false otherwise &amp;quot;&amp;quot;&amp;quot;&lt;/div&gt;</summary>
		<author><name>130.246.50.68</name></author>
	</entry>
	<entry>
		<id>http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=ISIS_direct_reduction_script_description.&amp;diff=212</id>
		<title>ISIS direct reduction script description.</title>
		<link rel="alternate" type="text/html" href="http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=ISIS_direct_reduction_script_description.&amp;diff=212"/>
		<updated>2016-03-09T19:52:10Z</updated>

		<summary type="html">&lt;p&gt;130.246.50.68: /* Reduction Scripts in Depth */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
All ISIS direct inelastic reduction scripts have similar interface and layout, with only parameters different for different instruments. Some parameters change from one cycle and sometimes one experiment to another but most of them are instrument specific and changes only when instrument is modified. &lt;br /&gt;
Instrument scientists prepare sample Mantid python reduction scripts, which are then automatically distributed to [http://isiscompute.nd.rl.ac.uk Isiscompute] users according to the rules described [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_sample_scripts_used_in_data_processing here].&lt;br /&gt;
&lt;br /&gt;
From the links below one can retrieve resent versions of these scripts and their default reduction parameters stored in XML files, namely:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;color:blue;&lt;br /&gt;
| Instrument&lt;br /&gt;
| Simple reduction script&lt;br /&gt;
| Full reduction script&lt;br /&gt;
| Default reduction parameters&lt;br /&gt;
| User Settings Description file&lt;br /&gt;
|-&lt;br /&gt;
| MARI: &lt;br /&gt;
|[https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/MARI/template_mari.py template_mari.py]&lt;br /&gt;
|[https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/MARI/MARIReduction_Sample.py MARIReduction_Sample.py]&lt;br /&gt;
|[https://github.com/mantidproject/mantid/blob/master/instrument/MARI_Parameters.xml MARI_Parameters.xml]&lt;br /&gt;
|[https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/MARI/USER_Files_description.xml MARI User settings ]&lt;br /&gt;
|-&lt;br /&gt;
| MAPS:&lt;br /&gt;
|[https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/MAPS/template_maps.py template_maps.py]&lt;br /&gt;
|[https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/MAPS/MAPSReduction_Sample.py MAPSReduction_Sample.py]&lt;br /&gt;
|[https://github.com/mantidproject/mantid/blob/master/instrument/MAPS_Parameters.xml MAPS_Parameters.xml]&lt;br /&gt;
|[https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/MAPS/USER_Files_description.xml MARI User settings]&lt;br /&gt;
|-&lt;br /&gt;
| MERLIN: &lt;br /&gt;
| ---&lt;br /&gt;
| [https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/MERLIN/MERLINReduction_Sample.py MERLINReduction_Sample.py]&lt;br /&gt;
| [https://github.com/mantidproject/mantid/blob/master/instrument/MERLIN_Parameters_after2013_4.xml MERLIN_Parameters.xml]&lt;br /&gt;
| [https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/MERLIN/USER_Files_description.xml MERLIN User settings] &lt;br /&gt;
|-&lt;br /&gt;
| LET: &lt;br /&gt;
| ---&lt;br /&gt;
| [https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/LET/LETReduction_Sample.py LETReduction_Sample.py]&lt;br /&gt;
| [https://github.com/mantidproject/mantid/blob/master/instrument/LET_Parameters_dr1to12.xml LET_Parameters.xml]&lt;br /&gt;
| [https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/LET/USER_Files_description.xml LET User settings]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;teplate_instrument_name.py&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;InstrumentReduction_Sample.py&amp;#039;&amp;#039;&amp;#039; files referenced in column two and three above are processed by [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/ISISDirecInelasticConfig.py MantidConfigurationScript], which replaces the strings, specified in correspondent &amp;#039;&amp;#039;User Settings Description&amp;#039;&amp;#039; file (Column 5)  and produces [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Automatic_user_configuration simple and full reduction scripts for users].&lt;br /&gt;
&lt;br /&gt;
Simple reduction script created for users who prefer old functional interface used by &amp;#039;&amp;#039;&amp;#039;[https://github.com/mantidproject/scriptrepository/tree/master/direct_inelastic/ISIS/qtiGenie qtiGenie]&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;Libisis&amp;#039;&amp;#039;&amp;#039;. It highlights only the parameters user needs to change during an experiment and allows users to separate all parameters, necessary to reduce data and user&amp;#039;s parameters in different files. User parameters are usually the &amp;#039;&amp;#039;run number&amp;#039;&amp;#039; or &amp;#039;&amp;#039;list of run numbers&amp;#039;&amp;#039; to process, run &amp;#039;&amp;#039;number for a white beam vanadium run&amp;#039;&amp;#039;, &amp;#039;&amp;#039;energies&amp;#039;&amp;#039; the user is interested in and &amp;#039;&amp;#039;energy binning&amp;#039;&amp;#039;. There are couple of other parameters, directly related to the experiment in progress. These parameters are better described in the script itself. &lt;br /&gt;
&lt;br /&gt;
Simple reduction script is then imports full reduction script, which sets up the parameters specific to a cycle and may be to an experiment. After that the advanced script picks up all other parameter&amp;#039;s default values from the appropriate &amp;#039;&amp;#039;xml&amp;#039;&amp;#039; file and runs the reduction algorithms itself. &lt;br /&gt;
&lt;br /&gt;
User may work directly with the full reduction script as this one has all necessary parameters which can then be fine tuned for particular runs in the &amp;#039;&amp;#039;&amp;#039;__main__&amp;#039;&amp;#039;&amp;#039; section of the script as described in the script. In fact, setting up small number of simple parameters in a separate script or setting up all parameters together in one big script is the matter of personal choice between using one big file with all parameters or two files with different sets of parameters. &lt;br /&gt;
&lt;br /&gt;
For instruments, where simple reduction script is present, user can find the &amp;#039;&amp;#039;&amp;#039;iliad&amp;#039;&amp;#039;&amp;#039; function, used by the simple reduction script inside the advanced reduction script.&lt;br /&gt;
&lt;br /&gt;
== Reduction Scripts in Depth ==&lt;br /&gt;
This chapter intended for advanced users or instrument scientists who wants to modify reduction scripts and add some new features to them.&lt;br /&gt;
&lt;br /&gt;
ISIS reduction scripts are part of Mantid and located under Mantid installation folder in &amp;#039;&amp;#039;/scripts/Inelastic/Direct&amp;#039;&amp;#039; directory (&amp;#039;&amp;#039;/opt/Mantid/scripts/Inelastic/Direct&amp;#039;&amp;#039; on Unix, &amp;#039;&amp;#039;c:\Mantid\scripts\Inelastic\Direct&amp;#039;&amp;#039; under Windows or see it on the web [https://github.com/mantidproject/mantid/tree/master/scripts/Inelastic/Direct here])&lt;br /&gt;
&lt;br /&gt;
In Direct folder the following important files can be found:&lt;br /&gt;
&lt;br /&gt;
 &amp;#039;&amp;#039;DirectEnergyConversion.py&amp;#039;&amp;#039;  -- The python class implementing ISIS direct inelastic reduction workflow. Its most important method is &amp;#039;&amp;#039;&amp;#039;convert_to_energy&amp;#039;&amp;#039;&amp;#039; method,&lt;br /&gt;
                               invoked for each  run or sum of runs, and converting data, obtained in experiment into reduced data. All other methods of this&lt;br /&gt;
                                class are directly or indirectly called by this method.&lt;br /&gt;
 &amp;#039;&amp;#039;PropertyManager.py&amp;#039;&amp;#039;         -- The python class, responsible for processing user input, Instrument parameter files described above and other properties, attached to &lt;br /&gt;
                               and providing these data to &amp;#039;&amp;#039;DirectEnergyConversion&amp;#039;&amp;#039;. This class instantiates four other files: &amp;#039;&amp;#039;NonIDF_Properties.py&amp;#039;&amp;#039;, &lt;br /&gt;
                               the input data &amp;#039;&amp;#039;PropertiesDescriptors.py&amp;#039;&amp;#039;, &amp;#039;&amp;#039;RunDescriptor.py&amp;#039;&amp;#039; and &amp;#039;&amp;#039;ReductionHelpers.py&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
These files contain small classes and functions helping to process various input parameters, namely:&lt;br /&gt;
&lt;br /&gt;
  &amp;#039;&amp;#039;ReductionHelpers.py&amp;#039;&amp;#039;  -- file containing range of helper functions and the class, which is automatically instantiated for the &amp;#039;&amp;#039;&amp;#039;Instrument_Parameters.xml&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
                              fields, which do not need complex behaviour (e.g. &amp;#039;&amp;#039;&amp;#039;load_monitors_with_workspace&amp;#039;&amp;#039;&amp;#039; &amp;#039;&amp;#039;&amp;#039;True&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;False&amp;#039;&amp;#039;&amp;#039;)&lt;br /&gt;
  &amp;#039;&amp;#039;NonIDF_Properties.py&amp;#039;&amp;#039; -- file containing classes (Property Descriptors in Python terms) which are not related to the properties found &lt;br /&gt;
                              in  &amp;#039;&amp;#039;&amp;#039;Instrument_Parameters.xml&amp;#039;&amp;#039;&amp;#039; file. (e.g. &amp;#039;&amp;#039;&amp;#039;incident_energy&amp;#039;&amp;#039;&amp;#039;)&lt;br /&gt;
  &amp;#039;&amp;#039;PropertiesDescriptors.py&amp;#039;&amp;#039; -- file, containing classes related to properties, described in &amp;#039;&amp;#039;&amp;#039;Instrument_Parameters.xml&amp;#039;&amp;#039;&amp;#039; but providing&lt;br /&gt;
                                  more complex behaviour for such properties. E.g. &amp;#039;&amp;#039;&amp;#039;DetCalFile&amp;#039;&amp;#039;&amp;#039; class describes detector calibration file &amp;#039;&amp;#039;det_cal_file&amp;#039;&amp;#039; &lt;br /&gt;
                                  &amp;#039;&amp;#039;&amp;#039;Instrument_Parameters.xml&amp;#039;&amp;#039;&amp;#039; but contains valiadators, used to check correct file extension and if the calibration file &lt;br /&gt;
                                 is present.&lt;br /&gt;
  &amp;#039;&amp;#039;RunDescriptor.py&amp;#039;&amp;#039;    -- contains one but most important property, related to the reduced and auxiliary experimental data. It&amp;#039;s responsible for &lt;br /&gt;
                             conversion between run numbers and file names, loading appropriate files to Mantid to use in reduction, renaming workspaces&lt;br /&gt;
                             according to different stages of reduction process, etc.&lt;br /&gt;
&lt;br /&gt;
All these subclasses are instantiated by &amp;#039;&amp;#039;PropertyManager&amp;#039;&amp;#039; and &amp;#039;&amp;#039;PropertyManager&amp;#039;&amp;#039; is implemented as a singleton so any property instance can be accessed in reduction as:&lt;br /&gt;
   prop = PropertyManager.property_name&lt;br /&gt;
e.g. &lt;br /&gt;
&lt;br /&gt;
  energy =&lt;/div&gt;</summary>
		<author><name>130.246.50.68</name></author>
	</entry>
	<entry>
		<id>http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=ISIS_direct_reduction_script_description.&amp;diff=211</id>
		<title>ISIS direct reduction script description.</title>
		<link rel="alternate" type="text/html" href="http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=ISIS_direct_reduction_script_description.&amp;diff=211"/>
		<updated>2016-03-09T19:51:10Z</updated>

		<summary type="html">&lt;p&gt;130.246.50.68: /* Reduction Scripts in Depth */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
All ISIS direct inelastic reduction scripts have similar interface and layout, with only parameters different for different instruments. Some parameters change from one cycle and sometimes one experiment to another but most of them are instrument specific and changes only when instrument is modified. &lt;br /&gt;
Instrument scientists prepare sample Mantid python reduction scripts, which are then automatically distributed to [http://isiscompute.nd.rl.ac.uk Isiscompute] users according to the rules described [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_sample_scripts_used_in_data_processing here].&lt;br /&gt;
&lt;br /&gt;
From the links below one can retrieve resent versions of these scripts and their default reduction parameters stored in XML files, namely:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;color:blue;&lt;br /&gt;
| Instrument&lt;br /&gt;
| Simple reduction script&lt;br /&gt;
| Full reduction script&lt;br /&gt;
| Default reduction parameters&lt;br /&gt;
| User Settings Description file&lt;br /&gt;
|-&lt;br /&gt;
| MARI: &lt;br /&gt;
|[https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/MARI/template_mari.py template_mari.py]&lt;br /&gt;
|[https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/MARI/MARIReduction_Sample.py MARIReduction_Sample.py]&lt;br /&gt;
|[https://github.com/mantidproject/mantid/blob/master/instrument/MARI_Parameters.xml MARI_Parameters.xml]&lt;br /&gt;
|[https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/MARI/USER_Files_description.xml MARI User settings ]&lt;br /&gt;
|-&lt;br /&gt;
| MAPS:&lt;br /&gt;
|[https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/MAPS/template_maps.py template_maps.py]&lt;br /&gt;
|[https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/MAPS/MAPSReduction_Sample.py MAPSReduction_Sample.py]&lt;br /&gt;
|[https://github.com/mantidproject/mantid/blob/master/instrument/MAPS_Parameters.xml MAPS_Parameters.xml]&lt;br /&gt;
|[https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/MAPS/USER_Files_description.xml MARI User settings]&lt;br /&gt;
|-&lt;br /&gt;
| MERLIN: &lt;br /&gt;
| ---&lt;br /&gt;
| [https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/MERLIN/MERLINReduction_Sample.py MERLINReduction_Sample.py]&lt;br /&gt;
| [https://github.com/mantidproject/mantid/blob/master/instrument/MERLIN_Parameters_after2013_4.xml MERLIN_Parameters.xml]&lt;br /&gt;
| [https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/MERLIN/USER_Files_description.xml MERLIN User settings] &lt;br /&gt;
|-&lt;br /&gt;
| LET: &lt;br /&gt;
| ---&lt;br /&gt;
| [https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/LET/LETReduction_Sample.py LETReduction_Sample.py]&lt;br /&gt;
| [https://github.com/mantidproject/mantid/blob/master/instrument/LET_Parameters_dr1to12.xml LET_Parameters.xml]&lt;br /&gt;
| [https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/LET/USER_Files_description.xml LET User settings]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;teplate_instrument_name.py&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;InstrumentReduction_Sample.py&amp;#039;&amp;#039;&amp;#039; files referenced in column two and three above are processed by [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/ISISDirecInelasticConfig.py MantidConfigurationScript], which replaces the strings, specified in correspondent &amp;#039;&amp;#039;User Settings Description&amp;#039;&amp;#039; file (Column 5)  and produces [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Automatic_user_configuration simple and full reduction scripts for users].&lt;br /&gt;
&lt;br /&gt;
Simple reduction script created for users who prefer old functional interface used by &amp;#039;&amp;#039;&amp;#039;[https://github.com/mantidproject/scriptrepository/tree/master/direct_inelastic/ISIS/qtiGenie qtiGenie]&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;Libisis&amp;#039;&amp;#039;&amp;#039;. It highlights only the parameters user needs to change during an experiment and allows users to separate all parameters, necessary to reduce data and user&amp;#039;s parameters in different files. User parameters are usually the &amp;#039;&amp;#039;run number&amp;#039;&amp;#039; or &amp;#039;&amp;#039;list of run numbers&amp;#039;&amp;#039; to process, run &amp;#039;&amp;#039;number for a white beam vanadium run&amp;#039;&amp;#039;, &amp;#039;&amp;#039;energies&amp;#039;&amp;#039; the user is interested in and &amp;#039;&amp;#039;energy binning&amp;#039;&amp;#039;. There are couple of other parameters, directly related to the experiment in progress. These parameters are better described in the script itself. &lt;br /&gt;
&lt;br /&gt;
Simple reduction script is then imports full reduction script, which sets up the parameters specific to a cycle and may be to an experiment. After that the advanced script picks up all other parameter&amp;#039;s default values from the appropriate &amp;#039;&amp;#039;xml&amp;#039;&amp;#039; file and runs the reduction algorithms itself. &lt;br /&gt;
&lt;br /&gt;
User may work directly with the full reduction script as this one has all necessary parameters which can then be fine tuned for particular runs in the &amp;#039;&amp;#039;&amp;#039;__main__&amp;#039;&amp;#039;&amp;#039; section of the script as described in the script. In fact, setting up small number of simple parameters in a separate script or setting up all parameters together in one big script is the matter of personal choice between using one big file with all parameters or two files with different sets of parameters. &lt;br /&gt;
&lt;br /&gt;
For instruments, where simple reduction script is present, user can find the &amp;#039;&amp;#039;&amp;#039;iliad&amp;#039;&amp;#039;&amp;#039; function, used by the simple reduction script inside the advanced reduction script.&lt;br /&gt;
&lt;br /&gt;
== Reduction Scripts in Depth ==&lt;br /&gt;
This chapter intended for advanced users or instrument scientists who wants to modify reduction scripts and add some new features to them.&lt;br /&gt;
&lt;br /&gt;
ISIS reduction scripts are part of Mantid and located under Mantid installation folder in &amp;#039;&amp;#039;/scripts/Inelastic/Direct&amp;#039;&amp;#039; directory (&amp;#039;&amp;#039;/opt/Mantid/scripts/Inelastic/Direct&amp;#039;&amp;#039; on Unix, &amp;#039;&amp;#039;c:\Mantid\scripts\Inelastic\Direct&amp;#039;&amp;#039; under Windows or see it on the web [https://github.com/mantidproject/mantid/tree/master/scripts/Inelastic/Direct here])&lt;br /&gt;
&lt;br /&gt;
In Direct folder the following important files can be found:&lt;br /&gt;
&lt;br /&gt;
 &amp;#039;&amp;#039;DirectEnergyConversion.py&amp;#039;&amp;#039;  -- The python class implementing ISIS direct inelastic reduction workflow. Its most important method is &amp;#039;&amp;#039;&amp;#039;convert_to_energy&amp;#039;&amp;#039;&amp;#039; method,&lt;br /&gt;
                               invoked for each  run or sum of runs, and converting data, obtained in experiment into reduced data. All other methods of this&lt;br /&gt;
                                class are directly or indirectly called by this method.&lt;br /&gt;
 &amp;#039;&amp;#039;PropertyManager.py&amp;#039;&amp;#039;         -- The python class, responsible for processing user input, Instrument parameter files described above and other properties, attached to &lt;br /&gt;
                               and providing these data to &amp;#039;&amp;#039;DirectEnergyConversion&amp;#039;&amp;#039;. This class instantiates four other files: &amp;#039;&amp;#039;NonIDF_Properties.py&amp;#039;&amp;#039;, &lt;br /&gt;
                               the input data &amp;#039;&amp;#039;PropertiesDescriptors.py&amp;#039;&amp;#039;, &amp;#039;&amp;#039;RunDescriptor.py&amp;#039;&amp;#039; and &amp;#039;&amp;#039;ReductionHelpers.py&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
These files contain small classes and functions to helping to process various input parameters, namely&lt;br /&gt;
&lt;br /&gt;
  &amp;#039;&amp;#039;ReductionHelpers.py&amp;#039;&amp;#039;  -- file containing range of helper functions and the class, which is automatically instantiated for the &amp;#039;&amp;#039;&amp;#039;Instrument_Parameters.xml&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
                              fields, which do not need complex behaviour (e.g. &amp;#039;&amp;#039;&amp;#039;load_monitors_with_workspace&amp;#039;&amp;#039;&amp;#039; &amp;#039;&amp;#039;&amp;#039;True&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;False&amp;#039;&amp;#039;&amp;#039;)&lt;br /&gt;
  &amp;#039;&amp;#039;NonIDF_Properties.py&amp;#039;&amp;#039; -- file containing classes (Property Descriptors in Python terms) which are not related to the properties found &lt;br /&gt;
                              in  &amp;#039;&amp;#039;&amp;#039;Instrument_Parameters.xml&amp;#039;&amp;#039;&amp;#039; file. (e.g. &amp;#039;&amp;#039;&amp;#039;incident_energy&amp;#039;&amp;#039;&amp;#039;)&lt;br /&gt;
  &amp;#039;&amp;#039;PropertiesDescriptors.py&amp;#039;&amp;#039; -- file, containing classes related to properties, described in &amp;#039;&amp;#039;&amp;#039;Instrument_Parameters.xml&amp;#039;&amp;#039;&amp;#039; but providing&lt;br /&gt;
                                  more complex behaviour for such properties. E.g. &amp;#039;&amp;#039;&amp;#039;DetCalFile&amp;#039;&amp;#039;&amp;#039; class describes detector calibration file &amp;#039;&amp;#039;det_cal_file&amp;#039;&amp;#039; &lt;br /&gt;
                                  &amp;#039;&amp;#039;&amp;#039;Instrument_Parameters.xml&amp;#039;&amp;#039;&amp;#039; but contains valiadators, used to check correct file extension and if the calibration file &lt;br /&gt;
                                 is present.&lt;br /&gt;
  &amp;#039;&amp;#039;RunDescriptor.py&amp;#039;&amp;#039;    -- contains one but most important property, related to the reduced and auxiliary experimental data. It&amp;#039;s responsible for &lt;br /&gt;
                             conversion between run numbers and file names, loading appropriate files to Mantid to use in reduction, renaming workspaces&lt;br /&gt;
                             according to different stages of reduction process, etc.&lt;br /&gt;
&lt;br /&gt;
All these subclasses are instantiated by &amp;#039;&amp;#039;PropertyManager&amp;#039;&amp;#039; and &amp;#039;&amp;#039;PropertyManager&amp;#039;&amp;#039; is implemented as a singleton so any property instance can be accessed in reduction as:&lt;br /&gt;
   prop = PropertyManager.property_name&lt;br /&gt;
e.g. &lt;br /&gt;
&lt;br /&gt;
  energy =&lt;/div&gt;</summary>
		<author><name>130.246.50.68</name></author>
	</entry>
	<entry>
		<id>http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=ISIS_direct_reduction_script_description.&amp;diff=210</id>
		<title>ISIS direct reduction script description.</title>
		<link rel="alternate" type="text/html" href="http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=ISIS_direct_reduction_script_description.&amp;diff=210"/>
		<updated>2016-03-09T19:29:04Z</updated>

		<summary type="html">&lt;p&gt;130.246.50.68: /* Reduction Scripts in Depth */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
All ISIS direct inelastic reduction scripts have similar interface and layout, with only parameters different for different instruments. Some parameters change from one cycle and sometimes one experiment to another but most of them are instrument specific and changes only when instrument is modified. &lt;br /&gt;
Instrument scientists prepare sample Mantid python reduction scripts, which are then automatically distributed to [http://isiscompute.nd.rl.ac.uk Isiscompute] users according to the rules described [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_sample_scripts_used_in_data_processing here].&lt;br /&gt;
&lt;br /&gt;
From the links below one can retrieve resent versions of these scripts and their default reduction parameters stored in XML files, namely:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;color:blue;&lt;br /&gt;
| Instrument&lt;br /&gt;
| Simple reduction script&lt;br /&gt;
| Full reduction script&lt;br /&gt;
| Default reduction parameters&lt;br /&gt;
| User Settings Description file&lt;br /&gt;
|-&lt;br /&gt;
| MARI: &lt;br /&gt;
|[https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/MARI/template_mari.py template_mari.py]&lt;br /&gt;
|[https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/MARI/MARIReduction_Sample.py MARIReduction_Sample.py]&lt;br /&gt;
|[https://github.com/mantidproject/mantid/blob/master/instrument/MARI_Parameters.xml MARI_Parameters.xml]&lt;br /&gt;
|[https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/MARI/USER_Files_description.xml MARI User settings ]&lt;br /&gt;
|-&lt;br /&gt;
| MAPS:&lt;br /&gt;
|[https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/MAPS/template_maps.py template_maps.py]&lt;br /&gt;
|[https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/MAPS/MAPSReduction_Sample.py MAPSReduction_Sample.py]&lt;br /&gt;
|[https://github.com/mantidproject/mantid/blob/master/instrument/MAPS_Parameters.xml MAPS_Parameters.xml]&lt;br /&gt;
|[https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/MAPS/USER_Files_description.xml MARI User settings]&lt;br /&gt;
|-&lt;br /&gt;
| MERLIN: &lt;br /&gt;
| ---&lt;br /&gt;
| [https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/MERLIN/MERLINReduction_Sample.py MERLINReduction_Sample.py]&lt;br /&gt;
| [https://github.com/mantidproject/mantid/blob/master/instrument/MERLIN_Parameters_after2013_4.xml MERLIN_Parameters.xml]&lt;br /&gt;
| [https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/MERLIN/USER_Files_description.xml MERLIN User settings] &lt;br /&gt;
|-&lt;br /&gt;
| LET: &lt;br /&gt;
| ---&lt;br /&gt;
| [https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/LET/LETReduction_Sample.py LETReduction_Sample.py]&lt;br /&gt;
| [https://github.com/mantidproject/mantid/blob/master/instrument/LET_Parameters_dr1to12.xml LET_Parameters.xml]&lt;br /&gt;
| [https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/LET/USER_Files_description.xml LET User settings]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;teplate_instrument_name.py&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;InstrumentReduction_Sample.py&amp;#039;&amp;#039;&amp;#039; files referenced in column two and three above are processed by [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/ISISDirecInelasticConfig.py MantidConfigurationScript], which replaces the strings, specified in correspondent &amp;#039;&amp;#039;User Settings Description&amp;#039;&amp;#039; file (Column 5)  and produces [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Automatic_user_configuration simple and full reduction scripts for users].&lt;br /&gt;
&lt;br /&gt;
Simple reduction script created for users who prefer old functional interface used by &amp;#039;&amp;#039;&amp;#039;[https://github.com/mantidproject/scriptrepository/tree/master/direct_inelastic/ISIS/qtiGenie qtiGenie]&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;Libisis&amp;#039;&amp;#039;&amp;#039;. It highlights only the parameters user needs to change during an experiment and allows users to separate all parameters, necessary to reduce data and user&amp;#039;s parameters in different files. User parameters are usually the &amp;#039;&amp;#039;run number&amp;#039;&amp;#039; or &amp;#039;&amp;#039;list of run numbers&amp;#039;&amp;#039; to process, run &amp;#039;&amp;#039;number for a white beam vanadium run&amp;#039;&amp;#039;, &amp;#039;&amp;#039;energies&amp;#039;&amp;#039; the user is interested in and &amp;#039;&amp;#039;energy binning&amp;#039;&amp;#039;. There are couple of other parameters, directly related to the experiment in progress. These parameters are better described in the script itself. &lt;br /&gt;
&lt;br /&gt;
Simple reduction script is then imports full reduction script, which sets up the parameters specific to a cycle and may be to an experiment. After that the advanced script picks up all other parameter&amp;#039;s default values from the appropriate &amp;#039;&amp;#039;xml&amp;#039;&amp;#039; file and runs the reduction algorithms itself. &lt;br /&gt;
&lt;br /&gt;
User may work directly with the full reduction script as this one has all necessary parameters which can then be fine tuned for particular runs in the &amp;#039;&amp;#039;&amp;#039;__main__&amp;#039;&amp;#039;&amp;#039; section of the script as described in the script. In fact, setting up small number of simple parameters in a separate script or setting up all parameters together in one big script is the matter of personal choice between using one big file with all parameters or two files with different sets of parameters. &lt;br /&gt;
&lt;br /&gt;
For instruments, where simple reduction script is present, user can find the &amp;#039;&amp;#039;&amp;#039;iliad&amp;#039;&amp;#039;&amp;#039; function, used by the simple reduction script inside the advanced reduction script.&lt;br /&gt;
&lt;br /&gt;
== Reduction Scripts in Depth ==&lt;br /&gt;
This chapter intended for advanced users or instrument scientists who wants to modify reduction scripts and add some new features to them.&lt;br /&gt;
&lt;br /&gt;
ISIS reduction scripts are part of Mantid and located under Mantid installation folder in &amp;#039;&amp;#039;/scripts/Inelastic/Direct&amp;#039;&amp;#039; directory (&amp;#039;&amp;#039;/opt/Mantid/scripts/Inelastic/Direct&amp;#039;&amp;#039; on Unix, &amp;#039;&amp;#039;c:\Mantid\scripts\Inelastic\Direct&amp;#039;&amp;#039; under Windows or see it on the web [https://github.com/mantidproject/mantid/tree/master/scripts/Inelastic/Direct here])&lt;br /&gt;
&lt;br /&gt;
In Direct folder the following important files can be found:&lt;br /&gt;
&lt;br /&gt;
 &amp;#039;&amp;#039;DirectEnergyConversion.py&amp;#039;&amp;#039;  -- The python class implementing ISIS direct inelastic reduction workflow. Its most important method is &amp;#039;&amp;#039;&amp;#039;convert_to_energy&amp;#039;&amp;#039;&amp;#039; method,&lt;br /&gt;
                               invoked for each  run or sum of runs, and converting data, obtained in experiment into reduced data. All other methods of this&lt;br /&gt;
                                class are directly or indirectly called by this method.&lt;br /&gt;
 &amp;#039;&amp;#039;PropertyManager.py&amp;#039;&amp;#039;         -- The python class, responsible for processing user input, Instrument parameter files described above and other properties, attached to &lt;br /&gt;
                               and providing these data to &amp;#039;&amp;#039;DirectEnergyConversion&amp;#039;&amp;#039;. This class instantiates four other files: &amp;#039;&amp;#039;NonIDF_Properties.py&amp;#039;&amp;#039;, &lt;br /&gt;
                               the input data &amp;#039;&amp;#039;PropertiesDescriptors.py&amp;#039;&amp;#039;, &amp;#039;&amp;#039;RunDescriptor.py&amp;#039;&amp;#039; and &amp;#039;&amp;#039;ReductionHelpers.py&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
These files contain small classes and functions to helping to process various input parameters, namely&lt;br /&gt;
&lt;br /&gt;
  &amp;#039;&amp;#039;ReductionHelpers.py&amp;#039;&amp;#039; -- class containing range of helper functions and the class, which is automatically instantiated for the &amp;#039;&amp;#039;&amp;#039;Instrument_Parameters.xml&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
                             fields, which do not need complex behaviour (e.g.&lt;/div&gt;</summary>
		<author><name>130.246.50.68</name></author>
	</entry>
	<entry>
		<id>http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=ISIS_direct_reduction_script_description.&amp;diff=209</id>
		<title>ISIS direct reduction script description.</title>
		<link rel="alternate" type="text/html" href="http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=ISIS_direct_reduction_script_description.&amp;diff=209"/>
		<updated>2016-03-09T19:03:07Z</updated>

		<summary type="html">&lt;p&gt;130.246.50.68: /* Reduction Script in Depth */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
All ISIS direct inelastic reduction scripts have similar interface and layout, with only parameters different for different instruments. Some parameters change from one cycle and sometimes one experiment to another but most of them are instrument specific and changes only when instrument is modified. &lt;br /&gt;
Instrument scientists prepare sample Mantid python reduction scripts, which are then automatically distributed to [http://isiscompute.nd.rl.ac.uk Isiscompute] users according to the rules described [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_sample_scripts_used_in_data_processing here].&lt;br /&gt;
&lt;br /&gt;
From the links below one can retrieve resent versions of these scripts and their default reduction parameters stored in XML files, namely:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;color:blue;&lt;br /&gt;
| Instrument&lt;br /&gt;
| Simple reduction script&lt;br /&gt;
| Full reduction script&lt;br /&gt;
| Default reduction parameters&lt;br /&gt;
| User Settings Description file&lt;br /&gt;
|-&lt;br /&gt;
| MARI: &lt;br /&gt;
|[https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/MARI/template_mari.py template_mari.py]&lt;br /&gt;
|[https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/MARI/MARIReduction_Sample.py MARIReduction_Sample.py]&lt;br /&gt;
|[https://github.com/mantidproject/mantid/blob/master/instrument/MARI_Parameters.xml MARI_Parameters.xml]&lt;br /&gt;
|[https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/MARI/USER_Files_description.xml MARI User settings ]&lt;br /&gt;
|-&lt;br /&gt;
| MAPS:&lt;br /&gt;
|[https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/MAPS/template_maps.py template_maps.py]&lt;br /&gt;
|[https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/MAPS/MAPSReduction_Sample.py MAPSReduction_Sample.py]&lt;br /&gt;
|[https://github.com/mantidproject/mantid/blob/master/instrument/MAPS_Parameters.xml MAPS_Parameters.xml]&lt;br /&gt;
|[https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/MAPS/USER_Files_description.xml MARI User settings]&lt;br /&gt;
|-&lt;br /&gt;
| MERLIN: &lt;br /&gt;
| ---&lt;br /&gt;
| [https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/MERLIN/MERLINReduction_Sample.py MERLINReduction_Sample.py]&lt;br /&gt;
| [https://github.com/mantidproject/mantid/blob/master/instrument/MERLIN_Parameters_after2013_4.xml MERLIN_Parameters.xml]&lt;br /&gt;
| [https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/MERLIN/USER_Files_description.xml MERLIN User settings] &lt;br /&gt;
|-&lt;br /&gt;
| LET: &lt;br /&gt;
| ---&lt;br /&gt;
| [https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/LET/LETReduction_Sample.py LETReduction_Sample.py]&lt;br /&gt;
| [https://github.com/mantidproject/mantid/blob/master/instrument/LET_Parameters_dr1to12.xml LET_Parameters.xml]&lt;br /&gt;
| [https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/LET/USER_Files_description.xml LET User settings]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;teplate_instrument_name.py&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;InstrumentReduction_Sample.py&amp;#039;&amp;#039;&amp;#039; files referenced in column two and three above are processed by [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/ISISDirecInelasticConfig.py MantidConfigurationScript], which replaces the strings, specified in correspondent &amp;#039;&amp;#039;User Settings Description&amp;#039;&amp;#039; file (Column 5)  and produces [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Automatic_user_configuration simple and full reduction scripts for users].&lt;br /&gt;
&lt;br /&gt;
Simple reduction script created for users who prefer old functional interface used by &amp;#039;&amp;#039;&amp;#039;[https://github.com/mantidproject/scriptrepository/tree/master/direct_inelastic/ISIS/qtiGenie qtiGenie]&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;Libisis&amp;#039;&amp;#039;&amp;#039;. It highlights only the parameters user needs to change during an experiment and allows users to separate all parameters, necessary to reduce data and user&amp;#039;s parameters in different files. User parameters are usually the &amp;#039;&amp;#039;run number&amp;#039;&amp;#039; or &amp;#039;&amp;#039;list of run numbers&amp;#039;&amp;#039; to process, run &amp;#039;&amp;#039;number for a white beam vanadium run&amp;#039;&amp;#039;, &amp;#039;&amp;#039;energies&amp;#039;&amp;#039; the user is interested in and &amp;#039;&amp;#039;energy binning&amp;#039;&amp;#039;. There are couple of other parameters, directly related to the experiment in progress. These parameters are better described in the script itself. &lt;br /&gt;
&lt;br /&gt;
Simple reduction script is then imports full reduction script, which sets up the parameters specific to a cycle and may be to an experiment. After that the advanced script picks up all other parameter&amp;#039;s default values from the appropriate &amp;#039;&amp;#039;xml&amp;#039;&amp;#039; file and runs the reduction algorithms itself. &lt;br /&gt;
&lt;br /&gt;
User may work directly with the full reduction script as this one has all necessary parameters which can then be fine tuned for particular runs in the &amp;#039;&amp;#039;&amp;#039;__main__&amp;#039;&amp;#039;&amp;#039; section of the script as described in the script. In fact, setting up small number of simple parameters in a separate script or setting up all parameters together in one big script is the matter of personal choice between using one big file with all parameters or two files with different sets of parameters. &lt;br /&gt;
&lt;br /&gt;
For instruments, where simple reduction script is present, user can find the &amp;#039;&amp;#039;&amp;#039;iliad&amp;#039;&amp;#039;&amp;#039; function, used by the simple reduction script inside the advanced reduction script.&lt;br /&gt;
&lt;br /&gt;
== Reduction Scripts in Depth ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ISIS reduction scripts are part of Mantid and located under Mantid installation folder in &amp;#039;&amp;#039;/scripts/Inelastic/Direct&amp;#039;&amp;#039; directory (&amp;#039;&amp;#039;/opt/Mantid/scripts/Inelastic/Direct&amp;#039;&amp;#039; on Unix, &amp;#039;&amp;#039;c:\Mantid\scripts\Inelastic\Direct&amp;#039;&amp;#039; under Windows or see it on the web [https://github.com/mantidproject/mantid/tree/master/scripts/Inelastic/Direct here])&lt;/div&gt;</summary>
		<author><name>130.246.50.68</name></author>
	</entry>
	<entry>
		<id>http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=ISIS_direct_reduction_script_description.&amp;diff=208</id>
		<title>ISIS direct reduction script description.</title>
		<link rel="alternate" type="text/html" href="http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=ISIS_direct_reduction_script_description.&amp;diff=208"/>
		<updated>2016-03-09T19:01:35Z</updated>

		<summary type="html">&lt;p&gt;130.246.50.68: /* Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
All ISIS direct inelastic reduction scripts have similar interface and layout, with only parameters different for different instruments. Some parameters change from one cycle and sometimes one experiment to another but most of them are instrument specific and changes only when instrument is modified. &lt;br /&gt;
Instrument scientists prepare sample Mantid python reduction scripts, which are then automatically distributed to [http://isiscompute.nd.rl.ac.uk Isiscompute] users according to the rules described [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_sample_scripts_used_in_data_processing here].&lt;br /&gt;
&lt;br /&gt;
From the links below one can retrieve resent versions of these scripts and their default reduction parameters stored in XML files, namely:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;color:blue;&lt;br /&gt;
| Instrument&lt;br /&gt;
| Simple reduction script&lt;br /&gt;
| Full reduction script&lt;br /&gt;
| Default reduction parameters&lt;br /&gt;
| User Settings Description file&lt;br /&gt;
|-&lt;br /&gt;
| MARI: &lt;br /&gt;
|[https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/MARI/template_mari.py template_mari.py]&lt;br /&gt;
|[https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/MARI/MARIReduction_Sample.py MARIReduction_Sample.py]&lt;br /&gt;
|[https://github.com/mantidproject/mantid/blob/master/instrument/MARI_Parameters.xml MARI_Parameters.xml]&lt;br /&gt;
|[https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/MARI/USER_Files_description.xml MARI User settings ]&lt;br /&gt;
|-&lt;br /&gt;
| MAPS:&lt;br /&gt;
|[https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/MAPS/template_maps.py template_maps.py]&lt;br /&gt;
|[https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/MAPS/MAPSReduction_Sample.py MAPSReduction_Sample.py]&lt;br /&gt;
|[https://github.com/mantidproject/mantid/blob/master/instrument/MAPS_Parameters.xml MAPS_Parameters.xml]&lt;br /&gt;
|[https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/MAPS/USER_Files_description.xml MARI User settings]&lt;br /&gt;
|-&lt;br /&gt;
| MERLIN: &lt;br /&gt;
| ---&lt;br /&gt;
| [https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/MERLIN/MERLINReduction_Sample.py MERLINReduction_Sample.py]&lt;br /&gt;
| [https://github.com/mantidproject/mantid/blob/master/instrument/MERLIN_Parameters_after2013_4.xml MERLIN_Parameters.xml]&lt;br /&gt;
| [https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/MERLIN/USER_Files_description.xml MERLIN User settings] &lt;br /&gt;
|-&lt;br /&gt;
| LET: &lt;br /&gt;
| ---&lt;br /&gt;
| [https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/LET/LETReduction_Sample.py LETReduction_Sample.py]&lt;br /&gt;
| [https://github.com/mantidproject/mantid/blob/master/instrument/LET_Parameters_dr1to12.xml LET_Parameters.xml]&lt;br /&gt;
| [https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/LET/USER_Files_description.xml LET User settings]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;teplate_instrument_name.py&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;InstrumentReduction_Sample.py&amp;#039;&amp;#039;&amp;#039; files referenced in column two and three above are processed by [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/ISISDirecInelasticConfig.py MantidConfigurationScript], which replaces the strings, specified in correspondent &amp;#039;&amp;#039;User Settings Description&amp;#039;&amp;#039; file (Column 5)  and produces [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Automatic_user_configuration simple and full reduction scripts for users].&lt;br /&gt;
&lt;br /&gt;
Simple reduction script created for users who prefer old functional interface used by &amp;#039;&amp;#039;&amp;#039;[https://github.com/mantidproject/scriptrepository/tree/master/direct_inelastic/ISIS/qtiGenie qtiGenie]&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;Libisis&amp;#039;&amp;#039;&amp;#039;. It highlights only the parameters user needs to change during an experiment and allows users to separate all parameters, necessary to reduce data and user&amp;#039;s parameters in different files. User parameters are usually the &amp;#039;&amp;#039;run number&amp;#039;&amp;#039; or &amp;#039;&amp;#039;list of run numbers&amp;#039;&amp;#039; to process, run &amp;#039;&amp;#039;number for a white beam vanadium run&amp;#039;&amp;#039;, &amp;#039;&amp;#039;energies&amp;#039;&amp;#039; the user is interested in and &amp;#039;&amp;#039;energy binning&amp;#039;&amp;#039;. There are couple of other parameters, directly related to the experiment in progress. These parameters are better described in the script itself. &lt;br /&gt;
&lt;br /&gt;
Simple reduction script is then imports full reduction script, which sets up the parameters specific to a cycle and may be to an experiment. After that the advanced script picks up all other parameter&amp;#039;s default values from the appropriate &amp;#039;&amp;#039;xml&amp;#039;&amp;#039; file and runs the reduction algorithms itself. &lt;br /&gt;
&lt;br /&gt;
User may work directly with the full reduction script as this one has all necessary parameters which can then be fine tuned for particular runs in the &amp;#039;&amp;#039;&amp;#039;__main__&amp;#039;&amp;#039;&amp;#039; section of the script as described in the script. In fact, setting up small number of simple parameters in a separate script or setting up all parameters together in one big script is the matter of personal choice between using one big file with all parameters or two files with different sets of parameters. &lt;br /&gt;
&lt;br /&gt;
For instruments, where simple reduction script is present, user can find the &amp;#039;&amp;#039;&amp;#039;iliad&amp;#039;&amp;#039;&amp;#039; function, used by the simple reduction script inside the advanced reduction script.&lt;br /&gt;
&lt;br /&gt;
== Reduction Script in Depth ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ISIS reduction scripts are part of Mantid and located under Mantid installation folder in &amp;#039;&amp;#039;/scripts/Inelastic/Direct&amp;#039;&amp;#039; directory (&amp;#039;&amp;#039;/opt/Mantid/scripts/Inelastic/Direct&amp;#039;&amp;#039; on Unix, &amp;#039;&amp;#039;c:\Mantid\scripts\Inelastic\Direct&amp;#039;&amp;#039; under Windows or see it on the web [here])&lt;/div&gt;</summary>
		<author><name>130.246.50.68</name></author>
	</entry>
</feed>