<?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=Alex+Buts</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=Alex+Buts"/>
	<link rel="alternate" type="text/html" href="http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Special:Contributions/Alex_Buts"/>
	<updated>2026-05-12T18:44:17Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.13</generator>
	<entry>
		<id>http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Setting_up_Mantid,_Matlab_and_auxiliary_programs_to_process_results_of_inelastic_experiments.&amp;diff=409</id>
		<title>Setting up Mantid, Matlab and auxiliary programs to process results of inelastic experiments.</title>
		<link rel="alternate" type="text/html" href="http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Setting_up_Mantid,_Matlab_and_auxiliary_programs_to_process_results_of_inelastic_experiments.&amp;diff=409"/>
		<updated>2023-01-09T17:12:59Z</updated>

		<summary type="html">&lt;p&gt;Alex Buts: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here we provide description of the settings, used in ISIS to enable data reduction. The pages below can be used as reference for troubleshooting various problems with data reduction and also be useful for advanced users who wants to set up Matlab and Mantid on their local computers to process the results of experiments, performed in ISIS.&lt;br /&gt;
&lt;br /&gt;
* [[Experimental Data]]&lt;br /&gt;
* [[Instrument parameters and Instrument definitions]]&lt;br /&gt;
* [[Reduction scripts]]&lt;br /&gt;
* [[Using autoreduction]]&lt;br /&gt;
* [[Using Matlab and access to sample Matlab scripts]]&lt;br /&gt;
* [[Automatic user configuration]]&lt;/div&gt;</summary>
		<author><name>Alex Buts</name></author>
	</entry>
	<entry>
		<id>http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Automatic_user_configuration&amp;diff=408</id>
		<title>Automatic user configuration</title>
		<link rel="alternate" type="text/html" href="http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Automatic_user_configuration&amp;diff=408"/>
		<updated>2023-01-09T17:12:24Z</updated>

		<summary type="html">&lt;p&gt;Alex Buts: /* Historic Automatic user configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;On 01/01/2023 this information become outdated. [mailto:support@analysis.stfc.ac.uk IDAaaS Support Analysis team] is solely responsible for auto-configuring IDAaaS machines. The information below is remaining for references purposes and stating how it used to work in the past.&lt;br /&gt;
&lt;br /&gt;
== Historical automatic user configuration procedure ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When an experiment is approved and scheduled by instrument scientist, [http://www.isis.stfc.ac.uk/user-office/ User office] assigns a user with his/her federal ID, which allows user to access ISIS network including [https://isis.analysis.stfc.ac.uk/workspaces/ IDAaaS virtual machines] and provides appropriate information to [Catalog service], giving the user rights to access the data through the Catalog. &lt;br /&gt;
&lt;br /&gt;
At some stage, special [http://icatingest2.isis.cclrc.ac.uk/excitations.txt information file], which defines the participants of the experiments and the scientists who have access to the data of this experiment is placed on the [http://icatingest2.isis.cclrc.ac.uk/excitations.txt internal server] where it is accessed and automatically processed by [https://github.com/FITLinuxSupport/analysisscripts/blob/master/Build_Mantid_config.py issicompute configuration script]. The format of the file is .json and the sample contents is provided below.&lt;br /&gt;
&lt;br /&gt;
The automatic isiscompute configuration script runs twice a day on [https://isiscompute.nd.rl.ac.uk/nxwebplayer isiscompue server] processing the information file, creating user accounts and appropriate RB folders and giving users permissions to access their RB folders on the basis of the information file. [mailto:alex.buts@stfc.ac.uk Alex Buts] and [https://www.facilities.rl.ac.uk/itsupport/default.aspx FBU IT support] [mailto:FITServiceDesk@stfc.ac.uk FBU IT support (Jeffs Warren)] have access and can modify this script. At the final stage this script runs [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/ISISDirecInelasticConfig.py the Mantid configuration script for inelastic instruments], which configures each user&amp;#039;s Mantid to use appropriate [[Experimental Data]], [[Instrument parameters and Instrument definitions]], necessary to reduce experimental data. It also provides users with initial version of [[Reduction scripts]], which users should modify to their requests according to the [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/ISIS_direct_reduction_script_description. description], using help of their instrument scientist if necessary. [mailto:alex.buts@stfc.ac.uk Alex Buts] is responsible for maintaining this script.&lt;br /&gt;
&lt;br /&gt;
When initial [[Reduction scripts]] are copied to user&amp;#039;s RB folder from the [https://github.com/mantidproject/scriptrepository/tree/master/direct_inelastic Mantid Script Repository] sample folder, script date is set to the experiment start date and the time -- to the exact midnight of the start date. Configuration script running twice a day checks this date and if it does not changed, replaces the existing script with the script, found in the Mantid Script Repository sample folder. If somebody touched the copied script, its date and time changes and [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/ISISDirecInelasticConfig.py autoconfiguration script] stops replacing the file. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The diagram and the table below summarize the user creation workflow:&lt;br /&gt;
&lt;br /&gt;
[http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Setting_up_Mantid,_Matlab_and_auxiliary_programs_to_process_results_of_inelastic_experiments. Back to setting up Mantid]&lt;br /&gt;
&lt;br /&gt;
=== ISISOMPUTE User creation workflow ===&lt;br /&gt;
&lt;br /&gt;
[[File:UserConfigWorkflow.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
Less visual but more detailed description of the workflow is provided in the table below. The number of the row in the table corresponds to the number of the block in the diagram above.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;color:blue;&lt;br /&gt;
! Stage Num&lt;br /&gt;
! Input&lt;br /&gt;
! Frequency, Actor &amp;amp; Event&lt;br /&gt;
! Result&lt;br /&gt;
! Person responsible&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| --&lt;br /&gt;
| Two weeks before Cycle, Crhis closes archive on the previous cycle. Sets up new cycle&lt;br /&gt;
| Cycle Folders appear in the archive.&lt;br /&gt;
| Chris Moreton-Smith&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| ---&lt;br /&gt;
| Somebody from the team sets up new cycle for cataloguing data.&lt;br /&gt;
| Data are searchable through iCat.&lt;br /&gt;
| Tom Griffin&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Results of the review pannel &lt;br /&gt;
| On request, Instrument Scientists, schedules experiment in Scheduler application&lt;br /&gt;
| Input for scheduler script&lt;br /&gt;
| Instrument Scientist&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| e-mail to PI from 5.1, about experiment accepted&lt;br /&gt;
| Experimental team is added to visits system&lt;br /&gt;
| Input for scheduler scripts&lt;br /&gt;
| PI on accepted proposal&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| Results from 3 &amp;amp; 4&lt;br /&gt;
| Twice a day: &amp;#039;&amp;#039;&amp;#039;Scheduler&amp;#039;&amp;#039;&amp;#039; scripts runs processing inputs.&lt;br /&gt;
|&lt;br /&gt;
# Emails user office to create&amp;amp;renew FedID-s&lt;br /&gt;
# Generates [http://icatingest2.isis.cclrc.ac.uk/excitations.txt information file] containing RB number, Instrument, Cycle, visitors names &amp;amp; FedIDs&lt;br /&gt;
| Contact responsible from [mailto:isisdata@stfc.ac.uk data acquisition support group]&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| Output 5.1 from Scheduler script&lt;br /&gt;
| Create FedID &amp;amp; renew the old one&lt;br /&gt;
| &lt;br /&gt;
# User team as input for 5&lt;br /&gt;
# E-mails to users &lt;br /&gt;
| User&amp;#039;s office&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| Output 5.2 from Scheduler script&lt;br /&gt;
| Twice a day: [https://github.com/FITLinuxSupport/analysisscripts/blob/master/Build_Mantid_config.py issicompute configuration script]&lt;br /&gt;
| &lt;br /&gt;
# Creates RB folders, User folders, access rights, autoreduction configuration. &lt;br /&gt;
# Users got rights to log into isiscompute and access their experiment folders.&lt;br /&gt;
# Starts Mantid Configuration script (8) and provides it with information about FedID&amp;amp;instrument&amp;amp;RB number&lt;br /&gt;
| Jeff Warren &amp;amp; Alex Buts&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| 7.3 and contents of MantidConfig folders&lt;br /&gt;
| [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/ISISDirecInelasticConfig.py Mantid configuration script], started by  [https://github.com/FITLinuxSupport/analysisscripts/blob/master/Build_Mantid_config.py issicompute configuration script]&lt;br /&gt;
|  &lt;br /&gt;
# Mantid configured for first usage, [[Experimental Data]] and [[Instrument parameters and Instrument definitions]] data search path is set up and path to common inelastic script is configured.&lt;br /&gt;
# User scripts copied to users according their instruments and the contents of [https://github.com/mantidproject/scriptrepository/tree/master/direct_inelastic Mantid Users Script repository]&lt;br /&gt;
| Alex Buts&lt;br /&gt;
|-&lt;br /&gt;
| 9.&lt;br /&gt;
| Contents of [https://github.com/mantidproject/scriptrepository/tree/master/direct_inelastic Mantid Users Script repository] on the web. Contents of SVN servers on the web.&lt;br /&gt;
| Once an Hour: [https://github.com/FITLinuxSupport/analysisscripts/blob/master/UpdateSVN Inelastic data update script] pulls contents of the web repositories into files on isiscompute.&lt;br /&gt;
| [[Instrument parameters and Instrument definitions]] files in correspondent isiscompute folders are up-to date&lt;br /&gt;
| Jeff Warren &amp;amp; Alex Buts&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Setting_up_Mantid,_Matlab_and_auxiliary_programs_to_process_results_of_inelastic_experiments. Back to setting up Mantid]&lt;br /&gt;
&lt;br /&gt;
=== Extract from .json file defined users who has access to the data ===&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
 &amp;quot;Last Updated&amp;quot;: 20150413,&lt;br /&gt;
 &amp;quot;experiments&amp;quot;:&lt;br /&gt;
 [&lt;br /&gt;
   {&lt;br /&gt;
    &amp;quot;RbNumber&amp;quot;: &amp;quot;1234567&amp;quot;,&lt;br /&gt;
    &amp;quot;Instrument&amp;quot;: &amp;quot;MERLIN&amp;quot;,&lt;br /&gt;
    &amp;quot;Cycle&amp;quot;: &amp;quot;2013/4&amp;quot;,&lt;br /&gt;
    &amp;quot;StartDate&amp;quot;: &amp;quot;20131203&amp;quot;,&lt;br /&gt;
    &amp;quot;Permissions&amp;quot;: [&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;email&amp;quot;: &amp;quot;YYYY@stfc.ac.uk&amp;quot;,&lt;br /&gt;
        &amp;quot;fedid&amp;quot;: &amp;quot;XXXXX&amp;quot;&lt;br /&gt;
      },&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;email&amp;quot;: &amp;quot;warren.jeffs@stfc.ac.uk&amp;quot;,&lt;br /&gt;
        &amp;quot;fedid&amp;quot;: &amp;quot;gpq43739&amp;quot;&lt;br /&gt;
      },&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;email&amp;quot;: &amp;quot;alex.buts@stfc.ac.uk&amp;quot;,&lt;br /&gt;
        &amp;quot;fedid&amp;quot;: &amp;quot;wkc26243&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    ]&lt;br /&gt;
  },&lt;br /&gt;
  { &amp;quot;NEXT RB NUMBER&amp;quot;&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Setting_up_Mantid,_Matlab_and_auxiliary_programs_to_process_results_of_inelastic_experiments. Back to setting up Mantid]&lt;/div&gt;</summary>
		<author><name>Alex Buts</name></author>
	</entry>
	<entry>
		<id>http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Automatic_user_configuration&amp;diff=407</id>
		<title>Automatic user configuration</title>
		<link rel="alternate" type="text/html" href="http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Automatic_user_configuration&amp;diff=407"/>
		<updated>2023-01-09T17:11:54Z</updated>

		<summary type="html">&lt;p&gt;Alex Buts: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;On 01/01/2023 this information become outdated. [mailto:support@analysis.stfc.ac.uk IDAaaS Support Analysis team] is solely responsible for auto-configuring IDAaaS machines. The information below is remaining for references purposes and stating how it used to work in the past.&lt;br /&gt;
&lt;br /&gt;
== Historic Automatic user configuration ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When an experiment is approved and scheduled by instrument scientist, [http://www.isis.stfc.ac.uk/user-office/ User office] assigns a user with his/her federal ID, which allows user to access ISIS network including [https://isis.analysis.stfc.ac.uk/workspaces/ IDAaaS virtual machines] and provides appropriate information to [Catalog service], giving the user rights to access the data through the Catalog. &lt;br /&gt;
&lt;br /&gt;
At some stage, special [http://icatingest2.isis.cclrc.ac.uk/excitations.txt information file], which defines the participants of the experiments and the scientists who have access to the data of this experiment is placed on the [http://icatingest2.isis.cclrc.ac.uk/excitations.txt internal server] where it is accessed and automatically processed by [https://github.com/FITLinuxSupport/analysisscripts/blob/master/Build_Mantid_config.py issicompute configuration script]. The format of the file is .json and the sample contents is provided below.&lt;br /&gt;
&lt;br /&gt;
The automatic isiscompute configuration script runs twice a day on [https://isiscompute.nd.rl.ac.uk/nxwebplayer isiscompue server] processing the information file, creating user accounts and appropriate RB folders and giving users permissions to access their RB folders on the basis of the information file. [mailto:alex.buts@stfc.ac.uk Alex Buts] and [https://www.facilities.rl.ac.uk/itsupport/default.aspx FBU IT support] [mailto:FITServiceDesk@stfc.ac.uk FBU IT support (Jeffs Warren)] have access and can modify this script. At the final stage this script runs [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/ISISDirecInelasticConfig.py the Mantid configuration script for inelastic instruments], which configures each user&amp;#039;s Mantid to use appropriate [[Experimental Data]], [[Instrument parameters and Instrument definitions]], necessary to reduce experimental data. It also provides users with initial version of [[Reduction scripts]], which users should modify to their requests according to the [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/ISIS_direct_reduction_script_description. description], using help of their instrument scientist if necessary. [mailto:alex.buts@stfc.ac.uk Alex Buts] is responsible for maintaining this script.&lt;br /&gt;
&lt;br /&gt;
When initial [[Reduction scripts]] are copied to user&amp;#039;s RB folder from the [https://github.com/mantidproject/scriptrepository/tree/master/direct_inelastic Mantid Script Repository] sample folder, script date is set to the experiment start date and the time -- to the exact midnight of the start date. Configuration script running twice a day checks this date and if it does not changed, replaces the existing script with the script, found in the Mantid Script Repository sample folder. If somebody touched the copied script, its date and time changes and [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/ISISDirecInelasticConfig.py autoconfiguration script] stops replacing the file. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The diagram and the table below summarize the user creation workflow:&lt;br /&gt;
&lt;br /&gt;
[http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Setting_up_Mantid,_Matlab_and_auxiliary_programs_to_process_results_of_inelastic_experiments. Back to setting up Mantid]&lt;br /&gt;
&lt;br /&gt;
=== ISISOMPUTE User creation workflow ===&lt;br /&gt;
&lt;br /&gt;
[[File:UserConfigWorkflow.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
Less visual but more detailed description of the workflow is provided in the table below. The number of the row in the table corresponds to the number of the block in the diagram above.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;color:blue;&lt;br /&gt;
! Stage Num&lt;br /&gt;
! Input&lt;br /&gt;
! Frequency, Actor &amp;amp; Event&lt;br /&gt;
! Result&lt;br /&gt;
! Person responsible&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| --&lt;br /&gt;
| Two weeks before Cycle, Crhis closes archive on the previous cycle. Sets up new cycle&lt;br /&gt;
| Cycle Folders appear in the archive.&lt;br /&gt;
| Chris Moreton-Smith&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| ---&lt;br /&gt;
| Somebody from the team sets up new cycle for cataloguing data.&lt;br /&gt;
| Data are searchable through iCat.&lt;br /&gt;
| Tom Griffin&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Results of the review pannel &lt;br /&gt;
| On request, Instrument Scientists, schedules experiment in Scheduler application&lt;br /&gt;
| Input for scheduler script&lt;br /&gt;
| Instrument Scientist&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| e-mail to PI from 5.1, about experiment accepted&lt;br /&gt;
| Experimental team is added to visits system&lt;br /&gt;
| Input for scheduler scripts&lt;br /&gt;
| PI on accepted proposal&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| Results from 3 &amp;amp; 4&lt;br /&gt;
| Twice a day: &amp;#039;&amp;#039;&amp;#039;Scheduler&amp;#039;&amp;#039;&amp;#039; scripts runs processing inputs.&lt;br /&gt;
|&lt;br /&gt;
# Emails user office to create&amp;amp;renew FedID-s&lt;br /&gt;
# Generates [http://icatingest2.isis.cclrc.ac.uk/excitations.txt information file] containing RB number, Instrument, Cycle, visitors names &amp;amp; FedIDs&lt;br /&gt;
| Contact responsible from [mailto:isisdata@stfc.ac.uk data acquisition support group]&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| Output 5.1 from Scheduler script&lt;br /&gt;
| Create FedID &amp;amp; renew the old one&lt;br /&gt;
| &lt;br /&gt;
# User team as input for 5&lt;br /&gt;
# E-mails to users &lt;br /&gt;
| User&amp;#039;s office&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| Output 5.2 from Scheduler script&lt;br /&gt;
| Twice a day: [https://github.com/FITLinuxSupport/analysisscripts/blob/master/Build_Mantid_config.py issicompute configuration script]&lt;br /&gt;
| &lt;br /&gt;
# Creates RB folders, User folders, access rights, autoreduction configuration. &lt;br /&gt;
# Users got rights to log into isiscompute and access their experiment folders.&lt;br /&gt;
# Starts Mantid Configuration script (8) and provides it with information about FedID&amp;amp;instrument&amp;amp;RB number&lt;br /&gt;
| Jeff Warren &amp;amp; Alex Buts&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| 7.3 and contents of MantidConfig folders&lt;br /&gt;
| [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/ISISDirecInelasticConfig.py Mantid configuration script], started by  [https://github.com/FITLinuxSupport/analysisscripts/blob/master/Build_Mantid_config.py issicompute configuration script]&lt;br /&gt;
|  &lt;br /&gt;
# Mantid configured for first usage, [[Experimental Data]] and [[Instrument parameters and Instrument definitions]] data search path is set up and path to common inelastic script is configured.&lt;br /&gt;
# User scripts copied to users according their instruments and the contents of [https://github.com/mantidproject/scriptrepository/tree/master/direct_inelastic Mantid Users Script repository]&lt;br /&gt;
| Alex Buts&lt;br /&gt;
|-&lt;br /&gt;
| 9.&lt;br /&gt;
| Contents of [https://github.com/mantidproject/scriptrepository/tree/master/direct_inelastic Mantid Users Script repository] on the web. Contents of SVN servers on the web.&lt;br /&gt;
| Once an Hour: [https://github.com/FITLinuxSupport/analysisscripts/blob/master/UpdateSVN Inelastic data update script] pulls contents of the web repositories into files on isiscompute.&lt;br /&gt;
| [[Instrument parameters and Instrument definitions]] files in correspondent isiscompute folders are up-to date&lt;br /&gt;
| Jeff Warren &amp;amp; Alex Buts&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Setting_up_Mantid,_Matlab_and_auxiliary_programs_to_process_results_of_inelastic_experiments. Back to setting up Mantid]&lt;br /&gt;
&lt;br /&gt;
=== Extract from .json file defined users who has access to the data ===&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
 &amp;quot;Last Updated&amp;quot;: 20150413,&lt;br /&gt;
 &amp;quot;experiments&amp;quot;:&lt;br /&gt;
 [&lt;br /&gt;
   {&lt;br /&gt;
    &amp;quot;RbNumber&amp;quot;: &amp;quot;1234567&amp;quot;,&lt;br /&gt;
    &amp;quot;Instrument&amp;quot;: &amp;quot;MERLIN&amp;quot;,&lt;br /&gt;
    &amp;quot;Cycle&amp;quot;: &amp;quot;2013/4&amp;quot;,&lt;br /&gt;
    &amp;quot;StartDate&amp;quot;: &amp;quot;20131203&amp;quot;,&lt;br /&gt;
    &amp;quot;Permissions&amp;quot;: [&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;email&amp;quot;: &amp;quot;YYYY@stfc.ac.uk&amp;quot;,&lt;br /&gt;
        &amp;quot;fedid&amp;quot;: &amp;quot;XXXXX&amp;quot;&lt;br /&gt;
      },&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;email&amp;quot;: &amp;quot;warren.jeffs@stfc.ac.uk&amp;quot;,&lt;br /&gt;
        &amp;quot;fedid&amp;quot;: &amp;quot;gpq43739&amp;quot;&lt;br /&gt;
      },&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;email&amp;quot;: &amp;quot;alex.buts@stfc.ac.uk&amp;quot;,&lt;br /&gt;
        &amp;quot;fedid&amp;quot;: &amp;quot;wkc26243&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    ]&lt;br /&gt;
  },&lt;br /&gt;
  { &amp;quot;NEXT RB NUMBER&amp;quot;&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Setting_up_Mantid,_Matlab_and_auxiliary_programs_to_process_results_of_inelastic_experiments. Back to setting up Mantid]&lt;/div&gt;</summary>
		<author><name>Alex Buts</name></author>
	</entry>
	<entry>
		<id>http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Automatic_user_configuration&amp;diff=406</id>
		<title>Automatic user configuration</title>
		<link rel="alternate" type="text/html" href="http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Automatic_user_configuration&amp;diff=406"/>
		<updated>2023-01-09T17:11:29Z</updated>

		<summary type="html">&lt;p&gt;Alex Buts: /* Automatic user configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Automatic user configuration ==&lt;br /&gt;
&lt;br /&gt;
On 01/01/2023 this information become outdated. [mailto:support@analysis.stfc.ac.uk IDAaaS Support Analysis team] is solely responsible for auto-configuring IDAaaS machines. The information below is remaining for references purposes and stating how it used to work in the past.&lt;br /&gt;
&lt;br /&gt;
When an experiment is approved and scheduled by instrument scientist, [http://www.isis.stfc.ac.uk/user-office/ User office] assigns a user with his/her federal ID, which allows user to access ISIS network including [https://isis.analysis.stfc.ac.uk/workspaces/ IDAaaS virtual machines] and provides appropriate information to [Catalog service], giving the user rights to access the data through the Catalog. &lt;br /&gt;
&lt;br /&gt;
At some stage, special [http://icatingest2.isis.cclrc.ac.uk/excitations.txt information file], which defines the participants of the experiments and the scientists who have access to the data of this experiment is placed on the [http://icatingest2.isis.cclrc.ac.uk/excitations.txt internal server] where it is accessed and automatically processed by [https://github.com/FITLinuxSupport/analysisscripts/blob/master/Build_Mantid_config.py issicompute configuration script]. The format of the file is .json and the sample contents is provided below.&lt;br /&gt;
&lt;br /&gt;
The automatic isiscompute configuration script runs twice a day on [https://isiscompute.nd.rl.ac.uk/nxwebplayer isiscompue server] processing the information file, creating user accounts and appropriate RB folders and giving users permissions to access their RB folders on the basis of the information file. [mailto:alex.buts@stfc.ac.uk Alex Buts] and [https://www.facilities.rl.ac.uk/itsupport/default.aspx FBU IT support] [mailto:FITServiceDesk@stfc.ac.uk FBU IT support (Jeffs Warren)] have access and can modify this script. At the final stage this script runs [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/ISISDirecInelasticConfig.py the Mantid configuration script for inelastic instruments], which configures each user&amp;#039;s Mantid to use appropriate [[Experimental Data]], [[Instrument parameters and Instrument definitions]], necessary to reduce experimental data. It also provides users with initial version of [[Reduction scripts]], which users should modify to their requests according to the [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/ISIS_direct_reduction_script_description. description], using help of their instrument scientist if necessary. [mailto:alex.buts@stfc.ac.uk Alex Buts] is responsible for maintaining this script.&lt;br /&gt;
&lt;br /&gt;
When initial [[Reduction scripts]] are copied to user&amp;#039;s RB folder from the [https://github.com/mantidproject/scriptrepository/tree/master/direct_inelastic Mantid Script Repository] sample folder, script date is set to the experiment start date and the time -- to the exact midnight of the start date. Configuration script running twice a day checks this date and if it does not changed, replaces the existing script with the script, found in the Mantid Script Repository sample folder. If somebody touched the copied script, its date and time changes and [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/ISISDirecInelasticConfig.py autoconfiguration script] stops replacing the file. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The diagram and the table below summarize the user creation workflow:&lt;br /&gt;
&lt;br /&gt;
[http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Setting_up_Mantid,_Matlab_and_auxiliary_programs_to_process_results_of_inelastic_experiments. Back to setting up Mantid]&lt;br /&gt;
&lt;br /&gt;
=== ISISOMPUTE User creation workflow ===&lt;br /&gt;
&lt;br /&gt;
[[File:UserConfigWorkflow.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
Less visual but more detailed description of the workflow is provided in the table below. The number of the row in the table corresponds to the number of the block in the diagram above.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;color:blue;&lt;br /&gt;
! Stage Num&lt;br /&gt;
! Input&lt;br /&gt;
! Frequency, Actor &amp;amp; Event&lt;br /&gt;
! Result&lt;br /&gt;
! Person responsible&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| --&lt;br /&gt;
| Two weeks before Cycle, Crhis closes archive on the previous cycle. Sets up new cycle&lt;br /&gt;
| Cycle Folders appear in the archive.&lt;br /&gt;
| Chris Moreton-Smith&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| ---&lt;br /&gt;
| Somebody from the team sets up new cycle for cataloguing data.&lt;br /&gt;
| Data are searchable through iCat.&lt;br /&gt;
| Tom Griffin&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Results of the review pannel &lt;br /&gt;
| On request, Instrument Scientists, schedules experiment in Scheduler application&lt;br /&gt;
| Input for scheduler script&lt;br /&gt;
| Instrument Scientist&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| e-mail to PI from 5.1, about experiment accepted&lt;br /&gt;
| Experimental team is added to visits system&lt;br /&gt;
| Input for scheduler scripts&lt;br /&gt;
| PI on accepted proposal&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| Results from 3 &amp;amp; 4&lt;br /&gt;
| Twice a day: &amp;#039;&amp;#039;&amp;#039;Scheduler&amp;#039;&amp;#039;&amp;#039; scripts runs processing inputs.&lt;br /&gt;
|&lt;br /&gt;
# Emails user office to create&amp;amp;renew FedID-s&lt;br /&gt;
# Generates [http://icatingest2.isis.cclrc.ac.uk/excitations.txt information file] containing RB number, Instrument, Cycle, visitors names &amp;amp; FedIDs&lt;br /&gt;
| Contact responsible from [mailto:isisdata@stfc.ac.uk data acquisition support group]&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| Output 5.1 from Scheduler script&lt;br /&gt;
| Create FedID &amp;amp; renew the old one&lt;br /&gt;
| &lt;br /&gt;
# User team as input for 5&lt;br /&gt;
# E-mails to users &lt;br /&gt;
| User&amp;#039;s office&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| Output 5.2 from Scheduler script&lt;br /&gt;
| Twice a day: [https://github.com/FITLinuxSupport/analysisscripts/blob/master/Build_Mantid_config.py issicompute configuration script]&lt;br /&gt;
| &lt;br /&gt;
# Creates RB folders, User folders, access rights, autoreduction configuration. &lt;br /&gt;
# Users got rights to log into isiscompute and access their experiment folders.&lt;br /&gt;
# Starts Mantid Configuration script (8) and provides it with information about FedID&amp;amp;instrument&amp;amp;RB number&lt;br /&gt;
| Jeff Warren &amp;amp; Alex Buts&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| 7.3 and contents of MantidConfig folders&lt;br /&gt;
| [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/ISISDirecInelasticConfig.py Mantid configuration script], started by  [https://github.com/FITLinuxSupport/analysisscripts/blob/master/Build_Mantid_config.py issicompute configuration script]&lt;br /&gt;
|  &lt;br /&gt;
# Mantid configured for first usage, [[Experimental Data]] and [[Instrument parameters and Instrument definitions]] data search path is set up and path to common inelastic script is configured.&lt;br /&gt;
# User scripts copied to users according their instruments and the contents of [https://github.com/mantidproject/scriptrepository/tree/master/direct_inelastic Mantid Users Script repository]&lt;br /&gt;
| Alex Buts&lt;br /&gt;
|-&lt;br /&gt;
| 9.&lt;br /&gt;
| Contents of [https://github.com/mantidproject/scriptrepository/tree/master/direct_inelastic Mantid Users Script repository] on the web. Contents of SVN servers on the web.&lt;br /&gt;
| Once an Hour: [https://github.com/FITLinuxSupport/analysisscripts/blob/master/UpdateSVN Inelastic data update script] pulls contents of the web repositories into files on isiscompute.&lt;br /&gt;
| [[Instrument parameters and Instrument definitions]] files in correspondent isiscompute folders are up-to date&lt;br /&gt;
| Jeff Warren &amp;amp; Alex Buts&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Setting_up_Mantid,_Matlab_and_auxiliary_programs_to_process_results_of_inelastic_experiments. Back to setting up Mantid]&lt;br /&gt;
&lt;br /&gt;
=== Extract from .json file defined users who has access to the data ===&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
 &amp;quot;Last Updated&amp;quot;: 20150413,&lt;br /&gt;
 &amp;quot;experiments&amp;quot;:&lt;br /&gt;
 [&lt;br /&gt;
   {&lt;br /&gt;
    &amp;quot;RbNumber&amp;quot;: &amp;quot;1234567&amp;quot;,&lt;br /&gt;
    &amp;quot;Instrument&amp;quot;: &amp;quot;MERLIN&amp;quot;,&lt;br /&gt;
    &amp;quot;Cycle&amp;quot;: &amp;quot;2013/4&amp;quot;,&lt;br /&gt;
    &amp;quot;StartDate&amp;quot;: &amp;quot;20131203&amp;quot;,&lt;br /&gt;
    &amp;quot;Permissions&amp;quot;: [&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;email&amp;quot;: &amp;quot;YYYY@stfc.ac.uk&amp;quot;,&lt;br /&gt;
        &amp;quot;fedid&amp;quot;: &amp;quot;XXXXX&amp;quot;&lt;br /&gt;
      },&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;email&amp;quot;: &amp;quot;warren.jeffs@stfc.ac.uk&amp;quot;,&lt;br /&gt;
        &amp;quot;fedid&amp;quot;: &amp;quot;gpq43739&amp;quot;&lt;br /&gt;
      },&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;email&amp;quot;: &amp;quot;alex.buts@stfc.ac.uk&amp;quot;,&lt;br /&gt;
        &amp;quot;fedid&amp;quot;: &amp;quot;wkc26243&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    ]&lt;br /&gt;
  },&lt;br /&gt;
  { &amp;quot;NEXT RB NUMBER&amp;quot;&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Setting_up_Mantid,_Matlab_and_auxiliary_programs_to_process_results_of_inelastic_experiments. Back to setting up Mantid]&lt;/div&gt;</summary>
		<author><name>Alex Buts</name></author>
	</entry>
	<entry>
		<id>http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Automatic_user_configuration&amp;diff=405</id>
		<title>Automatic user configuration</title>
		<link rel="alternate" type="text/html" href="http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Automatic_user_configuration&amp;diff=405"/>
		<updated>2023-01-09T16:57:11Z</updated>

		<summary type="html">&lt;p&gt;Alex Buts: /* Automatic user configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Automatic user configuration ==&lt;br /&gt;
&lt;br /&gt;
When an experiment is approved and scheduled by instrument scientist, [http://www.isis.stfc.ac.uk/user-office/ User office] assigns a user with his/her federal ID, which allows user to access ISIS network including [https://isis.analysis.stfc.ac.uk/workspaces/ IDAaaS virtual machines] and provides appropriate information to [Catalog service], giving the user rights to access the data through the Catalog. &lt;br /&gt;
&lt;br /&gt;
At some stage, special [http://icatingest2.isis.cclrc.ac.uk/excitations.txt information file], which defines the participants of the experiments and the scientists who have access to the data of this experiment is placed on the [http://icatingest2.isis.cclrc.ac.uk/excitations.txt internal server] where it is accessed and automatically processed by [https://github.com/FITLinuxSupport/analysisscripts/blob/master/Build_Mantid_config.py issicompute configuration script]. The format of the file is .json and the sample contents is provided below.&lt;br /&gt;
&lt;br /&gt;
The automatic isiscompute configuration script runs twice a day on [https://isiscompute.nd.rl.ac.uk/nxwebplayer isiscompue server] processing the information file, creating user accounts and appropriate RB folders and giving users permissions to access their RB folders on the basis of the information file. [mailto:alex.buts@stfc.ac.uk Alex Buts] and [https://www.facilities.rl.ac.uk/itsupport/default.aspx FBU IT support] [mailto:FITServiceDesk@stfc.ac.uk FBU IT support (Jeffs Warren)] have access and can modify this script. At the final stage this script runs [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/ISISDirecInelasticConfig.py the Mantid configuration script for inelastic instruments], which configures each user&amp;#039;s Mantid to use appropriate [[Experimental Data]], [[Instrument parameters and Instrument definitions]], necessary to reduce experimental data. It also provides users with initial version of [[Reduction scripts]], which users should modify to their requests according to the [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/ISIS_direct_reduction_script_description. description], using help of their instrument scientist if necessary. [mailto:alex.buts@stfc.ac.uk Alex Buts] is responsible for maintaining this script.&lt;br /&gt;
&lt;br /&gt;
When initial [[Reduction scripts]] are copied to user&amp;#039;s RB folder from the [https://github.com/mantidproject/scriptrepository/tree/master/direct_inelastic Mantid Script Repository] sample folder, script date is set to the experiment start date and the time -- to the exact midnight of the start date. Configuration script running twice a day checks this date and if it does not changed, replaces the existing script with the script, found in the Mantid Script Repository sample folder. If somebody touched the copied script, its date and time changes and [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/ISISDirecInelasticConfig.py autoconfiguration script] stops replacing the file. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The diagram and the table below summarize the user creation workflow:&lt;br /&gt;
&lt;br /&gt;
[http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Setting_up_Mantid,_Matlab_and_auxiliary_programs_to_process_results_of_inelastic_experiments. Back to setting up Mantid]&lt;br /&gt;
&lt;br /&gt;
=== ISISOMPUTE User creation workflow ===&lt;br /&gt;
&lt;br /&gt;
[[File:UserConfigWorkflow.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
Less visual but more detailed description of the workflow is provided in the table below. The number of the row in the table corresponds to the number of the block in the diagram above.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;color:blue;&lt;br /&gt;
! Stage Num&lt;br /&gt;
! Input&lt;br /&gt;
! Frequency, Actor &amp;amp; Event&lt;br /&gt;
! Result&lt;br /&gt;
! Person responsible&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| --&lt;br /&gt;
| Two weeks before Cycle, Crhis closes archive on the previous cycle. Sets up new cycle&lt;br /&gt;
| Cycle Folders appear in the archive.&lt;br /&gt;
| Chris Moreton-Smith&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| ---&lt;br /&gt;
| Somebody from the team sets up new cycle for cataloguing data.&lt;br /&gt;
| Data are searchable through iCat.&lt;br /&gt;
| Tom Griffin&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Results of the review pannel &lt;br /&gt;
| On request, Instrument Scientists, schedules experiment in Scheduler application&lt;br /&gt;
| Input for scheduler script&lt;br /&gt;
| Instrument Scientist&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| e-mail to PI from 5.1, about experiment accepted&lt;br /&gt;
| Experimental team is added to visits system&lt;br /&gt;
| Input for scheduler scripts&lt;br /&gt;
| PI on accepted proposal&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| Results from 3 &amp;amp; 4&lt;br /&gt;
| Twice a day: &amp;#039;&amp;#039;&amp;#039;Scheduler&amp;#039;&amp;#039;&amp;#039; scripts runs processing inputs.&lt;br /&gt;
|&lt;br /&gt;
# Emails user office to create&amp;amp;renew FedID-s&lt;br /&gt;
# Generates [http://icatingest2.isis.cclrc.ac.uk/excitations.txt information file] containing RB number, Instrument, Cycle, visitors names &amp;amp; FedIDs&lt;br /&gt;
| Contact responsible from [mailto:isisdata@stfc.ac.uk data acquisition support group]&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| Output 5.1 from Scheduler script&lt;br /&gt;
| Create FedID &amp;amp; renew the old one&lt;br /&gt;
| &lt;br /&gt;
# User team as input for 5&lt;br /&gt;
# E-mails to users &lt;br /&gt;
| User&amp;#039;s office&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| Output 5.2 from Scheduler script&lt;br /&gt;
| Twice a day: [https://github.com/FITLinuxSupport/analysisscripts/blob/master/Build_Mantid_config.py issicompute configuration script]&lt;br /&gt;
| &lt;br /&gt;
# Creates RB folders, User folders, access rights, autoreduction configuration. &lt;br /&gt;
# Users got rights to log into isiscompute and access their experiment folders.&lt;br /&gt;
# Starts Mantid Configuration script (8) and provides it with information about FedID&amp;amp;instrument&amp;amp;RB number&lt;br /&gt;
| Jeff Warren &amp;amp; Alex Buts&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| 7.3 and contents of MantidConfig folders&lt;br /&gt;
| [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/ISISDirecInelasticConfig.py Mantid configuration script], started by  [https://github.com/FITLinuxSupport/analysisscripts/blob/master/Build_Mantid_config.py issicompute configuration script]&lt;br /&gt;
|  &lt;br /&gt;
# Mantid configured for first usage, [[Experimental Data]] and [[Instrument parameters and Instrument definitions]] data search path is set up and path to common inelastic script is configured.&lt;br /&gt;
# User scripts copied to users according their instruments and the contents of [https://github.com/mantidproject/scriptrepository/tree/master/direct_inelastic Mantid Users Script repository]&lt;br /&gt;
| Alex Buts&lt;br /&gt;
|-&lt;br /&gt;
| 9.&lt;br /&gt;
| Contents of [https://github.com/mantidproject/scriptrepository/tree/master/direct_inelastic Mantid Users Script repository] on the web. Contents of SVN servers on the web.&lt;br /&gt;
| Once an Hour: [https://github.com/FITLinuxSupport/analysisscripts/blob/master/UpdateSVN Inelastic data update script] pulls contents of the web repositories into files on isiscompute.&lt;br /&gt;
| [[Instrument parameters and Instrument definitions]] files in correspondent isiscompute folders are up-to date&lt;br /&gt;
| Jeff Warren &amp;amp; Alex Buts&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Setting_up_Mantid,_Matlab_and_auxiliary_programs_to_process_results_of_inelastic_experiments. Back to setting up Mantid]&lt;br /&gt;
&lt;br /&gt;
=== Extract from .json file defined users who has access to the data ===&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
 &amp;quot;Last Updated&amp;quot;: 20150413,&lt;br /&gt;
 &amp;quot;experiments&amp;quot;:&lt;br /&gt;
 [&lt;br /&gt;
   {&lt;br /&gt;
    &amp;quot;RbNumber&amp;quot;: &amp;quot;1234567&amp;quot;,&lt;br /&gt;
    &amp;quot;Instrument&amp;quot;: &amp;quot;MERLIN&amp;quot;,&lt;br /&gt;
    &amp;quot;Cycle&amp;quot;: &amp;quot;2013/4&amp;quot;,&lt;br /&gt;
    &amp;quot;StartDate&amp;quot;: &amp;quot;20131203&amp;quot;,&lt;br /&gt;
    &amp;quot;Permissions&amp;quot;: [&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;email&amp;quot;: &amp;quot;YYYY@stfc.ac.uk&amp;quot;,&lt;br /&gt;
        &amp;quot;fedid&amp;quot;: &amp;quot;XXXXX&amp;quot;&lt;br /&gt;
      },&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;email&amp;quot;: &amp;quot;warren.jeffs@stfc.ac.uk&amp;quot;,&lt;br /&gt;
        &amp;quot;fedid&amp;quot;: &amp;quot;gpq43739&amp;quot;&lt;br /&gt;
      },&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;email&amp;quot;: &amp;quot;alex.buts@stfc.ac.uk&amp;quot;,&lt;br /&gt;
        &amp;quot;fedid&amp;quot;: &amp;quot;wkc26243&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    ]&lt;br /&gt;
  },&lt;br /&gt;
  { &amp;quot;NEXT RB NUMBER&amp;quot;&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Setting_up_Mantid,_Matlab_and_auxiliary_programs_to_process_results_of_inelastic_experiments. Back to setting up Mantid]&lt;/div&gt;</summary>
		<author><name>Alex Buts</name></author>
	</entry>
	<entry>
		<id>http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Using_Matlab_and_access_to_sample_Matlab_scripts&amp;diff=404</id>
		<title>Using Matlab and access to sample Matlab scripts</title>
		<link rel="alternate" type="text/html" href="http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Using_Matlab_and_access_to_sample_Matlab_scripts&amp;diff=404"/>
		<updated>2023-01-09T16:55:58Z</updated>

		<summary type="html">&lt;p&gt;Alex Buts: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Matlab packages for Inelastic Scattering data analysis used in ISIS include [http://horace.isis.rl.ac.uk/Main_Page Horace] and [http://mslice.isis.rl.ac.uk/Main_Page Mslice]. The packages have home pages with extensive descriptions, but most recent and useful sample scripts are provided to users on the file system using  &amp;#039;&amp;#039;&amp;#039;HoraceExampleScripts&amp;#039;&amp;#039;&amp;#039; folder, placed on IDAaaS users desktop at: &lt;br /&gt;
&lt;br /&gt;
  /mnt/nomachine/resources/HoraceExampleScripts &lt;br /&gt;
&lt;br /&gt;
also available through &amp;#039;&amp;#039;Applications-&amp;gt;Examples-&amp;gt;Horace Scripts&amp;#039;&amp;#039; link on IDAaaS virtual machine interface. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://isis.analysis.stfc.ac.uk/workspaces/ IDAaaS] servers provide users with access to recent version of [http://uk.mathworks.com/products/matlab/ Matlab] and substantial number of floating licenses sufficient for users doing experiments and data analysis&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
The state of the Matlab licenses, licensing issues and number of available licenses can be checked using simple bash script (command):&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 # check network license for Matlab&lt;br /&gt;
 /usr/local/MATLAB/R2014a/etc/glnxa64/lmutil lmstat -c /usr/local/MATLAB/R2014a/licenses/network.lic -a&lt;br /&gt;
&lt;br /&gt;
Horace and Mslice are configured to be accessible from Matlab in two ways: &lt;br /&gt;
&lt;br /&gt;
*Using &amp;#039;&amp;#039;startup.m&amp;#039;&amp;#039; file, which is copied to each user home folder when user account is created. See the description of &amp;#039;&amp;#039;startup.m&amp;#039;&amp;#039; file at [http://mslice.isis.rl.ac.uk/Download_and_setup_MSlice Mslice] and [http://horace.isis.rl.ac.uk/Download_and_setup#Standard_Installation Horace] configuration pages for the detailed description of this file contents. &lt;br /&gt;
*By adding special [http://horace.isis.rl.ac.uk/Download_and_setup#Installation_with_Horace_not_initialised_by_default_on_starting_Matlab &amp;#039;&amp;#039;horace_on&amp;#039;&amp;#039;] and similar &amp;#039;&amp;#039;mslice_on&amp;#039;&amp;#039; scripts to Matlab default search path. The scripts are doing roughly the same as &amp;#039;&amp;#039;startup.m&amp;#039;&amp;#039; file but allow user to initialize [http://horace.isis.rl.ac.uk/Main_Page Horace] and [http://mslice.isis.rl.ac.uk/Main_Page Mslice] from arbitrary folder user wants to start Matlab from (not only from his or her home folder) and allows user to reinitialize these packages. This may be convenient for dealing with some errors in the analysis packages or when trying to resolve &amp;#039;&amp;#039;out of memory&amp;#039;&amp;#039; situations.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configuring Matlab to access &amp;#039;&amp;#039;horace_on&amp;#039;&amp;#039; and &amp;#039;&amp;#039;mslice_on&amp;#039;&amp;#039; scripts ===&lt;br /&gt;
&lt;br /&gt;
The installation process for Horace and Mslice described in details on [https://pace-neutrons.github.io/Horace Horace] and [http://mslice.isis.rl.ac.uk/Main_Page Mslice] installation pages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
Configuring Matlab to access &amp;#039;&amp;#039;horace_on&amp;#039;&amp;#039; and &amp;#039;&amp;#039;mslice_on&amp;#039;&amp;#039; scripts on [http://isiscompute.nd.rl.ac.uk isiscompute] server requests superuser access and involves the following steps: &lt;br /&gt;
&lt;br /&gt;
One needs to go to matlab installation folder e.g.&lt;br /&gt;
&lt;br /&gt;
  /usr/local/MATLAB/R2015b/toolbox/local/&lt;br /&gt;
&lt;br /&gt;
and edit &amp;#039;&amp;#039;pathdef.m&amp;#039;&amp;#039; file:&lt;br /&gt;
&lt;br /&gt;
  sudo vim pathdef.m&lt;br /&gt;
&lt;br /&gt;
where find the rows:&lt;br /&gt;
&lt;br /&gt;
 p=[...&lt;br /&gt;
 %%% BEGIN ENTRIES %%%&lt;br /&gt;
 matlabroot,&amp;#039;/toolbox/matlab/lang:&amp;#039;,...&lt;br /&gt;
&lt;br /&gt;
and modify them  as follows:&lt;br /&gt;
&lt;br /&gt;
 p=[...&lt;br /&gt;
 %%% BEGIN ENTRIES %%%&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:#00ff00&amp;gt;&amp;#039;/usr/local/mprogs/Users:&amp;#039;, ...&amp;lt;/span&amp;gt;&lt;br /&gt;
  matlabroot,&amp;#039;/toolbox/matlab/lang:&amp;#039;,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where &amp;#039;&amp;#039;/usr/local/mprogs/Users&amp;#039;&amp;#039; folder is the folder where appropriately configured &amp;#039;&amp;#039;horace_on&amp;#039;&amp;#039; and &amp;#039;&amp;#039;mslice_on&amp;#039;&amp;#039; scripts can be found. See [http://horace.isis.rl.ac.uk/Download_and_setup#Installation_with_Horace_not_initialised_by_default_on_starting_Matlab Configure Horace]  and [http://mslice.isis.rl.ac.uk/Download_and_setup_MSlice Configuring Mslice] for details on how to configure these scripts. Note, that the syntax of the changes to &amp;#039;&amp;#039;pathdef.m&amp;#039;&amp;#039; has to be exact to avoid problem with Matlab components search path.&lt;br /&gt;
&lt;br /&gt;
=== Configuring Matlab 2015b to work with gcc8.4.5 for combining using mex code on RHEL7 === &lt;br /&gt;
&lt;br /&gt;
By default, Maltab 2015b mex code works with GCC4.7 but RHEL 7 default compiler is GCC4.8 and downgrading to gcc 4.7 is not straightforward. &lt;br /&gt;
From other side, the table below shows, that using mex code for combining files on [http://isiscompute.nd.rl.ac.uk isiscompute] cluster is very beneficial:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center;&amp;quot;&lt;br /&gt;
|+Combining sqw files on isiscompute server&lt;br /&gt;
|-&lt;br /&gt;
! Code and settings&lt;br /&gt;
! Combining speed Mb/s&lt;br /&gt;
! Time to combine 142Gb (min)&lt;br /&gt;
! use_mex_for_combine&amp;lt;sup&amp;gt;&amp;lt;span style=&amp;quot;color:blue&amp;quot;&amp;gt;1)&amp;lt;/span&amp;gt;&amp;lt;/sup&amp;gt;&lt;br /&gt;
! mex_combine_thread_mode &lt;br /&gt;
|-&lt;br /&gt;
| Matlab 2015b, buffer N/A&lt;br /&gt;
| 67&lt;br /&gt;
| 37&lt;br /&gt;
| false&lt;br /&gt;
| N/A&lt;br /&gt;
|-&lt;br /&gt;
| combine_sqw.mex. buffer 1024, &lt;br /&gt;
| 598&lt;br /&gt;
| 4&lt;br /&gt;
| true&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| combine_sqw.mex. buffer 1024&lt;br /&gt;
| 517&lt;br /&gt;
| 5&lt;br /&gt;
| true &lt;br /&gt;
| 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
   &amp;lt;sup&amp;gt;&amp;lt;span style=&amp;quot;color:blue&amp;quot;&amp;gt;1)&amp;lt;/span&amp;gt;&amp;lt;/sup&amp;gt;The thread mode is set up by Horace setup command: &lt;br /&gt;
    &amp;#039;&amp;#039;&amp;#039;set(hor_config,&amp;lt;span style=&amp;quot;color:brown&amp;quot;&amp;gt;&amp;#039;use_mex_for_combine&amp;#039;,1,&amp;#039;mex_combine_thread_mode&amp;#039;,1&amp;lt;/span&amp;gt;)&amp;#039;&amp;#039;&amp;#039;; &lt;br /&gt;
    See [http://horace.isis.rl.ac.uk/Download_and_setup#Enabling_multi-sessions_processing Horace setup] for the details of configuring Horace to use mex files.&lt;br /&gt;
&lt;br /&gt;
Apparently, one can use gcc 4.8 compiler, but to use multi-threaded combining, the following changes have to be done for Matlab 2015b, assuming Matlab and gcc4.8 are installed in the system in default locations.&lt;br /&gt;
&lt;br /&gt;
  &amp;gt;&amp;gt;cd /usr/local/MATLAB/R2015b/sys/os/glnxa64&lt;br /&gt;
  &amp;gt;&amp;gt;rm libstdc++.so.6 &lt;br /&gt;
  &amp;gt;&amp;gt;ln -s /usr/lib64/libstdc++.so.6.0.19 libstdc++.so.6&lt;br /&gt;
&lt;br /&gt;
The change causes no known negative effects on Matlab or Horace under Maltab2015b.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Setting_up_Mantid,_Matlab_and_auxiliary_programs_to_process_results_of_inelastic_experiments. Back to setting up Mantid]&lt;/div&gt;</summary>
		<author><name>Alex Buts</name></author>
	</entry>
	<entry>
		<id>http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Using_Matlab_and_access_to_sample_Matlab_scripts&amp;diff=403</id>
		<title>Using Matlab and access to sample Matlab scripts</title>
		<link rel="alternate" type="text/html" href="http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Using_Matlab_and_access_to_sample_Matlab_scripts&amp;diff=403"/>
		<updated>2023-01-09T16:51:24Z</updated>

		<summary type="html">&lt;p&gt;Alex Buts: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Matlab packages for Inelastic Scattering data analysis used in ISIS include [http://horace.isis.rl.ac.uk/Main_Page Horace] and [http://mslice.isis.rl.ac.uk/Main_Page Mslice]. The packages have home pages with extensive descriptions, but most recent and useful sample scripts are provided to users on the file system using  &amp;#039;&amp;#039;&amp;#039;HoraceExampleScripts&amp;#039;&amp;#039;&amp;#039; folder, placed on IDAaaS users desktop at: &lt;br /&gt;
&lt;br /&gt;
  /mnt/nomachine/resources/HoraceExampleScripts &lt;br /&gt;
&lt;br /&gt;
also available through &amp;#039;&amp;#039;Applications-&amp;gt;Examples-&amp;gt;Horace Scripts&amp;#039;&amp;#039; link on IDAaaS virtual machine interface. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://isis.analysis.stfc.ac.uk/workspaces/ IDAaaS] servers provide users with access to recent version of [http://uk.mathworks.com/products/matlab/ Matlab] and substantial number of floating licenses sufficient for users doing experiments and data analysis&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
The state of the Matlab licenses, licensing issues and number of available licenses can be checked using simple bash script (command):&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 # check network license for Matlab&lt;br /&gt;
 /usr/local/MATLAB/R2014a/etc/glnxa64/lmutil lmstat -c /usr/local/MATLAB/R2014a/licenses/network.lic -a&lt;br /&gt;
&lt;br /&gt;
Horace and Mslice are configured to be accessible from Matlab in two ways: &lt;br /&gt;
&lt;br /&gt;
*Using &amp;#039;&amp;#039;startup.m&amp;#039;&amp;#039; file, which is copied to each user home folder when user account is created. See the description of &amp;#039;&amp;#039;startup.m&amp;#039;&amp;#039; file at [http://mslice.isis.rl.ac.uk/Download_and_setup_MSlice Mslice] and [http://horace.isis.rl.ac.uk/Download_and_setup#Standard_Installation Horace] configuration pages for the detailed description of this file contents. &lt;br /&gt;
*By adding special [http://horace.isis.rl.ac.uk/Download_and_setup#Installation_with_Horace_not_initialised_by_default_on_starting_Matlab &amp;#039;&amp;#039;horace_on&amp;#039;&amp;#039;] and similar &amp;#039;&amp;#039;mslice_on&amp;#039;&amp;#039; scripts to Matlab default search path. The scripts are doing roughly the same as &amp;#039;&amp;#039;startup.m&amp;#039;&amp;#039; file but allow user to initialize [http://horace.isis.rl.ac.uk/Main_Page Horace] and [http://mslice.isis.rl.ac.uk/Main_Page Mslice] from arbitrary folder user wants to start Matlab from (not only from his or her home folder) and allows user to reinitialize these packages. This may be convenient for dealing with some errors in the analysis packages or when trying to resolve &amp;#039;&amp;#039;out of memory&amp;#039;&amp;#039; situations.&lt;br /&gt;
--!&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configuring Matlab to access &amp;#039;&amp;#039;horace_on&amp;#039;&amp;#039; and &amp;#039;&amp;#039;mslice_on&amp;#039;&amp;#039; scripts ===&lt;br /&gt;
&lt;br /&gt;
Configuring Matlab to access &amp;#039;&amp;#039;horace_on&amp;#039;&amp;#039; and &amp;#039;&amp;#039;mslice_on&amp;#039;&amp;#039; scripts on [http://isiscompute.nd.rl.ac.uk isiscompute] server requests superuser access and involves the following steps: &lt;br /&gt;
&lt;br /&gt;
One needs to go to matlab installation folder e.g.&lt;br /&gt;
&lt;br /&gt;
  /usr/local/MATLAB/R2015b/toolbox/local/&lt;br /&gt;
&lt;br /&gt;
and edit &amp;#039;&amp;#039;pathdef.m&amp;#039;&amp;#039; file:&lt;br /&gt;
&lt;br /&gt;
  sudo vim pathdef.m&lt;br /&gt;
&lt;br /&gt;
where find the rows:&lt;br /&gt;
&lt;br /&gt;
 p=[...&lt;br /&gt;
 %%% BEGIN ENTRIES %%%&lt;br /&gt;
 matlabroot,&amp;#039;/toolbox/matlab/lang:&amp;#039;,...&lt;br /&gt;
&lt;br /&gt;
and modify them  as follows:&lt;br /&gt;
&lt;br /&gt;
 p=[...&lt;br /&gt;
 %%% BEGIN ENTRIES %%%&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:#00ff00&amp;gt;&amp;#039;/usr/local/mprogs/Users:&amp;#039;, ...&amp;lt;/span&amp;gt;&lt;br /&gt;
  matlabroot,&amp;#039;/toolbox/matlab/lang:&amp;#039;,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where &amp;#039;&amp;#039;/usr/local/mprogs/Users&amp;#039;&amp;#039; folder is the folder where appropriately configured &amp;#039;&amp;#039;horace_on&amp;#039;&amp;#039; and &amp;#039;&amp;#039;mslice_on&amp;#039;&amp;#039; scripts can be found. See [http://horace.isis.rl.ac.uk/Download_and_setup#Installation_with_Horace_not_initialised_by_default_on_starting_Matlab Configure Horace]  and [http://mslice.isis.rl.ac.uk/Download_and_setup_MSlice Configuring Mslice] for details on how to configure these scripts. Note, that the syntax of the changes to &amp;#039;&amp;#039;pathdef.m&amp;#039;&amp;#039; has to be exact to avoid problem with Matlab components search path.&lt;br /&gt;
&lt;br /&gt;
=== Configuring Matlab 2015b to work with gcc8.4.5 for combining using mex code on RHEL7 === &lt;br /&gt;
&lt;br /&gt;
By default, Maltab 2015b mex code works with GCC4.7 but RHEL 7 default compiler is GCC4.8 and downgrading to gcc 4.7 is not straightforward. &lt;br /&gt;
From other side, the table below shows, that using mex code for combining files on [http://isiscompute.nd.rl.ac.uk isiscompute] cluster is very beneficial:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center;&amp;quot;&lt;br /&gt;
|+Combining sqw files on isiscompute server&lt;br /&gt;
|-&lt;br /&gt;
! Code and settings&lt;br /&gt;
! Combining speed Mb/s&lt;br /&gt;
! Time to combine 142Gb (min)&lt;br /&gt;
! use_mex_for_combine&amp;lt;sup&amp;gt;&amp;lt;span style=&amp;quot;color:blue&amp;quot;&amp;gt;1)&amp;lt;/span&amp;gt;&amp;lt;/sup&amp;gt;&lt;br /&gt;
! mex_combine_thread_mode &lt;br /&gt;
|-&lt;br /&gt;
| Matlab 2015b, buffer N/A&lt;br /&gt;
| 67&lt;br /&gt;
| 37&lt;br /&gt;
| false&lt;br /&gt;
| N/A&lt;br /&gt;
|-&lt;br /&gt;
| combine_sqw.mex. buffer 1024, &lt;br /&gt;
| 598&lt;br /&gt;
| 4&lt;br /&gt;
| true&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| combine_sqw.mex. buffer 1024&lt;br /&gt;
| 517&lt;br /&gt;
| 5&lt;br /&gt;
| true &lt;br /&gt;
| 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
   &amp;lt;sup&amp;gt;&amp;lt;span style=&amp;quot;color:blue&amp;quot;&amp;gt;1)&amp;lt;/span&amp;gt;&amp;lt;/sup&amp;gt;The thread mode is set up by Horace setup command: &lt;br /&gt;
    &amp;#039;&amp;#039;&amp;#039;set(hor_config,&amp;lt;span style=&amp;quot;color:brown&amp;quot;&amp;gt;&amp;#039;use_mex_for_combine&amp;#039;,1,&amp;#039;mex_combine_thread_mode&amp;#039;,1&amp;lt;/span&amp;gt;)&amp;#039;&amp;#039;&amp;#039;; &lt;br /&gt;
    See [http://horace.isis.rl.ac.uk/Download_and_setup#Enabling_multi-sessions_processing Horace setup] for the details of configuring Horace to use mex files.&lt;br /&gt;
&lt;br /&gt;
Apparently, one can use gcc 4.8 compiler, but to use multi-threaded combining, the following changes have to be done for Matlab 2015b, assuming Matlab and gcc4.8 are installed in the system in default locations.&lt;br /&gt;
&lt;br /&gt;
  &amp;gt;&amp;gt;cd /usr/local/MATLAB/R2015b/sys/os/glnxa64&lt;br /&gt;
  &amp;gt;&amp;gt;rm libstdc++.so.6 &lt;br /&gt;
  &amp;gt;&amp;gt;ln -s /usr/lib64/libstdc++.so.6.0.19 libstdc++.so.6&lt;br /&gt;
&lt;br /&gt;
The change causes no known negative effects on Matlab or Horace under Maltab2015b.&lt;br /&gt;
&lt;br /&gt;
[http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Setting_up_Mantid,_Matlab_and_auxiliary_programs_to_process_results_of_inelastic_experiments. Back to setting up Mantid]&lt;/div&gt;</summary>
		<author><name>Alex Buts</name></author>
	</entry>
	<entry>
		<id>http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Using_Matlab_and_access_to_sample_Matlab_scripts&amp;diff=402</id>
		<title>Using Matlab and access to sample Matlab scripts</title>
		<link rel="alternate" type="text/html" href="http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Using_Matlab_and_access_to_sample_Matlab_scripts&amp;diff=402"/>
		<updated>2023-01-09T16:35:24Z</updated>

		<summary type="html">&lt;p&gt;Alex Buts: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Matlab packages for Inelastic Scattering data analysis used in ISIS include [http://horace.isis.rl.ac.uk/Main_Page Horace] and [http://mslice.isis.rl.ac.uk/Main_Page Mslice]. The packages have home pages with extensive descriptions, but most recent and useful sample scripts are provided to users on the file system using  &amp;#039;&amp;#039;&amp;#039;HoraceExampleScripts&amp;#039;&amp;#039;&amp;#039; folder, placed on IDAaaS users desktop at: &lt;br /&gt;
&lt;br /&gt;
  /mnt/nomachine/resources/HoraceExampleScripts &lt;br /&gt;
&lt;br /&gt;
also available through &amp;#039;&amp;#039;Applications-&amp;gt;Examples-&amp;gt;Horace Scripts&amp;#039;&amp;#039; link on IDAaaS virtual machine interface. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://isis.analysis.stfc.ac.uk/workspaces/ IDAaaS] servers provide users with access to recent version of [http://uk.mathworks.com/products/matlab/ Matlab] and substantial number of floating licenses sufficient for users doing experiments and data analysis&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The state of the Matlab licenses, licensing issues and number of available licenses can be checked using simple bash script (command):&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 # check network license for Matlab&lt;br /&gt;
 /usr/local/MATLAB/R2014a/etc/glnxa64/lmutil lmstat -c /usr/local/MATLAB/R2014a/licenses/network.lic -a&lt;br /&gt;
&lt;br /&gt;
Horace and Mslice are configured to be accessible from Matlab in two ways: &lt;br /&gt;
&lt;br /&gt;
*Using &amp;#039;&amp;#039;startup.m&amp;#039;&amp;#039; file, which is copied to each user home folder when user account is created. See the description of &amp;#039;&amp;#039;startup.m&amp;#039;&amp;#039; file at [http://mslice.isis.rl.ac.uk/Download_and_setup_MSlice Mslice] and [http://horace.isis.rl.ac.uk/Download_and_setup#Standard_Installation Horace] configuration pages for the detailed description of this file contents. &lt;br /&gt;
*By adding special [http://horace.isis.rl.ac.uk/Download_and_setup#Installation_with_Horace_not_initialised_by_default_on_starting_Matlab &amp;#039;&amp;#039;horace_on&amp;#039;&amp;#039;] and similar &amp;#039;&amp;#039;mslice_on&amp;#039;&amp;#039; scripts to Matlab default search path. The scripts are doing roughly the same as &amp;#039;&amp;#039;startup.m&amp;#039;&amp;#039; file but allow user to initialize [http://horace.isis.rl.ac.uk/Main_Page Horace] and [http://mslice.isis.rl.ac.uk/Main_Page Mslice] from arbitrary folder user wants to start Matlab from (not only from his or her home folder) and allows user to reinitialize these packages. This may be convenient for dealing with some errors in the analysis packages or when trying to resolve &amp;#039;&amp;#039;out of memory&amp;#039;&amp;#039; situations.&lt;br /&gt;
&lt;br /&gt;
=== Configuring Matlab to access &amp;#039;&amp;#039;horace_on&amp;#039;&amp;#039; and &amp;#039;&amp;#039;mslice_on&amp;#039;&amp;#039; scripts ===&lt;br /&gt;
&lt;br /&gt;
Configuring Matlab to access &amp;#039;&amp;#039;horace_on&amp;#039;&amp;#039; and &amp;#039;&amp;#039;mslice_on&amp;#039;&amp;#039; scripts on [http://isiscompute.nd.rl.ac.uk isiscompute] server requests superuser access and involves the following steps: &lt;br /&gt;
&lt;br /&gt;
One needs to go to matlab installation folder e.g.&lt;br /&gt;
&lt;br /&gt;
  /usr/local/MATLAB/R2015b/toolbox/local/&lt;br /&gt;
&lt;br /&gt;
and edit &amp;#039;&amp;#039;pathdef.m&amp;#039;&amp;#039; file:&lt;br /&gt;
&lt;br /&gt;
  sudo vim pathdef.m&lt;br /&gt;
&lt;br /&gt;
where find the rows:&lt;br /&gt;
&lt;br /&gt;
 p=[...&lt;br /&gt;
 %%% BEGIN ENTRIES %%%&lt;br /&gt;
 matlabroot,&amp;#039;/toolbox/matlab/lang:&amp;#039;,...&lt;br /&gt;
&lt;br /&gt;
and modify them  as follows:&lt;br /&gt;
&lt;br /&gt;
 p=[...&lt;br /&gt;
 %%% BEGIN ENTRIES %%%&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:#00ff00&amp;gt;&amp;#039;/usr/local/mprogs/Users:&amp;#039;, ...&amp;lt;/span&amp;gt;&lt;br /&gt;
  matlabroot,&amp;#039;/toolbox/matlab/lang:&amp;#039;,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where &amp;#039;&amp;#039;/usr/local/mprogs/Users&amp;#039;&amp;#039; folder is the folder where appropriately configured &amp;#039;&amp;#039;horace_on&amp;#039;&amp;#039; and &amp;#039;&amp;#039;mslice_on&amp;#039;&amp;#039; scripts can be found. See [http://horace.isis.rl.ac.uk/Download_and_setup#Installation_with_Horace_not_initialised_by_default_on_starting_Matlab Configure Horace]  and [http://mslice.isis.rl.ac.uk/Download_and_setup_MSlice Configuring Mslice] for details on how to configure these scripts. Note, that the syntax of the changes to &amp;#039;&amp;#039;pathdef.m&amp;#039;&amp;#039; has to be exact to avoid problem with Matlab components search path.&lt;br /&gt;
&lt;br /&gt;
=== Configuring Matlab 2015b to work with gcc8.4.5 for combining using mex code on RHEL7 === &lt;br /&gt;
&lt;br /&gt;
By default, Maltab 2015b mex code works with GCC4.7 but RHEL 7 default compiler is GCC4.8 and downgrading to gcc 4.7 is not straightforward. &lt;br /&gt;
From other side, the table below shows, that using mex code for combining files on [http://isiscompute.nd.rl.ac.uk isiscompute] cluster is very beneficial:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center;&amp;quot;&lt;br /&gt;
|+Combining sqw files on isiscompute server&lt;br /&gt;
|-&lt;br /&gt;
! Code and settings&lt;br /&gt;
! Combining speed Mb/s&lt;br /&gt;
! Time to combine 142Gb (min)&lt;br /&gt;
! use_mex_for_combine&amp;lt;sup&amp;gt;&amp;lt;span style=&amp;quot;color:blue&amp;quot;&amp;gt;1)&amp;lt;/span&amp;gt;&amp;lt;/sup&amp;gt;&lt;br /&gt;
! mex_combine_thread_mode &lt;br /&gt;
|-&lt;br /&gt;
| Matlab 2015b, buffer N/A&lt;br /&gt;
| 67&lt;br /&gt;
| 37&lt;br /&gt;
| false&lt;br /&gt;
| N/A&lt;br /&gt;
|-&lt;br /&gt;
| combine_sqw.mex. buffer 1024, &lt;br /&gt;
| 598&lt;br /&gt;
| 4&lt;br /&gt;
| true&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| combine_sqw.mex. buffer 1024&lt;br /&gt;
| 517&lt;br /&gt;
| 5&lt;br /&gt;
| true &lt;br /&gt;
| 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
   &amp;lt;sup&amp;gt;&amp;lt;span style=&amp;quot;color:blue&amp;quot;&amp;gt;1)&amp;lt;/span&amp;gt;&amp;lt;/sup&amp;gt;The thread mode is set up by Horace setup command: &lt;br /&gt;
    &amp;#039;&amp;#039;&amp;#039;set(hor_config,&amp;lt;span style=&amp;quot;color:brown&amp;quot;&amp;gt;&amp;#039;use_mex_for_combine&amp;#039;,1,&amp;#039;mex_combine_thread_mode&amp;#039;,1&amp;lt;/span&amp;gt;)&amp;#039;&amp;#039;&amp;#039;; &lt;br /&gt;
    See [http://horace.isis.rl.ac.uk/Download_and_setup#Enabling_multi-sessions_processing Horace setup] for the details of configuring Horace to use mex files.&lt;br /&gt;
&lt;br /&gt;
Apparently, one can use gcc 4.8 compiler, but to use multi-threaded combining, the following changes have to be done for Matlab 2015b, assuming Matlab and gcc4.8 are installed in the system in default locations.&lt;br /&gt;
&lt;br /&gt;
  &amp;gt;&amp;gt;cd /usr/local/MATLAB/R2015b/sys/os/glnxa64&lt;br /&gt;
  &amp;gt;&amp;gt;rm libstdc++.so.6 &lt;br /&gt;
  &amp;gt;&amp;gt;ln -s /usr/lib64/libstdc++.so.6.0.19 libstdc++.so.6&lt;br /&gt;
&lt;br /&gt;
The change causes no known negative effects on Matlab or Horace under Maltab2015b.&lt;br /&gt;
&lt;br /&gt;
[http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Setting_up_Mantid,_Matlab_and_auxiliary_programs_to_process_results_of_inelastic_experiments. Back to setting up Mantid]&lt;/div&gt;</summary>
		<author><name>Alex Buts</name></author>
	</entry>
	<entry>
		<id>http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Using_autoreduction&amp;diff=401</id>
		<title>Using autoreduction</title>
		<link rel="alternate" type="text/html" href="http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Using_autoreduction&amp;diff=401"/>
		<updated>2023-01-09T16:24:17Z</updated>

		<summary type="html">&lt;p&gt;Alex Buts: /* Autoreduction is currently disabled on inelastic instruments, so this information is provided for references only */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Autoreduction server and automatic data reduction == &lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Autoreduction is currently disabled on inelastic instruments&amp;#039;&amp;#039;&amp;#039;, so this information is provided for references only ==&lt;br /&gt;
&lt;br /&gt;
Autoreduction process listens to the events, produced by a machine, running the experiment and automatically reduces data, obtained from this experiment when the run is finished. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://users.facilities.rl.ac.uk/auth/?service=http://reduce.isis.cclrc.ac.uk&amp;amp;redirecturl=http://reduce.isis.cclrc.ac.uk Autoreduction Server] provides web-interface for changing and running reduction scripts.&lt;br /&gt;
&lt;br /&gt;
The reduction scripts themselves can be found in ISIS network mounted on ISIS Unix machines in: &lt;br /&gt;
&lt;br /&gt;
  /archive/NDX[INSTRUMENT_NAME]/user/scripts/autoreduction/&lt;br /&gt;
&lt;br /&gt;
or on Windows machines in:&lt;br /&gt;
&lt;br /&gt;
   \\isis\inst$\NDX[INSTRUMENT_NAME]\user\scripts\autoreduction&lt;br /&gt;
&lt;br /&gt;
folders. Three files can be found(placed) there, namely &amp;#039;&amp;#039;reduce.py&amp;#039;&amp;#039;, &amp;#039;&amp;#039;reduce_vars.py&amp;#039;&amp;#039;  and &amp;#039;&amp;#039;[INSTRUMENT_NAME]Reduction.py&amp;#039;&amp;#039;. Autoreduction automatically runs &amp;#039;&amp;#039;reduce.py&amp;#039;&amp;#039; script and processes &amp;#039;&amp;#039;reduce_vars.py&amp;#039;&amp;#039; as input variables. For ISIS inelastic instruments &amp;#039;&amp;#039;reduce.py&amp;#039;&amp;#039; script currently deploys &amp;#039;&amp;#039;[INSTRUMENT_NAME]Reduction.py&amp;#039;&amp;#039; script, which is the same script as the one, described in the [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_sample_scripts_used_in_data_processing Sample Scripts] section of this WIKI, but renamed accordingly. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;reduce_vars.py&amp;#039;&amp;#039; can be automatically generated from &amp;#039;&amp;#039;[INSTRUMENT_NAME]Reduction.py&amp;#039;&amp;#039; if  &amp;#039;&amp;#039;[INSTRUMENT_NAME]Reduction.py&amp;#039;&amp;#039; is run from Mantid, but autoreduction (or rather &amp;#039;&amp;#039;reduce.py&amp;#039;&amp;#039;) runs &amp;#039;&amp;#039;[INSTRUMENT_NAME]Reduction.py&amp;#039;&amp;#039; overriding all variables from &amp;#039;&amp;#039;[INSTRUMENT_NAME]Reduction.py&amp;#039;&amp;#039; by variables from &amp;#039;&amp;#039;reduce_vars.py&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Autoreduction server builds web interface on the basis of the variables found in &amp;#039;&amp;#039;&amp;#039;reduce_vars.py&amp;#039;&amp;#039;&amp;#039; file, and user can use Web-interface to change the values of these variables to run script with new values from autoreduction.&lt;br /&gt;
&lt;br /&gt;
[http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Setting_up_Mantid,_Matlab_and_auxiliary_programs_to_process_results_of_inelastic_experiments. Back to setting up Mantid]&lt;/div&gt;</summary>
		<author><name>Alex Buts</name></author>
	</entry>
	<entry>
		<id>http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Using_autoreduction&amp;diff=400</id>
		<title>Using autoreduction</title>
		<link rel="alternate" type="text/html" href="http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Using_autoreduction&amp;diff=400"/>
		<updated>2023-01-09T16:24:00Z</updated>

		<summary type="html">&lt;p&gt;Alex Buts: /* Autoreduction server and automatic data reduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Autoreduction server and automatic data reduction == &lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Autoreduction is currently disabled on inelastic instruments&amp;#039;&amp;#039;&amp;#039;, so this information is provided for references only ==&lt;br /&gt;
&lt;br /&gt;
Autoreduction process listens to the events, produced by a machine, running the experiment and automatically reduces data, obtained from this experiment when the run is finished. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://users.facilities.rl.ac.uk/auth/?service=http://reduce.isis.cclrc.ac.uk&amp;amp;redirecturl=http://reduce.isis.cclrc.ac.uk Autoreduction Server] provides web-interface for changing and running reduction scripts.&lt;br /&gt;
&lt;br /&gt;
The reduction scripts themselves can be found in ISIS network mounted on ISIS Unix machines in: &lt;br /&gt;
&lt;br /&gt;
  /archive/NDX[INSTRUMENT_NAME]/user/scripts/autoreduction/&lt;br /&gt;
&lt;br /&gt;
or on Windows machines in:&lt;br /&gt;
&lt;br /&gt;
   \\isis\inst$\NDX[INSTRUMENT_NAME]\user\scripts\autoreduction&lt;br /&gt;
&lt;br /&gt;
folders. Three files can be found(placed) there, namely &amp;#039;&amp;#039;reduce.py&amp;#039;&amp;#039;, &amp;#039;&amp;#039;reduce_vars.py&amp;#039;&amp;#039;  and &amp;#039;&amp;#039;[INSTRUMENT_NAME]Reduction.py&amp;#039;&amp;#039;. Autoreduction automatically runs &amp;#039;&amp;#039;reduce.py&amp;#039;&amp;#039; script and processes &amp;#039;&amp;#039;reduce_vars.py&amp;#039;&amp;#039; as input variables. For ISIS inelastic instruments &amp;#039;&amp;#039;reduce.py&amp;#039;&amp;#039; script currently deploys &amp;#039;&amp;#039;[INSTRUMENT_NAME]Reduction.py&amp;#039;&amp;#039; script, which is the same script as the one, described in the [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_sample_scripts_used_in_data_processing Sample Scripts] section of this WIKI, but renamed accordingly. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;reduce_vars.py&amp;#039;&amp;#039; can be automatically generated from &amp;#039;&amp;#039;[INSTRUMENT_NAME]Reduction.py&amp;#039;&amp;#039; if  &amp;#039;&amp;#039;[INSTRUMENT_NAME]Reduction.py&amp;#039;&amp;#039; is run from Mantid, but autoreduction (or rather &amp;#039;&amp;#039;reduce.py&amp;#039;&amp;#039;) runs &amp;#039;&amp;#039;[INSTRUMENT_NAME]Reduction.py&amp;#039;&amp;#039; overriding all variables from &amp;#039;&amp;#039;[INSTRUMENT_NAME]Reduction.py&amp;#039;&amp;#039; by variables from &amp;#039;&amp;#039;reduce_vars.py&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Autoreduction server builds web interface on the basis of the variables found in &amp;#039;&amp;#039;&amp;#039;reduce_vars.py&amp;#039;&amp;#039;&amp;#039; file, and user can use Web-interface to change the values of these variables to run script with new values from autoreduction.&lt;/div&gt;</summary>
		<author><name>Alex Buts</name></author>
	</entry>
	<entry>
		<id>http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Using_autoreduction&amp;diff=399</id>
		<title>Using autoreduction</title>
		<link rel="alternate" type="text/html" href="http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Using_autoreduction&amp;diff=399"/>
		<updated>2023-01-09T16:23:38Z</updated>

		<summary type="html">&lt;p&gt;Alex Buts: /* Autoreduction server and automatic data reduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Autoreduction server and automatic data reduction == &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Autoreduction is currently disabled on inelastic instruments&amp;#039;&amp;#039;&amp;#039;, so this information is provided for references only&lt;br /&gt;
&lt;br /&gt;
Autoreduction process listens to the events, produced by a machine, running the experiment and automatically reduces data, obtained from this experiment when the run is finished. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://users.facilities.rl.ac.uk/auth/?service=http://reduce.isis.cclrc.ac.uk&amp;amp;redirecturl=http://reduce.isis.cclrc.ac.uk Autoreduction Server] provides web-interface for changing and running reduction scripts.&lt;br /&gt;
&lt;br /&gt;
The reduction scripts themselves can be found in ISIS network mounted on ISIS Unix machines in: &lt;br /&gt;
&lt;br /&gt;
  /archive/NDX[INSTRUMENT_NAME]/user/scripts/autoreduction/&lt;br /&gt;
&lt;br /&gt;
or on Windows machines in:&lt;br /&gt;
&lt;br /&gt;
   \\isis\inst$\NDX[INSTRUMENT_NAME]\user\scripts\autoreduction&lt;br /&gt;
&lt;br /&gt;
folders. Three files can be found(placed) there, namely &amp;#039;&amp;#039;reduce.py&amp;#039;&amp;#039;, &amp;#039;&amp;#039;reduce_vars.py&amp;#039;&amp;#039;  and &amp;#039;&amp;#039;[INSTRUMENT_NAME]Reduction.py&amp;#039;&amp;#039;. Autoreduction automatically runs &amp;#039;&amp;#039;reduce.py&amp;#039;&amp;#039; script and processes &amp;#039;&amp;#039;reduce_vars.py&amp;#039;&amp;#039; as input variables. For ISIS inelastic instruments &amp;#039;&amp;#039;reduce.py&amp;#039;&amp;#039; script currently deploys &amp;#039;&amp;#039;[INSTRUMENT_NAME]Reduction.py&amp;#039;&amp;#039; script, which is the same script as the one, described in the [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_sample_scripts_used_in_data_processing Sample Scripts] section of this WIKI, but renamed accordingly. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;reduce_vars.py&amp;#039;&amp;#039; can be automatically generated from &amp;#039;&amp;#039;[INSTRUMENT_NAME]Reduction.py&amp;#039;&amp;#039; if  &amp;#039;&amp;#039;[INSTRUMENT_NAME]Reduction.py&amp;#039;&amp;#039; is run from Mantid, but autoreduction (or rather &amp;#039;&amp;#039;reduce.py&amp;#039;&amp;#039;) runs &amp;#039;&amp;#039;[INSTRUMENT_NAME]Reduction.py&amp;#039;&amp;#039; overriding all variables from &amp;#039;&amp;#039;[INSTRUMENT_NAME]Reduction.py&amp;#039;&amp;#039; by variables from &amp;#039;&amp;#039;reduce_vars.py&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Autoreduction server builds web interface on the basis of the variables found in &amp;#039;&amp;#039;&amp;#039;reduce_vars.py&amp;#039;&amp;#039;&amp;#039; file, and user can use Web-interface to change the values of these variables to run script with new values from autoreduction.&lt;/div&gt;</summary>
		<author><name>Alex Buts</name></author>
	</entry>
	<entry>
		<id>http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Reduction_scripts&amp;diff=398</id>
		<title>Reduction scripts</title>
		<link rel="alternate" type="text/html" href="http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Reduction_scripts&amp;diff=398"/>
		<updated>2023-01-09T16:22:08Z</updated>

		<summary type="html">&lt;p&gt;Alex Buts: /* Reduction scripts used to process the experimental results */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Reduction scripts used to process the experimental results == &lt;br /&gt;
&lt;br /&gt;
ISIS reduction scripts contain number of interconnected scripts which are the part of Mantid and can be located in &amp;#039;&amp;#039;Mantid Installation Folder/scripts/Inelastic/Direct/&amp;#039;&amp;#039; or see [https://github.com/mantidproject/mantid/tree/master/scripts/Inelastic/Direct Mantid distribution on the web]. These scripts set up and run various [http://docs.mantidproject.org/nightly/algorithms/index.html Mantid algorithms] to process input data according to the instrument related settings defined in [https://github.com/mantidproject/mantid/tree/master/instrument Instrument parameters files] and  the settings, specific to a particular experiment. The later settings have to be done by instrument scientist and user locally in special scripts, allowing user to make these settings and run Mantid to reduce their data. An instrument specific examples of such scripts are part of Mantid continuous integration system and can be accessed on the web: (see, e.g. [https://github.com/mantidproject/mantid/blob/master/Testing/SystemTests/tests/analysis/ISIS_MariReduction.py MARI], [https://github.com/mantidproject/mantid/blob/master/Testing/SystemTests/tests/analysis/ISIS_MAPS_DGSReduction.py MAPS], [https://github.com/mantidproject/mantid/blob/master/Testing/SystemTests/tests/analysis/ISIS_MERLINReduction.py MERLIN] and [https://github.com/mantidproject/mantid/blob/master/Testing/SystemTests/tests/analysis/ISIS_LETReduction.py LET] or [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/ISIS_direct_reduction_script_description. their separate description] within this wiki)&lt;br /&gt;
&lt;br /&gt;
Instrument scientists modify these scripts according to the requests of a particular experiment and Mantid provides special way to share these scripts through &amp;#039;&amp;#039;&amp;#039;Mantid script repository&amp;#039;&amp;#039;&amp;#039; configured at&lt;br /&gt;
&lt;br /&gt;
  File-&amp;gt;Script Repository &lt;br /&gt;
&lt;br /&gt;
field of Mantid GUI (see field pointed at as 1 on the picture below):&lt;br /&gt;
&lt;br /&gt;
[[File:InstallScriptRepositorye.png|800px]]&lt;br /&gt;
&lt;br /&gt;
The repository, installed locally according to the wizard invoked from this menu allows to download scripts located in the repository and share &lt;br /&gt;
the changes made to these files with other users of this repository.  In addition to data exchange, ScriptRepository wizard configures Python path, to make repository&amp;#039;s scripts runnable from Mantid. When Mantid starts, it updates its  local copy of the &amp;#039;&amp;#039;&amp;#039;Mantid script repository&amp;#039;&amp;#039;&amp;#039; from the web. The progress of this operations reported to the Mantid log window (shown as the background of the fig above)&lt;br /&gt;
Default parameters of these scripts are part of Mantid and are described [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_instrument_parameters,_necessary_to_reduce_data#Instrument_Definition_Files in Instrument Definition Files] section of this Wiki.&lt;br /&gt;
&lt;br /&gt;
Physically the &amp;#039;&amp;#039;&amp;#039;Mantid script repository&amp;#039;&amp;#039;&amp;#039; is located on [https://github.com/mantidproject/scriptrepository GitHub] and is normal Git repository, which is accessed through simplified Mantid GUI interface, but can also be operated by a person who has github account and is familiar with Git by accessing [https://github.com/mantidproject/scriptrepository GitScriptRepository] link and performing normal git operations. &lt;br /&gt;
&lt;br /&gt;
[https://isis.analysis.stfc.ac.uk/workspaces/ IDAaaS workspaces] have Git repository cloned at &lt;br /&gt;
&lt;br /&gt;
  /opt/UserScripts/&lt;br /&gt;
&lt;br /&gt;
folder, where the folder: &lt;br /&gt;
&lt;br /&gt;
  /opt/UserScripts/direct_inelastic/&amp;#039;&amp;#039;&amp;#039;[InstrumentName]&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
contains scripts, used by excitation group. [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Automatic_user_configuration Automatic user configuration scripts] configure Mantid in user accounts to be able to run the scripts from this repository.  In addition to that, configuration script processes special [https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/MARI/USER_Files_description.xml USER_Files_description.xml] file, if one is found in particular instrument folder and copy all files, specified in this file to the RB folders, corresponding to the instrument. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To have write access to the repository through Mantid (and see what is actually there using Mantid GUI) users have to install &amp;#039;&amp;#039;&amp;#039;Mantid script repository&amp;#039;&amp;#039;&amp;#039; through Mantid (or Git) into their accounts. &lt;br /&gt;
&lt;br /&gt;
[https://github.com/FITLinuxSupport/analysisscripts/blob/master/UpdateSVN Small configuration script] runs on IDAaaS every hour, and together with updating [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_instrument_parameters,_necessary_to_reduce_data Instrument Parameters repository], updates git repository, so all files changed or added by instrument scientists become available on all IDAaaS VM or local instrument machines within an hour.  Members of excitation staff group can update the repository on request. See [[Automatic user configuration]] pages for detailed description of things, done to provide users with up-to-date data and parameters. &lt;br /&gt;
&lt;br /&gt;
As &amp;#039;&amp;#039;&amp;#039;Mantid script repository&amp;#039;&amp;#039;&amp;#039; is a git repository, it has to obey the constrains imposed by GitHub. One of this constrains is the limitation on the size of the files allowed to be stored on GitHub. This does not allow to use Git repository for storing [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_instrument_parameters,_necessary_to_reduce_data Instrument files], necessary for data analysis, so local svn repository, described in [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_instrument_parameters,_necessary_to_reduce_data another chapter], has to be used instead.&lt;br /&gt;
&lt;br /&gt;
[http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Setting_up_Mantid,_Matlab_and_auxiliary_programs_to_process_results_of_inelastic_experiments. Back to setting up Mantid]&lt;/div&gt;</summary>
		<author><name>Alex Buts</name></author>
	</entry>
	<entry>
		<id>http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Reduction_scripts&amp;diff=397</id>
		<title>Reduction scripts</title>
		<link rel="alternate" type="text/html" href="http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Reduction_scripts&amp;diff=397"/>
		<updated>2023-01-09T16:20:42Z</updated>

		<summary type="html">&lt;p&gt;Alex Buts: /* Reduction scripts used to process the experimental results */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Reduction scripts used to process the experimental results == &lt;br /&gt;
&lt;br /&gt;
ISIS reduction scripts contain number of interconnected scripts which are the part of Mantid and can be located in &amp;#039;&amp;#039;Mantid Installation Folder/scripts/Inelastic/Direct/&amp;#039;&amp;#039; or see [https://github.com/mantidproject/mantid/tree/master/scripts/Inelastic/Direct Mantid distribution on the web]. These scripts set up and run various [http://docs.mantidproject.org/nightly/algorithms/index.html Mantid algorithms] to process input data according to the instrument related settings defined in [https://github.com/mantidproject/mantid/tree/master/instrument Instrument parameters files] and  the settings, specific to a particular experiment. The later settings have to be done by instrument scientist and user locally in special scripts, allowing user to make these settings and run Mantid to reduce their data. An instrument specific examples of such scripts are part of Mantid continuous integration system and can be accessed on the web: (see, e.g. [https://github.com/mantidproject/mantid/blob/master/Testing/SystemTests/tests/analysis/ISIS_MariReduction.py MARI], [https://github.com/mantidproject/mantid/blob/master/Testing/SystemTests/tests/analysis/ISIS_MAPS_DGSReduction.py MAPS], [https://github.com/mantidproject/mantid/blob/master/Testing/SystemTests/tests/analysis/ISIS_MERLINReduction.py MERLIN] and [https://github.com/mantidproject/mantid/blob/master/Testing/SystemTests/tests/analysis/ISIS_LETReduction.py LET] or [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/ISIS_direct_reduction_script_description. their separate description] within this wiki)&lt;br /&gt;
&lt;br /&gt;
Instrument scientists modify these scripts according to the requests of a particular experiment and Mantid provides special way to share these scripts through &amp;#039;&amp;#039;&amp;#039;Mantid script repository&amp;#039;&amp;#039;&amp;#039; configured at&lt;br /&gt;
&lt;br /&gt;
  File-&amp;gt;Script Repository &lt;br /&gt;
&lt;br /&gt;
field of Mantid GUI (see field pointed at as 1 on the picture below):&lt;br /&gt;
&lt;br /&gt;
[[File:InstallScriptRepositorye.png|800px]]&lt;br /&gt;
&lt;br /&gt;
The repository, installed locally according to the wizard invoked from this menu allows to download scripts located in the repository and share &lt;br /&gt;
the changes made to these files with other users of this repository.  In addition to data exchange, ScriptRepository wizard configures Python path, to make repository&amp;#039;s scripts runnable from Mantid. When Mantid starts, it updates its  local copy of the &amp;#039;&amp;#039;&amp;#039;Mantid script repository&amp;#039;&amp;#039;&amp;#039; from the web. The progress of this operations reported to the Mantid log window (shown as the background of the fig above)&lt;br /&gt;
Default parameters of these scripts are part of Mantid and are described [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_instrument_parameters,_necessary_to_reduce_data#Instrument_Definition_Files in Instrument Definition Files] section of this Wiki.&lt;br /&gt;
&lt;br /&gt;
Physically the &amp;#039;&amp;#039;&amp;#039;Mantid script repository&amp;#039;&amp;#039;&amp;#039; is located on [https://github.com/mantidproject/scriptrepository GitHub] and is normal Git repository, which is accessed through simplified Mantid GUI interface, but can also be operated by a person who has github account and is familiar with Git by accessing [https://github.com/mantidproject/scriptrepository GitScriptRepository] link and performing normal git operations. &lt;br /&gt;
&lt;br /&gt;
[https://isis.analysis.stfc.ac.uk/workspaces/ IDAaaS workspaces] have Git repository cloned at &lt;br /&gt;
&lt;br /&gt;
  /opt/UserScripts/&lt;br /&gt;
&lt;br /&gt;
folder, where the folder: &lt;br /&gt;
&lt;br /&gt;
  /opt/UserScripts/direct_inelastic/&amp;#039;&amp;#039;&amp;#039;[InstrumentName]&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
contains scripts, used by excitation group. [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Automatic_user_configuration Automatic user configuration scripts] configure Mantid in user accounts to be able to run the scripts from this repository.  In addition to that, configuration script processes special [https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/MARI/USER_Files_description.xml USER_Files_description.xml] file, if one is found in particular instrument folder and copy all files, specified in this file to the RB folders, corresponding to the instrument. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To have write access to the repository through Mantid (and see what is actually there using Mantid GUI) users have to install &amp;#039;&amp;#039;&amp;#039;Mantid script repository&amp;#039;&amp;#039;&amp;#039; through Mantid (or Git) into their accounts. &lt;br /&gt;
&lt;br /&gt;
[https://github.com/FITLinuxSupport/analysisscripts/blob/master/UpdateSVN Small configuration script] runs on IDAaaS every hour, and together with updating [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_instrument_parameters,_necessary_to_reduce_data Instrument Parameters repository], updates git repository, so all files changed or added by instrument scientists become available on all IDAaaS VM or local instrument machines within an hour.  Members of excitation staff group can update the repository on request. See [[Automatic user configuration]] pages for detailed description of things, done to provide users with up-to-date data and parameters. &lt;br /&gt;
&lt;br /&gt;
As &amp;#039;&amp;#039;&amp;#039;Mantid script repository&amp;#039;&amp;#039;&amp;#039; is a git repository, it has to obey the constrains imposed by GitHub. One of this constrains is the limitation on the size of the files allowed to be stored on GitHub. This does not allow to use Git repository for storing [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_instrument_parameters,_necessary_to_reduce_data Instrument files], necessary for data analysis, so local svn repository, described in [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_instrument_parameters,_necessary_to_reduce_data another chapter], has to be used instead.&lt;/div&gt;</summary>
		<author><name>Alex Buts</name></author>
	</entry>
	<entry>
		<id>http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Reduction_scripts&amp;diff=396</id>
		<title>Reduction scripts</title>
		<link rel="alternate" type="text/html" href="http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Reduction_scripts&amp;diff=396"/>
		<updated>2023-01-09T16:19:24Z</updated>

		<summary type="html">&lt;p&gt;Alex Buts: /* Reduction scripts used to process the experimental results */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Reduction scripts used to process the experimental results == &lt;br /&gt;
&lt;br /&gt;
ISIS reduction scripts contain number of interconnected scripts which are the part of Mantid and can be located in &amp;#039;&amp;#039;Mantid Installation Folder/scripts/Inelastic/Direct/&amp;#039;&amp;#039; or see [https://github.com/mantidproject/mantid/tree/master/scripts/Inelastic/Direct Mantid distribution on the web]. These scripts set up and run various [http://docs.mantidproject.org/nightly/algorithms/index.html Mantid algorithms] to process input data according to the instrument related settings defined in [https://github.com/mantidproject/mantid/tree/master/instrument Instrument parameters files] and  the settings, specific to a particular experiment. The later settings have to be done by instrument scientist and user locally in special scripts, allowing user to make these settings and run Mantid to reduce their data. An instrument specific examples of such scripts are part of Mantid continuous integration system and can be accessed on the web: (see, e.g. [https://github.com/mantidproject/mantid/blob/master/Testing/SystemTests/tests/analysis/ISIS_MariReduction.py MARI], [https://github.com/mantidproject/mantid/blob/master/Testing/SystemTests/tests/analysis/ISIS_MAPS_DGSReduction.py MAPS], [https://github.com/mantidproject/mantid/blob/master/Testing/SystemTests/tests/analysis/ISIS_MERLINReduction.py MERLIN] and [https://github.com/mantidproject/mantid/blob/master/Testing/SystemTests/tests/analysis/ISIS_LETReduction.py LET] or [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/ISIS_direct_reduction_script_description. their separate description] within this wiki)&lt;br /&gt;
&lt;br /&gt;
Instrument scientists modify these scripts according to the requests of a particular experiment and Mantid provides special way to share these scripts through &amp;#039;&amp;#039;&amp;#039;Mantid script repository&amp;#039;&amp;#039;&amp;#039; configured at&lt;br /&gt;
&lt;br /&gt;
  File-&amp;gt;Script Repository &lt;br /&gt;
&lt;br /&gt;
field of Mantid GUI (see field pointed at as 1 on the picture below):&lt;br /&gt;
&lt;br /&gt;
[[File:InstallScriptRepositorye.png|800px]]&lt;br /&gt;
&lt;br /&gt;
The repository, installed locally according to the wizard invoked from this menu allows to download scripts located in the repository and share &lt;br /&gt;
the changes made to these files with other users of this repository.  In addition to data exchange, ScriptRepository wizard configures Python path, to make repository&amp;#039;s scripts runnable from Mantid. When Mantid starts, it updates its  local copy of the &amp;#039;&amp;#039;&amp;#039;Mantid script repository&amp;#039;&amp;#039;&amp;#039; from the web. The progress of this operations reported to the Mantid log window (shown as the background of the fig above)&lt;br /&gt;
Default parameters of these scripts are part of Mantid and are described [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_instrument_parameters,_necessary_to_reduce_data#Instrument_Definition_Files in Instrument Definition Files] section of this Wiki.&lt;br /&gt;
&lt;br /&gt;
Physically the &amp;#039;&amp;#039;&amp;#039;Mantid script repository&amp;#039;&amp;#039;&amp;#039; is located on [https://github.com/mantidproject/scriptrepository GitHub] and is normal Git repository, which is accessed through simplified Mantid GUI interface, but can also be operated by a person who has github account and is familiar with Git by accessing [https://github.com/mantidproject/scriptrepository GitScriptRepository] link and performing normal git operations. &lt;br /&gt;
&lt;br /&gt;
[https://isis.analysis.stfc.ac.uk/workspaces/ IDAaaS workspaces] have Git repository cloned at &lt;br /&gt;
&lt;br /&gt;
  /opt/UserScripts/&lt;br /&gt;
&lt;br /&gt;
folder, where the folder: &lt;br /&gt;
&lt;br /&gt;
  /opt/UserScripts/direct_inelastic/&amp;#039;&amp;#039;&amp;#039;[InstrumentName]&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
contains scripts, used by excitation group. [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Automatic_user_configuration Automatic user configuration scripts] configure Mantid in user accounts to be able to run the scripts from this repository.  In addition to that, configuration script processes special [https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/MARI/USER_Files_description.xml USER_Files_description.xml] file, if one is found in particular instrument folder and copy all files, specified in this file to the RB folders, corresponding to the instrument. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To have write access to the repository through Mantid (and see what is actually there using Mantid GUI) users have to install &amp;#039;&amp;#039;&amp;#039;Mantid script repository&amp;#039;&amp;#039;&amp;#039; through Mantid (or Git) into their accounts. &lt;br /&gt;
&lt;br /&gt;
[https://github.com/FITLinuxSupport/analysisscripts/blob/master/UpdateSVN Small configuration script] runs on IDAaaS every hour, and together with updating [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_instrument_parameters,_necessary_to_reduce_data Instrument Parameters repository], updates git repository, so all files changed or added by instrument scientists become available on all IDAaaS VM or local instrument machines within an hour.  Members of excitation staff group can update the repository on request. See [[Automatic user configuration]] pages for detailed description of things, done to provide users with up-to-date data and parameters. &lt;br /&gt;
&lt;br /&gt;
As &amp;#039;&amp;#039;&amp;#039;Mantid script repository&amp;#039;&amp;#039;&amp;#039; is a git repository, it has to obey the constrains imposed by GitHub. One of this constrains is the limitation on the size of the files allowed to be stored on GitHub. This does not allow to use Git repository for storing [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_instrument_parameters,_necessary_to_reduce_data Instrument files], necessary for data analysis, so local svn repository, described in [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_instrument_parameters,_necessary_to_reduce_data another chapter], has to be used instead. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#0000ff; background:#FF69B4&amp;quot;&amp;gt;  [http://www.isis.stfc.ac.uk/instruments/mari/mari4765.html MARI] instrument scientists who use small instrument parameter files, were able to use &amp;#039;&amp;#039;&amp;#039;Mantid script repository&amp;#039;&amp;#039;&amp;#039; for instrument files, but even this does not work very well. Any other instrument just can not push sufficient size files to Git.&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#0000ff; background:#FF69B4&amp;quot;&amp;gt; &lt;br /&gt;
At the fall of 2015 GitHub introduced [https://git-lfs.github.com/ Large file storage] so instrument files can be now stored in GitHub, though Mantid should be modified to use such possibility  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Setting_up_Mantid,_Matlab_and_auxiliary_programs_to_process_results_of_inelastic_experiments. Back to setting up Mantid]&lt;/div&gt;</summary>
		<author><name>Alex Buts</name></author>
	</entry>
	<entry>
		<id>http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Reduction_scripts&amp;diff=395</id>
		<title>Reduction scripts</title>
		<link rel="alternate" type="text/html" href="http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Reduction_scripts&amp;diff=395"/>
		<updated>2023-01-09T16:16:56Z</updated>

		<summary type="html">&lt;p&gt;Alex Buts: /* Reduction scripts used to process the experimental results */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Reduction scripts used to process the experimental results == &lt;br /&gt;
&lt;br /&gt;
ISIS reduction scripts contain number of interconnected scripts which are the part of Mantid and can be located in &amp;#039;&amp;#039;Mantid Installation Folder/scripts/Inelastic/Direct/&amp;#039;&amp;#039; or see [https://github.com/mantidproject/mantid/tree/master/scripts/Inelastic/Direct Mantid distribution on the web]. These scripts set up and run various [http://docs.mantidproject.org/nightly/algorithms/index.html Mantid algorithms] to process input data according to the instrument related settings defined in [https://github.com/mantidproject/mantid/tree/master/instrument Instrument parameters files] and  the settings, specific to a particular experiment. The later settings have to be done by instrument scientist and user locally in special scripts, allowing user to make these settings and run Mantid to reduce their data. An instrument specific examples of such scripts are part of Mantid continuous integration system and can be accessed on the web: (see, e.g. [https://github.com/mantidproject/mantid/blob/master/Testing/SystemTests/tests/analysis/ISIS_MariReduction.py MARI], [https://github.com/mantidproject/mantid/blob/master/Testing/SystemTests/tests/analysis/ISIS_MAPS_DGSReduction.py MAPS], [https://github.com/mantidproject/mantid/blob/master/Testing/SystemTests/tests/analysis/ISIS_MERLINReduction.py MERLIN] and [https://github.com/mantidproject/mantid/blob/master/Testing/SystemTests/tests/analysis/ISIS_LETReduction.py LET] or [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/ISIS_direct_reduction_script_description. their separate description] within this wiki)&lt;br /&gt;
&lt;br /&gt;
Instrument scientists modify these scripts according to the requests of a particular experiment and Mantid provides special way to share these scripts through &amp;#039;&amp;#039;&amp;#039;Mantid script repository&amp;#039;&amp;#039;&amp;#039; configured at&lt;br /&gt;
&lt;br /&gt;
  File-&amp;gt;Script Repository &lt;br /&gt;
&lt;br /&gt;
field of Mantid GUI (see field pointed at as 1 on the picture below):&lt;br /&gt;
&lt;br /&gt;
[[File:InstallScriptRepositorye.png|800px]]&lt;br /&gt;
&lt;br /&gt;
The repository, installed locally according to the wizard invoked from this menu allows to download scripts located in the repository and share &lt;br /&gt;
the changes made to these files with other users of this repository.  In addition to data exchange, ScriptRepository wizard configures Python path, to make repository&amp;#039;s scripts runnable from Mantid. When Mantid starts, it updates its  local copy of the &amp;#039;&amp;#039;&amp;#039;Mantid script repository&amp;#039;&amp;#039;&amp;#039; from the web. The progress of this operations reported to the Mantid log window (shown as the background of the fig above)&lt;br /&gt;
Default parameters of these scripts are part of Mantid and are described [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_instrument_parameters,_necessary_to_reduce_data#Instrument_Definition_Files in Instrument Definition Files] section of this Wiki.&lt;br /&gt;
&lt;br /&gt;
Physically the &amp;#039;&amp;#039;&amp;#039;Mantid script repository&amp;#039;&amp;#039;&amp;#039; is located on [https://github.com/mantidproject/scriptrepository GitHub] and is normal Git repository, which is accessed through simplified Mantid GUI interface, but can also be operated by a person who has github account and is familiar with Git by accessing [https://github.com/mantidproject/scriptrepository GitScriptRepository] link and performing normal git operations. &lt;br /&gt;
&lt;br /&gt;
[https://isis.analysis.stfc.ac.uk/workspaces/ IDAaaS workspaces] have Git repository cloned at &lt;br /&gt;
&lt;br /&gt;
  /opt/UserScripts/&lt;br /&gt;
&lt;br /&gt;
folder, where the folder: &lt;br /&gt;
&lt;br /&gt;
  /opt/UserScripts/direct_inelastic/&amp;#039;&amp;#039;&amp;#039;[InstrumentName]&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
contains scripts, used by excitation group. [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Automatic_user_configuration Automatic user configuration scripts] configure Mantid in user accounts to be able to run the scripts from this repository.  In addition to that, configuration script processes special [https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/MARI/USER_Files_description.xml USER_Files_description.xml] file, if one is found in particular instrument folder and copy all files, specified in this file to the RB folders, corresponding to the instrument. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To have write access to the repository through Mantid (and see what is actually there using Mantid GUI) users have to install &amp;#039;&amp;#039;&amp;#039;Mantid script repository&amp;#039;&amp;#039;&amp;#039; through Mantid (or Git) into their accounts. &lt;br /&gt;
&lt;br /&gt;
[https://github.com/FITLinuxSupport/analysisscripts/blob/master/UpdateSVN Small configuration script] runs on isiscompute every hour, and together with updating [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_instrument_parameters,_necessary_to_reduce_data Instrument Parameters repository], updates git repository, so all files changed or added by instrument scientists become available on isiscompute within an hour.  This script operations are logged to:&lt;br /&gt;
&lt;br /&gt;
 /var/log/UpdateSVN.log.&lt;br /&gt;
&lt;br /&gt;
which is available on &amp;#039;&amp;#039;&amp;#039;ndmlnx01&amp;#039;&amp;#039;&amp;#039; node only. Root can update the repository on request. See [[Automatic user configuration]] pages for detailed description of things, done to provide users with up-to-date data and parameters. &lt;br /&gt;
&lt;br /&gt;
As &amp;#039;&amp;#039;&amp;#039;Mantid script repository&amp;#039;&amp;#039;&amp;#039; is a git repository, it has to obey the constrains imposed by GitHub. One of this constrains is the limitation on the size of the files allowed to be stored on GitHub. This does not allow to use Git repository for storing [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_instrument_parameters,_necessary_to_reduce_data Instrument files], necessary for data analysis, so local svn repository, described in [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_instrument_parameters,_necessary_to_reduce_data another chapter], has to be used instead. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#0000ff; background:#FF69B4&amp;quot;&amp;gt;  [http://www.isis.stfc.ac.uk/instruments/mari/mari4765.html MARI] instrument scientists who use small instrument parameter files, were able to use &amp;#039;&amp;#039;&amp;#039;Mantid script repository&amp;#039;&amp;#039;&amp;#039; for instrument files, but even this does not work very well. Any other instrument just can not push sufficient size files to Git.&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#0000ff; background:#FF69B4&amp;quot;&amp;gt; &lt;br /&gt;
At the fall of 2015 GitHub introduced [https://git-lfs.github.com/ Large file storage] so instrument files can be now stored in GitHub, though Mantid should be modified to use such possibility  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Setting_up_Mantid,_Matlab_and_auxiliary_programs_to_process_results_of_inelastic_experiments. Back to setting up Mantid]&lt;/div&gt;</summary>
		<author><name>Alex Buts</name></author>
	</entry>
	<entry>
		<id>http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Main_Page&amp;diff=394</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Main_Page&amp;diff=394"/>
		<updated>2023-01-09T16:12:25Z</updated>

		<summary type="html">&lt;p&gt;Alex Buts: /* ISIS Direct Inelastic Data Reduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ISIS Direct Inelastic Data Reduction == &lt;br /&gt;
&lt;br /&gt;
Inelastic data reduction is the process of transforming data obtained in inelastic scattering experiment into the data, describing inelastic cross-sections of the processes under investigation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To process the data recorded by [https://www.isis.stfc.ac.uk/Pages/Neutron-spectroscopy.aspx Direct Inelastic Instruments] and obtain the desired cross-sections ISIS scientists use the [http://www.mantidproject.org/Main_Page Mantid-based] reduction program with a range of additional data and set-up parameters, tuning up this program to the particular inelastic instrument and experimental conditions. Users are also provided with access to the [https://isis.analysis.stfc.ac.uk/ cluster of virtual machines], dedicated to help them in processing raw experimental data into the form, which has physical meaning.&lt;br /&gt;
&lt;br /&gt;
From a user&amp;#039;s point of view, the processing of their results should be simple and straightforward, namely:&lt;br /&gt;
&lt;br /&gt;
# User logs into his or her [https://data.analysis.stfc.ac.uk/ IDAaaS account] with logon name and password, obtained from the user office and launches virtual machine (creates workspace), dedicated for the instrument and technique used in the experiment. In his home directory he finds a folder with the RB-name of the proposal, approved for the experiment. &lt;br /&gt;
# In this RB folder user can find a python script, necessary to process the results of the experiment, obtained from the instrument. User opens this script in Mantid, changes the run numbers to the numbers obtained in the experiment, can change some reduction parameters familiar to him (the description of the parameters is provided within the script) and runs the script to processes the results of the experiment. User should not need to set up Mantid or modify the advanced reduction parameters.&lt;br /&gt;
# The desktop of the users account also contains links to more advanced sample [http://horace.isis.rl.ac.uk/Main_Page Horace] and Mantid scripts for further analysis and visualization of the experimental data. Some advanced Mantid scripts are also described below. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Services, resources and Mantid settings necessary to allow users to process their data ===&lt;br /&gt;
&lt;br /&gt;
This chapter contains the information about the data reduction service, implemented in ISIS. &lt;br /&gt;
User should familiarize himself with the information on [[Setting up Mantid, Matlab and auxiliary programs to process results of inelastic experiments.]]&lt;br /&gt;
if he is going to set up and process results of his experiments on a computers outside ISIS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
=== Autoreduction service ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; &amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt; On 01/08/2017 Autoreduction service has been disabled for inelastic instruments.&amp;lt;/span&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When Autoreduction service is enabled and set up properly, users data are also processed automatically, namely:&lt;br /&gt;
# Within RB folder a user finds folder named &amp;#039;&amp;#039;&amp;#039;autoreduction&amp;#039;&amp;#039;&amp;#039;. The folder should contain the reduced data processed automatically by [https://users.facilities.rl.ac.uk/auth/?service=http://reduce.isis.cclrc.ac.uk&amp;amp;redirecturl=http://reduce.isis.cclrc.ac.uk/ autoreduction service], which runs on a separate powerful machine and picks up the results of the experiments as they are completed and rapidly reduces them using a script similar to the one the users have in their RB folder.&lt;br /&gt;
#If necessary and convenient, the users should be able to change some parameters and reprocess some or all their runs using the web-interface and [https://users.facilities.rl.ac.uk/auth/?service=http://reduce.isis.cclrc.ac.uk&amp;amp;redirecturl=http://reduce.isis.cclrc.ac.uk/  autoreduction service].&lt;br /&gt;
#The common part of raw data processing (e.g. generation of the &amp;#039;&amp;#039;sqw&amp;#039;&amp;#039; files) can also be delegated to the [https://users.facilities.rl.ac.uk/auth/?service=http://reduce.isis.cclrc.ac.uk&amp;amp;redirecturl=http://reduce.isis.cclrc.ac.uk/  autoreduction service].&lt;br /&gt;
&lt;br /&gt;
The autoreduction service is currently working in test mode, so its availability and reliability are not guaranteed.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Crystal alignment using Mantid]] ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reduction scripts ===&lt;br /&gt;
&lt;br /&gt;
[[ISIS direct reduction script description. ]] contains short description of the scripts, used to process results of the inelastic experiments in ISIS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Chopper parameters ===&lt;br /&gt;
&lt;br /&gt;
Reference material containing information about choppers, used by ISIS inelastic instruments, necessary for chopper &amp;#039;&amp;#039;&amp;#039;flux&amp;amp;resolution&amp;#039;&amp;#039;&amp;#039; calculations can be found in the [[Chopper Parameters]] chapter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Help with editing this wiki ===&lt;br /&gt;
&lt;br /&gt;
Consult the [//meta.wikimedia.org/wiki/Help:Contents User&amp;#039;s Guide] for information on using the wiki software.&lt;br /&gt;
&lt;br /&gt;
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Configuration settings list]&lt;br /&gt;
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]&lt;br /&gt;
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]&lt;/div&gt;</summary>
		<author><name>Alex Buts</name></author>
	</entry>
	<entry>
		<id>http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Instrument_parameters_and_Instrument_definitions&amp;diff=393</id>
		<title>Instrument parameters and Instrument definitions</title>
		<link rel="alternate" type="text/html" href="http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Instrument_parameters_and_Instrument_definitions&amp;diff=393"/>
		<updated>2023-01-09T16:07:31Z</updated>

		<summary type="html">&lt;p&gt;Alex Buts: /* Experiment specific parameters */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Experiment specific parameters == &lt;br /&gt;
&lt;br /&gt;
To reduce experimental data described in the previous chapter, user needs access to [http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Location_and_details_of_access_to_instrument_parameters,_necessary_to_reduce_data#Instrument_Definition_Files Instrument Definition Files] (IDF) defining main configuration of the instrument and parameters of the script, [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_sample_scripts_used_in_data_processing which processes the data], and the range of auxiliary files such as &amp;#039;&amp;#039;&amp;#039;detector calibration file&amp;#039;&amp;#039;&amp;#039;, defining actual neutronic positions of detectors in an experiment, &amp;#039;&amp;#039;&amp;#039;map files&amp;#039;&amp;#039;&amp;#039; (extension .map), defining the detector grouping, &amp;#039;&amp;#039;&amp;#039;mask files&amp;#039;&amp;#039;&amp;#039; (extension .msk) defining the lists of detectors which should not be processed and in less extend other files (.par, .phx, .nxs etc.)&lt;br /&gt;
&lt;br /&gt;
The source of these files is stored in publicly available [https://github.com/pace-neutrons/InstrumentFiles GitHub archive] This archive is cloned to [https://isis.analysis.stfc.ac.uk/ IDAaaS workspaces] and instrument cabin computers at&lt;br /&gt;
&lt;br /&gt;
  /usr/local/mprogs/InstrumentFiles/[INSTRUMENT_NAME]&lt;br /&gt;
&lt;br /&gt;
folder where the &amp;#039;&amp;#039;&amp;#039;INSTRUMENT_NAME&amp;#039;&amp;#039;&amp;#039; should be replaced by one out of &amp;#039;&amp;#039;&amp;#039;[mari,maps,merlin,let]&amp;#039;&amp;#039;&amp;#039; values list. Some instrument scientists create symbolic links (usually on Desktop) providing quick access to the files relevant for a particular instrument. &lt;br /&gt;
&lt;br /&gt;
[http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Automatic_user_configuration Automatic configuration scripts] running on IDAaaS automatically adds appropriate folder, corresponding to the instrument to the Mantid data search path (see picture below). This make the data, stored in the folder available to the [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_sample_scripts_used_in_data_processing reduction scripts] and places the link to the instrument files the folder within IDAaaS machine menue. &lt;br /&gt;
&lt;br /&gt;
[[File:instrumentFiles.png]]&lt;br /&gt;
&lt;br /&gt;
The path to the requested instrument parameters on the picture above is set to &amp;#039;&amp;#039;&amp;#039;merlin&amp;#039;&amp;#039;&amp;#039; instrument parameter&amp;#039;s folder in the first row of the data search path folders list (blue arrow).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If user wants to run reduction on their own computer, he needs to checkout instrument files from the [https://github.com/pace-neutrons/InstrumentFiles GitHub archive]. Everybody can clone data from this server and some instrument scientists have write access to it. Contact [mailto:alex.buts@stfc.ac.uk Alex Buts] or [mailto:Duc.Le@stfc.ac.uk Duc Lee] if you believe you need write access to the server. &lt;br /&gt;
On a Unix machine, an authorized person can add an instrument file to the source control and send it to the server by placing the file into appropriate instrument folder and issuing the following commands:&lt;br /&gt;
&lt;br /&gt;
  git add &amp;quot;file_name&amp;quot;&lt;br /&gt;
  git commit -m&amp;quot; message describing purpose of the file&amp;quot;&lt;br /&gt;
  git push&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://github.com/FITLinuxSupport/analysisscripts/blob/master/UpdateSVN Simple scripts] are running each hour on instrument cabin machines and IDAaaS servers pulling data from [https://github.com/pace-neutrons/InstrumentFiles GitHub], so the file added to the server on any machine is ready to be used everywhere within an hour. The result of script operations is currently mailed to main instrument machine user (&amp;#039;&amp;#039;mari&amp;#039;&amp;#039;, &amp;#039;&amp;#039;let&amp;#039;&amp;#039;,&amp;#039;&amp;#039;maps&amp;#039;&amp;#039; or &amp;#039;&amp;#039;merlin&amp;#039;&amp;#039;) so you can see results of these scripts work logging in as this user and typing&lt;br /&gt;
 &lt;br /&gt;
 &amp;gt;&amp;gt;mail &lt;br /&gt;
&lt;br /&gt;
command. The logs are regularly reviewed and cleared up manually. &lt;br /&gt;
&lt;br /&gt;
The GIT command:&lt;br /&gt;
 &lt;br /&gt;
  git pull&lt;br /&gt;
&lt;br /&gt;
can be issued from the instruments folder of a particular machine (always &amp;#039;&amp;#039;&amp;#039;/usr/local/mprogs/InstrumentFiles/&amp;#039;&amp;#039;&amp;#039; but may have additional references on particular machines) to get immediate access to a new data, but on [https://isis.analysis.stfc.ac.uk/ IDAaaS virtual machines] this command is restricted to the members of the excitation group staff.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#0000ff; background:#FF69B4&amp;quot;&amp;gt; In 2015 git was the most convenient way to provide data synchronization between various computers, but other methods are available now. &lt;br /&gt;
Group needs to discuss if this is still appropriate way of sharing data these days. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Setting_up_Mantid,_Matlab_and_auxiliary_programs_to_process_results_of_inelastic_experiments. Back to setting up Mantid]&lt;br /&gt;
&lt;br /&gt;
== Instrument Specific Files (Instrument Definitions) ==&lt;br /&gt;
&lt;br /&gt;
Instrument definition files, which describe the the instrument configuration and main parameters of the reduction are part of [http://docs.mantidproject.org/nightly/concepts/InstrumentDefinitionFile.html Mantid] and are usually located in &amp;#039;&amp;#039;/opt/Mantid/instrument&amp;#039;&amp;#039; folder on Unix or &amp;#039;&amp;#039;MantidInstallationFolder\instrument&amp;#039;&amp;#039;  folder (&amp;#039;&amp;#039;c:\MantidInstall\instrument&amp;#039;&amp;#039; by default) on Windows.&lt;br /&gt;
&lt;br /&gt;
Newer version of these files produced after Mantid release are automatically retrieved by Matnid at startup into &amp;#039;&amp;#039;~/.mantid/instrument&amp;#039;&amp;#039; on Unix or &amp;#039;&amp;#039;c:\Users\USERACCOUNT_FOLDER\AppData\Roaming\mantidproject\mantid\instrument&amp;#039;&amp;#039; folder on Windows. Such files, if present for a particular instrument override files in Mantid installation directory. &lt;br /&gt;
&lt;br /&gt;
  INSTRUMENT_NAME_Parameters.xml&lt;br /&gt;
&lt;br /&gt;
file provide comprehensive list and description of almost all parameters used by [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_sample_scripts_used_in_data_processing the data reduction script] and the file:&lt;br /&gt;
&lt;br /&gt;
  INSTRUMENT_NAME_Definition.xml&lt;br /&gt;
&lt;br /&gt;
describes all details of the instrument geometry. For further details of the file format and their contents user should look at [http://docs.mantidproject.org/nightly/concepts/InstrumentDefinitionFile.html Mantid IDF description] pages.&lt;br /&gt;
&lt;br /&gt;
Actual default parameters for inelastic data reduction scripts, which are used by Mantid reduction script can also be accessed on the web from Mantid Git repository:&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/mantidproject/mantid/blob/master/instrument/MARI_Parameters.xml MARI Reduction parameters]&lt;br /&gt;
*[https://github.com/mantidproject/mantid/blob/master/instrument/MAPS_Parameters.xml MAPS Reduction parameters]&lt;br /&gt;
*[https://github.com/mantidproject/mantid/blob/master/instrument/MERLIN_Parameters_after2013_4.xml MERLIN Reduction parameters]&lt;br /&gt;
*[https://github.com/mantidproject/mantid/blob/master/instrument/LET_Parameters_dr1to12.xml LET Reduction parameters]&lt;br /&gt;
*[https://github.com/mantidproject/mantid/blob/master/instrument/HET_Parameters.xml HET Reduction parameters]&lt;br /&gt;
&lt;br /&gt;
[http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Setting_up_Mantid,_Matlab_and_auxiliary_programs_to_process_results_of_inelastic_experiments. Back to setting up Mantid]&lt;/div&gt;</summary>
		<author><name>Alex Buts</name></author>
	</entry>
	<entry>
		<id>http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Instrument_parameters_and_Instrument_definitions&amp;diff=392</id>
		<title>Instrument parameters and Instrument definitions</title>
		<link rel="alternate" type="text/html" href="http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Instrument_parameters_and_Instrument_definitions&amp;diff=392"/>
		<updated>2023-01-09T16:02:39Z</updated>

		<summary type="html">&lt;p&gt;Alex Buts: /* Experiment specific parameters */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Experiment specific parameters == &lt;br /&gt;
&lt;br /&gt;
To reduce experimental data described in the previous chapter, user needs access to [http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Location_and_details_of_access_to_instrument_parameters,_necessary_to_reduce_data#Instrument_Definition_Files Instrument Definition Files] (IDF) defining main configuration of the instrument and parameters of the script, [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_sample_scripts_used_in_data_processing which processes the data], and the range of auxiliary files such as &amp;#039;&amp;#039;&amp;#039;detector calibration file&amp;#039;&amp;#039;&amp;#039;, defining actual neutronic positions of detectors in an experiment, &amp;#039;&amp;#039;&amp;#039;map files&amp;#039;&amp;#039;&amp;#039; (extension .map), defining the detector grouping, &amp;#039;&amp;#039;&amp;#039;mask files&amp;#039;&amp;#039;&amp;#039; (extension .msk) defining the lists of detectors which should not be processed and in less extend other files (.par, .phx, .nxs etc.)&lt;br /&gt;
&lt;br /&gt;
The source of these files is stored in publicly available [https://github.com/pace-neutrons/InstrumentFiles GitHub archive] This archive is cloned to [https://isis.analysis.stfc.ac.uk/ IDAaaS workspaces] and instrument cabin computers at&lt;br /&gt;
&lt;br /&gt;
  /usr/local/mprogs/InstrumentFiles/[INSTRUMENT_NAME]&lt;br /&gt;
&lt;br /&gt;
folder where the &amp;#039;&amp;#039;&amp;#039;INSTRUMENT_NAME&amp;#039;&amp;#039;&amp;#039; should be replaced by one out of &amp;#039;&amp;#039;&amp;#039;[mari,maps,merlin,let]&amp;#039;&amp;#039;&amp;#039; values list. Some instrument scientists create symbolic links (usually on Desktop) providing quick access to the files relevant for a particular instrument. &lt;br /&gt;
&lt;br /&gt;
[http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Automatic_user_configuration Automatic configuration scripts] running on IDAaaS automatically adds appropriate folder, corresponding to the instrument to the Mantid data search path (see picture below). This make the data, stored in the folder available to the [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_sample_scripts_used_in_data_processing reduction scripts] and places the link to the instrument files the folder within IDAaaS machine menue. &lt;br /&gt;
&lt;br /&gt;
[[File:instrumentFiles.png]]&lt;br /&gt;
&lt;br /&gt;
The path to the requested instrument parameters on the picture above is set to &amp;#039;&amp;#039;&amp;#039;merlin&amp;#039;&amp;#039;&amp;#039; instrument parameter&amp;#039;s folder in the first row of the data search path folders list (blue arrow).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If user wants to run reduction on their own computer, he needs to checkout instrument files from the [https://github.com/pace-neutrons/InstrumentFiles GitHub archive]. Everybody can clone data from this server and some instrument scientists have write access to it. Contact [mailto:alex.buts@stfc.ac.uk Alex Buts] or [mailto:Duc.Le@stfc.ac.uk Duc Lee] if you believe you need write access to the server. &lt;br /&gt;
On a Unix machine, an authorized person can add an instrument file to the source control and send it to the server by placing the file into appropriate instrument folder and issuing the following commands:&lt;br /&gt;
&lt;br /&gt;
  git add &amp;quot;file_name&amp;quot;&lt;br /&gt;
  git commit -m&amp;quot; message describing purpose of the file&amp;quot;&lt;br /&gt;
  git push&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://github.com/FITLinuxSupport/analysisscripts/blob/master/UpdateSVN Simple scripts] are running each hour on instrument cabin machines and [https://isiscompute.nd.rl.ac.uk/nxwebplayer isiscompue servers] pulling data from SVN server, so the file added to the svn server on any machine is ready to be used everywhere within an hour. The result of script operations is currently mailed to main instrument machine user (&amp;#039;&amp;#039;mari&amp;#039;&amp;#039;, &amp;#039;&amp;#039;let&amp;#039;&amp;#039;,&amp;#039;&amp;#039;maps&amp;#039;&amp;#039; or &amp;#039;&amp;#039;merlin&amp;#039;&amp;#039;) so you can see results of these scripts work logging in as this user and typing&lt;br /&gt;
 &lt;br /&gt;
 &amp;gt;&amp;gt;mail &lt;br /&gt;
&lt;br /&gt;
command. The logs are regularly reviewed and cleared up manually. On [https://isiscompute.nd.rl.ac.uk/nxwebplayer isiscompue servers] only the last results are logged and placed into:&lt;br /&gt;
&lt;br /&gt;
   /var/log/UpdateSVN.log.&lt;br /&gt;
&lt;br /&gt;
available on &amp;#039;&amp;#039;&amp;#039;ndmlnx01&amp;#039;&amp;#039;&amp;#039; node only.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The GIT command:&lt;br /&gt;
 &lt;br /&gt;
  git pull&lt;br /&gt;
&lt;br /&gt;
can be issued from the instruments folder of a particular machine (always &amp;#039;&amp;#039;&amp;#039;/usr/local/mprogs/InstrumentFiles/&amp;#039;&amp;#039;&amp;#039; but may have additional references on particular machines) to get immediate access to a new data, but on [https://isiscompute.nd.rl.ac.uk/nxwebplayer isiscompue servers] this command needs administrative access.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#0000ff; background:#FF69B4&amp;quot;&amp;gt; In 2015 git was the most convenient way to provide data synchronization between various computers, but other methods are available now. &lt;br /&gt;
Group needs to discuss if this is still appropriate way of sharing data these days. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Setting_up_Mantid,_Matlab_and_auxiliary_programs_to_process_results_of_inelastic_experiments. Back to setting up Mantid]&lt;br /&gt;
&lt;br /&gt;
== Instrument Specific Files (Instrument Definitions) ==&lt;br /&gt;
&lt;br /&gt;
Instrument definition files, which describe the the instrument configuration and main parameters of the reduction are part of [http://docs.mantidproject.org/nightly/concepts/InstrumentDefinitionFile.html Mantid] and are usually located in &amp;#039;&amp;#039;/opt/Mantid/instrument&amp;#039;&amp;#039; folder on Unix or &amp;#039;&amp;#039;MantidInstallationFolder\instrument&amp;#039;&amp;#039;  folder (&amp;#039;&amp;#039;c:\MantidInstall\instrument&amp;#039;&amp;#039; by default) on Windows.&lt;br /&gt;
&lt;br /&gt;
Newer version of these files produced after Mantid release are automatically retrieved by Matnid at startup into &amp;#039;&amp;#039;~/.mantid/instrument&amp;#039;&amp;#039; on Unix or &amp;#039;&amp;#039;c:\Users\USERACCOUNT_FOLDER\AppData\Roaming\mantidproject\mantid\instrument&amp;#039;&amp;#039; folder on Windows. Such files, if present for a particular instrument override files in Mantid installation directory. &lt;br /&gt;
&lt;br /&gt;
  INSTRUMENT_NAME_Parameters.xml&lt;br /&gt;
&lt;br /&gt;
file provide comprehensive list and description of almost all parameters used by [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_sample_scripts_used_in_data_processing the data reduction script] and the file:&lt;br /&gt;
&lt;br /&gt;
  INSTRUMENT_NAME_Definition.xml&lt;br /&gt;
&lt;br /&gt;
describes all details of the instrument geometry. For further details of the file format and their contents user should look at [http://docs.mantidproject.org/nightly/concepts/InstrumentDefinitionFile.html Mantid IDF description] pages.&lt;br /&gt;
&lt;br /&gt;
Actual default parameters for inelastic data reduction scripts, which are used by Mantid reduction script can also be accessed on the web from Mantid Git repository:&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/mantidproject/mantid/blob/master/instrument/MARI_Parameters.xml MARI Reduction parameters]&lt;br /&gt;
*[https://github.com/mantidproject/mantid/blob/master/instrument/MAPS_Parameters.xml MAPS Reduction parameters]&lt;br /&gt;
*[https://github.com/mantidproject/mantid/blob/master/instrument/MERLIN_Parameters_after2013_4.xml MERLIN Reduction parameters]&lt;br /&gt;
*[https://github.com/mantidproject/mantid/blob/master/instrument/LET_Parameters_dr1to12.xml LET Reduction parameters]&lt;br /&gt;
*[https://github.com/mantidproject/mantid/blob/master/instrument/HET_Parameters.xml HET Reduction parameters]&lt;br /&gt;
&lt;br /&gt;
[http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Setting_up_Mantid,_Matlab_and_auxiliary_programs_to_process_results_of_inelastic_experiments. Back to setting up Mantid]&lt;/div&gt;</summary>
		<author><name>Alex Buts</name></author>
	</entry>
	<entry>
		<id>http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Instrument_parameters_and_Instrument_definitions&amp;diff=391</id>
		<title>Instrument parameters and Instrument definitions</title>
		<link rel="alternate" type="text/html" href="http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Instrument_parameters_and_Instrument_definitions&amp;diff=391"/>
		<updated>2023-01-09T15:59:04Z</updated>

		<summary type="html">&lt;p&gt;Alex Buts: /* Experiment specific parameters */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Experiment specific parameters == &lt;br /&gt;
&lt;br /&gt;
To reduce experimental data described in the previous chapter, user needs access to [http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Location_and_details_of_access_to_instrument_parameters,_necessary_to_reduce_data#Instrument_Definition_Files Instrument Definition Files] (IDF) defining main configuration of the instrument and parameters of the script, [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_sample_scripts_used_in_data_processing which processes the data], and the range of auxiliary files such as &amp;#039;&amp;#039;&amp;#039;detector calibration file&amp;#039;&amp;#039;&amp;#039;, defining actual neutronic positions of detectors in an experiment, &amp;#039;&amp;#039;&amp;#039;map files&amp;#039;&amp;#039;&amp;#039; (extension .map), defining the detector grouping, &amp;#039;&amp;#039;&amp;#039;mask files&amp;#039;&amp;#039;&amp;#039; (extension .msk) defining the lists of detectors which should not be processed and in less extend other files (.par, .phx, .nxs etc.)&lt;br /&gt;
&lt;br /&gt;
The source of these files is stored in publicly available [https://github.com/pace-neutrons/InstrumentFiles github archive] This archive is cloned to [https://isis.analysis.stfc.ac.uk/ IDAaaS workspaces] and instrument cabin computers at&lt;br /&gt;
&lt;br /&gt;
  /usr/local/mprogs/InstrumentFiles/[INSTRUMENT_NAME]&lt;br /&gt;
&lt;br /&gt;
folder where the &amp;#039;&amp;#039;&amp;#039;INSTRUMENT_NAME&amp;#039;&amp;#039;&amp;#039; should be replaced by one out of &amp;#039;&amp;#039;&amp;#039;[mari,maps,merlin,let]&amp;#039;&amp;#039;&amp;#039; values list. Some instrument scientists create symbolic links (usually on Desktop) providing quick access to the files relevant for a particular instrument. &lt;br /&gt;
&lt;br /&gt;
[http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Automatic_user_configuration Automatic configuration scripts] running on IDAaaS automatically adds appropriate folder, corresponding to the instrument to the Mantid data search path (see picture below). This make the data, stored in the folder available to the [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_sample_scripts_used_in_data_processing reduction scripts] and places the link to the instrument files the folder within IDAaaS machine menue. &lt;br /&gt;
&lt;br /&gt;
[[File:instrumentFiles.png]]&lt;br /&gt;
&lt;br /&gt;
The path to the requested instrument parameters on the picture above is set to &amp;#039;&amp;#039;&amp;#039;merlin&amp;#039;&amp;#039;&amp;#039; instrument parameter&amp;#039;s folder in the first row of the data search path folders list (blue arrow).&lt;br /&gt;
&lt;br /&gt;
Currently instrument parameters are placed on Github with the repository belonging to PACE project:&lt;br /&gt;
&lt;br /&gt;
 [https://github.com/pace-neutrons/InstrumentFiles]&lt;br /&gt;
&lt;br /&gt;
If user wants to run reduction on their own computer, he needs to checkout these files. Everybody can clone data from this server and some instrument scientists have write access to it. Contact [mailto:alex.buts@stfc.ac.uk Alex Buts] if you believe you  need write access to the server. &lt;br /&gt;
On a Unix machine, an authorized person can add an instrument file to the source control and send it to the server by placing the file into appropriate instrument folder and issuing the following commands:&lt;br /&gt;
&lt;br /&gt;
  git add &amp;quot;file_name&amp;quot;&lt;br /&gt;
  git commit -m&amp;quot; message describing purpose of the file&amp;quot;&lt;br /&gt;
  git push&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://github.com/FITLinuxSupport/analysisscripts/blob/master/UpdateSVN Simple scripts] are running each hour on instrument cabin machines and [https://isiscompute.nd.rl.ac.uk/nxwebplayer isiscompue servers] pulling data from SVN server, so the file added to the svn server on any machine is ready to be used everywhere within an hour. The result of script operations is currently mailed to main instrument machine user (&amp;#039;&amp;#039;mari&amp;#039;&amp;#039;, &amp;#039;&amp;#039;let&amp;#039;&amp;#039;,&amp;#039;&amp;#039;maps&amp;#039;&amp;#039; or &amp;#039;&amp;#039;merlin&amp;#039;&amp;#039;) so you can see results of these scripts work logging in as this user and typing&lt;br /&gt;
 &lt;br /&gt;
 &amp;gt;&amp;gt;mail &lt;br /&gt;
&lt;br /&gt;
command. The logs are regularly reviewed and cleared up manually. On [https://isiscompute.nd.rl.ac.uk/nxwebplayer isiscompue servers] only the last results are logged and placed into:&lt;br /&gt;
&lt;br /&gt;
   /var/log/UpdateSVN.log.&lt;br /&gt;
&lt;br /&gt;
available on &amp;#039;&amp;#039;&amp;#039;ndmlnx01&amp;#039;&amp;#039;&amp;#039; node only.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The GIT command:&lt;br /&gt;
 &lt;br /&gt;
  git pull&lt;br /&gt;
&lt;br /&gt;
can be issued from the instruments folder of a particular machine (always &amp;#039;&amp;#039;&amp;#039;/usr/local/mprogs/InstrumentFiles/&amp;#039;&amp;#039;&amp;#039; but may have additional references on particular machines) to get immediate access to a new data, but on [https://isiscompute.nd.rl.ac.uk/nxwebplayer isiscompue servers] this command needs administrative access.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#0000ff; background:#FF69B4&amp;quot;&amp;gt; In 2015 git was the most convenient way to provide data synchronization between various computers, but other methods are available now. &lt;br /&gt;
Group needs to discuss if this is still appropriate way of sharing data these days. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Setting_up_Mantid,_Matlab_and_auxiliary_programs_to_process_results_of_inelastic_experiments. Back to setting up Mantid]&lt;br /&gt;
&lt;br /&gt;
== Instrument Specific Files (Instrument Definitions) ==&lt;br /&gt;
&lt;br /&gt;
Instrument definition files, which describe the the instrument configuration and main parameters of the reduction are part of [http://docs.mantidproject.org/nightly/concepts/InstrumentDefinitionFile.html Mantid] and are usually located in &amp;#039;&amp;#039;/opt/Mantid/instrument&amp;#039;&amp;#039; folder on Unix or &amp;#039;&amp;#039;MantidInstallationFolder\instrument&amp;#039;&amp;#039;  folder (&amp;#039;&amp;#039;c:\MantidInstall\instrument&amp;#039;&amp;#039; by default) on Windows.&lt;br /&gt;
&lt;br /&gt;
Newer version of these files produced after Mantid release are automatically retrieved by Matnid at startup into &amp;#039;&amp;#039;~/.mantid/instrument&amp;#039;&amp;#039; on Unix or &amp;#039;&amp;#039;c:\Users\USERACCOUNT_FOLDER\AppData\Roaming\mantidproject\mantid\instrument&amp;#039;&amp;#039; folder on Windows. Such files, if present for a particular instrument override files in Mantid installation directory. &lt;br /&gt;
&lt;br /&gt;
  INSTRUMENT_NAME_Parameters.xml&lt;br /&gt;
&lt;br /&gt;
file provide comprehensive list and description of almost all parameters used by [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_sample_scripts_used_in_data_processing the data reduction script] and the file:&lt;br /&gt;
&lt;br /&gt;
  INSTRUMENT_NAME_Definition.xml&lt;br /&gt;
&lt;br /&gt;
describes all details of the instrument geometry. For further details of the file format and their contents user should look at [http://docs.mantidproject.org/nightly/concepts/InstrumentDefinitionFile.html Mantid IDF description] pages.&lt;br /&gt;
&lt;br /&gt;
Actual default parameters for inelastic data reduction scripts, which are used by Mantid reduction script can also be accessed on the web from Mantid Git repository:&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/mantidproject/mantid/blob/master/instrument/MARI_Parameters.xml MARI Reduction parameters]&lt;br /&gt;
*[https://github.com/mantidproject/mantid/blob/master/instrument/MAPS_Parameters.xml MAPS Reduction parameters]&lt;br /&gt;
*[https://github.com/mantidproject/mantid/blob/master/instrument/MERLIN_Parameters_after2013_4.xml MERLIN Reduction parameters]&lt;br /&gt;
*[https://github.com/mantidproject/mantid/blob/master/instrument/LET_Parameters_dr1to12.xml LET Reduction parameters]&lt;br /&gt;
*[https://github.com/mantidproject/mantid/blob/master/instrument/HET_Parameters.xml HET Reduction parameters]&lt;br /&gt;
&lt;br /&gt;
[http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Setting_up_Mantid,_Matlab_and_auxiliary_programs_to_process_results_of_inelastic_experiments. Back to setting up Mantid]&lt;/div&gt;</summary>
		<author><name>Alex Buts</name></author>
	</entry>
	<entry>
		<id>http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Instrument_parameters_and_Instrument_definitions&amp;diff=390</id>
		<title>Instrument parameters and Instrument definitions</title>
		<link rel="alternate" type="text/html" href="http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Instrument_parameters_and_Instrument_definitions&amp;diff=390"/>
		<updated>2023-01-09T15:57:04Z</updated>

		<summary type="html">&lt;p&gt;Alex Buts: /* Experiment specific parameters */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Experiment specific parameters == &lt;br /&gt;
&lt;br /&gt;
To reduce experimental data described in the previous chapter, user needs access to [http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Location_and_details_of_access_to_instrument_parameters,_necessary_to_reduce_data#Instrument_Definition_Files Instrument Definition Files] (IDF) defining main configuration of the instrument and parameters of the script, [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_sample_scripts_used_in_data_processing which processes the data], and the range of auxiliary files such as &amp;#039;&amp;#039;&amp;#039;detector calibration file&amp;#039;&amp;#039;&amp;#039;, defining actual neutronic positions of detectors in an experiment, &amp;#039;&amp;#039;&amp;#039;map files&amp;#039;&amp;#039;&amp;#039; (extension .map), defining the detector grouping, &amp;#039;&amp;#039;&amp;#039;mask files&amp;#039;&amp;#039;&amp;#039; (extension .msk) defining the lists of detectors which should not be processed and in less extend other files (.par, .phx, .nxs etc.)&lt;br /&gt;
&lt;br /&gt;
The source of these files is stored in publicly available [https://github.com/pace-neutrons/InstrumentFiles github archive] This archive is cloned to [https://isis.analysis.stfc.ac.uk/ IDAaaS workspaces] and instrument cabin computers at&lt;br /&gt;
&lt;br /&gt;
  /usr/local/mprogs/InstrumentFiles/[INSTRUMENT_NAME]&lt;br /&gt;
&lt;br /&gt;
folder where the &amp;#039;&amp;#039;&amp;#039;INSTRUMENT_NAME&amp;#039;&amp;#039;&amp;#039; should be replaced by one out of &amp;#039;&amp;#039;&amp;#039;[mari,maps,merlin,let]&amp;#039;&amp;#039;&amp;#039; values list. Some instrument scientists create symbolic links (usually on Desktop) providing quick access to the files relevant for a particular instrument. &lt;br /&gt;
&lt;br /&gt;
[http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Automatic_user_configuration Automatic configuration scripts] running on [https://isiscompute.nd.rl.ac.uk/nxwebplayer isiscompue servers] automatically add appropriate folder, corresponding to the instrument to Mantid data search path (see picture below). This make the data, stored in the folder available to the [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_sample_scripts_used_in_data_processing reduction scripts] and places the link to the instrument files to the Nomachine desktop. &lt;br /&gt;
&lt;br /&gt;
[[File:instrumentFiles.png]]&lt;br /&gt;
&lt;br /&gt;
The path to the requested instrument parameters on the picture above is set to &amp;#039;&amp;#039;&amp;#039;merlin&amp;#039;&amp;#039;&amp;#039; instrument parameter&amp;#039;s folder in the first row of the data search path folders list (blue arrow).&lt;br /&gt;
&lt;br /&gt;
Currently instrument parameters are placed on Github with the repository belonging to PACE project:&lt;br /&gt;
&lt;br /&gt;
 [https://github.com/pace-neutrons/InstrumentFiles]&lt;br /&gt;
&lt;br /&gt;
If user wants to run reduction on their own computer, he needs to checkout these files. Everybody can clone data from this server and some instrument scientists have write access to it. Contact [mailto:alex.buts@stfc.ac.uk Alex Buts] if you believe you  need write access to the server. &lt;br /&gt;
On a Unix machine, an authorized person can add an instrument file to the source control and send it to the server by placing the file into appropriate instrument folder and issuing the following commands:&lt;br /&gt;
&lt;br /&gt;
  git add &amp;quot;file_name&amp;quot;&lt;br /&gt;
  git commit -m&amp;quot; message describing purpose of the file&amp;quot;&lt;br /&gt;
  git push&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://github.com/FITLinuxSupport/analysisscripts/blob/master/UpdateSVN Simple scripts] are running each hour on instrument cabin machines and [https://isiscompute.nd.rl.ac.uk/nxwebplayer isiscompue servers] pulling data from SVN server, so the file added to the svn server on any machine is ready to be used everywhere within an hour. The result of script operations is currently mailed to main instrument machine user (&amp;#039;&amp;#039;mari&amp;#039;&amp;#039;, &amp;#039;&amp;#039;let&amp;#039;&amp;#039;,&amp;#039;&amp;#039;maps&amp;#039;&amp;#039; or &amp;#039;&amp;#039;merlin&amp;#039;&amp;#039;) so you can see results of these scripts work logging in as this user and typing&lt;br /&gt;
 &lt;br /&gt;
 &amp;gt;&amp;gt;mail &lt;br /&gt;
&lt;br /&gt;
command. The logs are regularly reviewed and cleared up manually. On [https://isiscompute.nd.rl.ac.uk/nxwebplayer isiscompue servers] only the last results are logged and placed into:&lt;br /&gt;
&lt;br /&gt;
   /var/log/UpdateSVN.log.&lt;br /&gt;
&lt;br /&gt;
available on &amp;#039;&amp;#039;&amp;#039;ndmlnx01&amp;#039;&amp;#039;&amp;#039; node only.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The GIT command:&lt;br /&gt;
 &lt;br /&gt;
  git pull&lt;br /&gt;
&lt;br /&gt;
can be issued from the instruments folder of a particular machine (always &amp;#039;&amp;#039;&amp;#039;/usr/local/mprogs/InstrumentFiles/&amp;#039;&amp;#039;&amp;#039; but may have additional references on particular machines) to get immediate access to a new data, but on [https://isiscompute.nd.rl.ac.uk/nxwebplayer isiscompue servers] this command needs administrative access.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#0000ff; background:#FF69B4&amp;quot;&amp;gt; In 2015 git was the most convenient way to provide data synchronization between various computers, but other methods are available now. &lt;br /&gt;
Group needs to discuss if this is still appropriate way of sharing data these days. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Setting_up_Mantid,_Matlab_and_auxiliary_programs_to_process_results_of_inelastic_experiments. Back to setting up Mantid]&lt;br /&gt;
&lt;br /&gt;
== Instrument Specific Files (Instrument Definitions) ==&lt;br /&gt;
&lt;br /&gt;
Instrument definition files, which describe the the instrument configuration and main parameters of the reduction are part of [http://docs.mantidproject.org/nightly/concepts/InstrumentDefinitionFile.html Mantid] and are usually located in &amp;#039;&amp;#039;/opt/Mantid/instrument&amp;#039;&amp;#039; folder on Unix or &amp;#039;&amp;#039;MantidInstallationFolder\instrument&amp;#039;&amp;#039;  folder (&amp;#039;&amp;#039;c:\MantidInstall\instrument&amp;#039;&amp;#039; by default) on Windows.&lt;br /&gt;
&lt;br /&gt;
Newer version of these files produced after Mantid release are automatically retrieved by Matnid at startup into &amp;#039;&amp;#039;~/.mantid/instrument&amp;#039;&amp;#039; on Unix or &amp;#039;&amp;#039;c:\Users\USERACCOUNT_FOLDER\AppData\Roaming\mantidproject\mantid\instrument&amp;#039;&amp;#039; folder on Windows. Such files, if present for a particular instrument override files in Mantid installation directory. &lt;br /&gt;
&lt;br /&gt;
  INSTRUMENT_NAME_Parameters.xml&lt;br /&gt;
&lt;br /&gt;
file provide comprehensive list and description of almost all parameters used by [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_sample_scripts_used_in_data_processing the data reduction script] and the file:&lt;br /&gt;
&lt;br /&gt;
  INSTRUMENT_NAME_Definition.xml&lt;br /&gt;
&lt;br /&gt;
describes all details of the instrument geometry. For further details of the file format and their contents user should look at [http://docs.mantidproject.org/nightly/concepts/InstrumentDefinitionFile.html Mantid IDF description] pages.&lt;br /&gt;
&lt;br /&gt;
Actual default parameters for inelastic data reduction scripts, which are used by Mantid reduction script can also be accessed on the web from Mantid Git repository:&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/mantidproject/mantid/blob/master/instrument/MARI_Parameters.xml MARI Reduction parameters]&lt;br /&gt;
*[https://github.com/mantidproject/mantid/blob/master/instrument/MAPS_Parameters.xml MAPS Reduction parameters]&lt;br /&gt;
*[https://github.com/mantidproject/mantid/blob/master/instrument/MERLIN_Parameters_after2013_4.xml MERLIN Reduction parameters]&lt;br /&gt;
*[https://github.com/mantidproject/mantid/blob/master/instrument/LET_Parameters_dr1to12.xml LET Reduction parameters]&lt;br /&gt;
*[https://github.com/mantidproject/mantid/blob/master/instrument/HET_Parameters.xml HET Reduction parameters]&lt;br /&gt;
&lt;br /&gt;
[http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Setting_up_Mantid,_Matlab_and_auxiliary_programs_to_process_results_of_inelastic_experiments. Back to setting up Mantid]&lt;/div&gt;</summary>
		<author><name>Alex Buts</name></author>
	</entry>
	<entry>
		<id>http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Instrument_parameters_and_Instrument_definitions&amp;diff=389</id>
		<title>Instrument parameters and Instrument definitions</title>
		<link rel="alternate" type="text/html" href="http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Instrument_parameters_and_Instrument_definitions&amp;diff=389"/>
		<updated>2023-01-09T15:56:42Z</updated>

		<summary type="html">&lt;p&gt;Alex Buts: /* Experiment specific parameters */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Experiment specific parameters == &lt;br /&gt;
&lt;br /&gt;
To reduce experimental data described in the previous chapter, user needs access to [http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Location_and_details_of_access_to_instrument_parameters,_necessary_to_reduce_data#Instrument_Definition_Files Instrument Definition Files] (IDF) defining main configuration of the instrument and parameters of the script, [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_sample_scripts_used_in_data_processing which processes the data], and the range of auxiliary files such as &amp;#039;&amp;#039;&amp;#039;detector calibration file&amp;#039;&amp;#039;&amp;#039;, defining actual neutronic positions of detectors in an experiment, &amp;#039;&amp;#039;&amp;#039;map files&amp;#039;&amp;#039;&amp;#039; (extension .map), defining the detector grouping, &amp;#039;&amp;#039;&amp;#039;mask files&amp;#039;&amp;#039;&amp;#039; (extension .msk) defining the lists of detectors which should not be processed and in less extend other files (.par, .phx, .nxs etc.)&lt;br /&gt;
&lt;br /&gt;
The source of these files is stored in publicly available [https://github.com/pace-neutrons/InstrumentFiles github archive] This archive is cloned to [https://isis.analysis.stfc.ac.uk/ IDAaaS workspaces] and instrument cabin computers at:&lt;br /&gt;
&lt;br /&gt;
  /usr/local/mprogs/InstrumentFiles/[INSTRUMENT_NAME]&lt;br /&gt;
&lt;br /&gt;
folder where the &amp;#039;&amp;#039;&amp;#039;INSTRUMENT_NAME&amp;#039;&amp;#039;&amp;#039; should be replaced by one out of &amp;#039;&amp;#039;&amp;#039;[mari,maps,merlin,let]&amp;#039;&amp;#039;&amp;#039; values list. Some instrument scientists create symbolic links (usually on Desktop) providing quick access to the files relevant for a particular instrument. &lt;br /&gt;
&lt;br /&gt;
[http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Automatic_user_configuration Automatic configuration scripts] running on [https://isiscompute.nd.rl.ac.uk/nxwebplayer isiscompue servers] automatically add appropriate folder, corresponding to the instrument to Mantid data search path (see picture below). This make the data, stored in the folder available to the [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_sample_scripts_used_in_data_processing reduction scripts] and places the link to the instrument files to the Nomachine desktop. &lt;br /&gt;
&lt;br /&gt;
[[File:instrumentFiles.png]]&lt;br /&gt;
&lt;br /&gt;
The path to the requested instrument parameters on the picture above is set to &amp;#039;&amp;#039;&amp;#039;merlin&amp;#039;&amp;#039;&amp;#039; instrument parameter&amp;#039;s folder in the first row of the data search path folders list (blue arrow).&lt;br /&gt;
&lt;br /&gt;
Currently instrument parameters are placed on Github with the repository belonging to PACE project:&lt;br /&gt;
&lt;br /&gt;
 [https://github.com/pace-neutrons/InstrumentFiles]&lt;br /&gt;
&lt;br /&gt;
If user wants to run reduction on their own computer, he needs to checkout these files. Everybody can clone data from this server and some instrument scientists have write access to it. Contact [mailto:alex.buts@stfc.ac.uk Alex Buts] if you believe you  need write access to the server. &lt;br /&gt;
On a Unix machine, an authorized person can add an instrument file to the source control and send it to the server by placing the file into appropriate instrument folder and issuing the following commands:&lt;br /&gt;
&lt;br /&gt;
  git add &amp;quot;file_name&amp;quot;&lt;br /&gt;
  git commit -m&amp;quot; message describing purpose of the file&amp;quot;&lt;br /&gt;
  git push&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://github.com/FITLinuxSupport/analysisscripts/blob/master/UpdateSVN Simple scripts] are running each hour on instrument cabin machines and [https://isiscompute.nd.rl.ac.uk/nxwebplayer isiscompue servers] pulling data from SVN server, so the file added to the svn server on any machine is ready to be used everywhere within an hour. The result of script operations is currently mailed to main instrument machine user (&amp;#039;&amp;#039;mari&amp;#039;&amp;#039;, &amp;#039;&amp;#039;let&amp;#039;&amp;#039;,&amp;#039;&amp;#039;maps&amp;#039;&amp;#039; or &amp;#039;&amp;#039;merlin&amp;#039;&amp;#039;) so you can see results of these scripts work logging in as this user and typing&lt;br /&gt;
 &lt;br /&gt;
 &amp;gt;&amp;gt;mail &lt;br /&gt;
&lt;br /&gt;
command. The logs are regularly reviewed and cleared up manually. On [https://isiscompute.nd.rl.ac.uk/nxwebplayer isiscompue servers] only the last results are logged and placed into:&lt;br /&gt;
&lt;br /&gt;
   /var/log/UpdateSVN.log.&lt;br /&gt;
&lt;br /&gt;
available on &amp;#039;&amp;#039;&amp;#039;ndmlnx01&amp;#039;&amp;#039;&amp;#039; node only.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The GIT command:&lt;br /&gt;
 &lt;br /&gt;
  git pull&lt;br /&gt;
&lt;br /&gt;
can be issued from the instruments folder of a particular machine (always &amp;#039;&amp;#039;&amp;#039;/usr/local/mprogs/InstrumentFiles/&amp;#039;&amp;#039;&amp;#039; but may have additional references on particular machines) to get immediate access to a new data, but on [https://isiscompute.nd.rl.ac.uk/nxwebplayer isiscompue servers] this command needs administrative access.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#0000ff; background:#FF69B4&amp;quot;&amp;gt; In 2015 git was the most convenient way to provide data synchronization between various computers, but other methods are available now. &lt;br /&gt;
Group needs to discuss if this is still appropriate way of sharing data these days. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Setting_up_Mantid,_Matlab_and_auxiliary_programs_to_process_results_of_inelastic_experiments. Back to setting up Mantid]&lt;br /&gt;
&lt;br /&gt;
== Instrument Specific Files (Instrument Definitions) ==&lt;br /&gt;
&lt;br /&gt;
Instrument definition files, which describe the the instrument configuration and main parameters of the reduction are part of [http://docs.mantidproject.org/nightly/concepts/InstrumentDefinitionFile.html Mantid] and are usually located in &amp;#039;&amp;#039;/opt/Mantid/instrument&amp;#039;&amp;#039; folder on Unix or &amp;#039;&amp;#039;MantidInstallationFolder\instrument&amp;#039;&amp;#039;  folder (&amp;#039;&amp;#039;c:\MantidInstall\instrument&amp;#039;&amp;#039; by default) on Windows.&lt;br /&gt;
&lt;br /&gt;
Newer version of these files produced after Mantid release are automatically retrieved by Matnid at startup into &amp;#039;&amp;#039;~/.mantid/instrument&amp;#039;&amp;#039; on Unix or &amp;#039;&amp;#039;c:\Users\USERACCOUNT_FOLDER\AppData\Roaming\mantidproject\mantid\instrument&amp;#039;&amp;#039; folder on Windows. Such files, if present for a particular instrument override files in Mantid installation directory. &lt;br /&gt;
&lt;br /&gt;
  INSTRUMENT_NAME_Parameters.xml&lt;br /&gt;
&lt;br /&gt;
file provide comprehensive list and description of almost all parameters used by [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_sample_scripts_used_in_data_processing the data reduction script] and the file:&lt;br /&gt;
&lt;br /&gt;
  INSTRUMENT_NAME_Definition.xml&lt;br /&gt;
&lt;br /&gt;
describes all details of the instrument geometry. For further details of the file format and their contents user should look at [http://docs.mantidproject.org/nightly/concepts/InstrumentDefinitionFile.html Mantid IDF description] pages.&lt;br /&gt;
&lt;br /&gt;
Actual default parameters for inelastic data reduction scripts, which are used by Mantid reduction script can also be accessed on the web from Mantid Git repository:&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/mantidproject/mantid/blob/master/instrument/MARI_Parameters.xml MARI Reduction parameters]&lt;br /&gt;
*[https://github.com/mantidproject/mantid/blob/master/instrument/MAPS_Parameters.xml MAPS Reduction parameters]&lt;br /&gt;
*[https://github.com/mantidproject/mantid/blob/master/instrument/MERLIN_Parameters_after2013_4.xml MERLIN Reduction parameters]&lt;br /&gt;
*[https://github.com/mantidproject/mantid/blob/master/instrument/LET_Parameters_dr1to12.xml LET Reduction parameters]&lt;br /&gt;
*[https://github.com/mantidproject/mantid/blob/master/instrument/HET_Parameters.xml HET Reduction parameters]&lt;br /&gt;
&lt;br /&gt;
[http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Setting_up_Mantid,_Matlab_and_auxiliary_programs_to_process_results_of_inelastic_experiments. Back to setting up Mantid]&lt;/div&gt;</summary>
		<author><name>Alex Buts</name></author>
	</entry>
	<entry>
		<id>http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Experimental_Data&amp;diff=388</id>
		<title>Experimental Data</title>
		<link rel="alternate" type="text/html" href="http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Experimental_Data&amp;diff=388"/>
		<updated>2023-01-09T15:51:01Z</updated>

		<summary type="html">&lt;p&gt;Alex Buts: /* Access to the results of the experiments */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Access to the results of the experiments == &lt;br /&gt;
&lt;br /&gt;
ISIS experimental data consist of the number of files with extensions &amp;#039;&amp;#039;.raw&amp;#039;&amp;#039;, &amp;#039;&amp;#039;.nxs&amp;#039;&amp;#039; and sometimes &amp;#039;&amp;#039;.txt&amp;#039;&amp;#039;, stored in archive. The name of a file usually contains the instrument name and the number, assigned to a particular run by the instrument software. The right to accessing data in the archive is managed through iCat.&lt;br /&gt;
On [https://isis.analysis.stfc.ac.uk IDAaaS workspaces] the data belonging to users can be accessed from the &amp;#039;&amp;#039;Data&amp;#039;&amp;#039; or &amp;#039;&amp;#039;Experiment&amp;#039;&amp;#039; tabs at the left hand side of the workspace.&lt;br /&gt;
&lt;br /&gt;
In addition to that, on the virtual machines (workspaces) and local instrument machines the data are mounted at:&lt;br /&gt;
&lt;br /&gt;
  /archive/NDX[INSTRUMENT_NAME]/Instrument/data/cycle_YY_N&lt;br /&gt;
&lt;br /&gt;
On Windows machines within ISIS local network these data can be accessed using similar link:&lt;br /&gt;
 &lt;br /&gt;
 \\isis\inst$\NDX[INSTRUMENT_NAME]\Instrument\data\cycle_YY_N&lt;br /&gt;
&lt;br /&gt;
though this way of accessing data is now considered outdated. &lt;br /&gt;
&lt;br /&gt;
From Mantid GUI user can also access his data by logging into Catalog with his ISIS user name and password and searching the data, assigned to him. This may request downloading substantial amount of data through internet and may not work on slow connections, but if connection quality is good, users can get their data from the Catalog:&lt;br /&gt;
&lt;br /&gt;
[[File:MantidCatalog.png]]&lt;br /&gt;
&lt;br /&gt;
The data can be also downloaded to users computer using usual sources, (over network from ISIS, on external USB drive, etc...)&lt;br /&gt;
&lt;br /&gt;
After files are available to the user&amp;#039;s computer (either over network or locally) Mantid reduction scripts have to know how to find them. This is done by adding folder with the data to Mantid data search path (&amp;#039;&amp;#039;&amp;#039;green Arrow &amp;#039;&amp;#039;&amp;#039; highlights the Mantid icon to click):&lt;br /&gt;
&lt;br /&gt;
[[File:MantidDataSearchPath.png]]&lt;br /&gt;
&lt;br /&gt;
Search in the Catalog and access to files directly from it usually works in local facility network only (Check-box highlighted by &amp;#039;&amp;#039;&amp;#039;blue arrow with number 2&amp;#039;&amp;#039;&amp;#039; pointing to it). &lt;br /&gt;
&lt;br /&gt;
[http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Automatic_user_configuration Automatic user configuration scripts] run on [https://isis.analysis.stfc.ac.uk IDAaaS] and configure Mantid for users by setting up access for data in the archive and adding the reference to the users instrument and cycle to the data search path automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Setting_up_Mantid,_Matlab_and_auxiliary_programs_to_process_results_of_inelastic_experiments. Back to Setting up Mantid]&lt;/div&gt;</summary>
		<author><name>Alex Buts</name></author>
	</entry>
	<entry>
		<id>http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Experimental_Data&amp;diff=387</id>
		<title>Experimental Data</title>
		<link rel="alternate" type="text/html" href="http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Experimental_Data&amp;diff=387"/>
		<updated>2023-01-09T15:49:13Z</updated>

		<summary type="html">&lt;p&gt;Alex Buts: /* Access to the results of the experiments */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Access to the results of the experiments == &lt;br /&gt;
&lt;br /&gt;
ISIS experimental data consist of the number of files with extensions &amp;#039;&amp;#039;.raw&amp;#039;&amp;#039;, &amp;#039;&amp;#039;.nxs&amp;#039;&amp;#039; and sometimes &amp;#039;&amp;#039;.txt&amp;#039;&amp;#039;, stored in archive. The name of a file usually contains the instrument name and the number, assigned to a particular run by the instrument software. The right to accessing data in the archive is managed through iCat.&lt;br /&gt;
On [https://isis.analysis.stfc.ac.uk IDAaaS workspaces] the data belonging to users can be accessed from the &amp;#039;&amp;#039;Data&amp;#039;&amp;#039; or &amp;#039;&amp;#039;Experiment&amp;#039;&amp;#039; tabs at the left hand side of the workspace.&lt;br /&gt;
&lt;br /&gt;
In addition to that, on the virtual machines (workspaces) and local instrument machines the data are mounted at:&lt;br /&gt;
&lt;br /&gt;
  /archive/NDX[INSTRUMENT_NAME]/Instrument/data/cycle_YY_N&lt;br /&gt;
&lt;br /&gt;
On Windows machines within ISIS local network these data can be accessed using similar link:&lt;br /&gt;
 &lt;br /&gt;
 \\isis\inst$\NDX[INSTRUMENT_NAME]\Instrument\data\cycle_YY_N&lt;br /&gt;
&lt;br /&gt;
though this way of accessing data is now considered outdated. &lt;br /&gt;
&lt;br /&gt;
From Mantid GUI user can also access his data by logging into Catalog with his ISIS user name and password and searching the data, assigned to him. This may request downloading substantial amount of data through internet and may not work on slow connections, but if connection quality is good, users can get their data from the Catalog:&lt;br /&gt;
&lt;br /&gt;
[[File:MantidCatalog.png]]&lt;br /&gt;
&lt;br /&gt;
The data can be also downloaded to users computer using usual sources, (over network from ISIS, on external USB drive, etc...)&lt;br /&gt;
&lt;br /&gt;
After files are available to the user&amp;#039;s computer (either over network or locally) Mantid reduction scripts have to know how to find them. This is done by adding folder with the data to Mantid data search path (&amp;#039;&amp;#039;&amp;#039;green Arrow &amp;#039;&amp;#039;&amp;#039; highlights the Mantid icon to click):&lt;br /&gt;
&lt;br /&gt;
[[File:MantidDataSearchPath.png]]&lt;br /&gt;
&lt;br /&gt;
Search in the Catalog and access to files directly from it usually works in local facility network only (Check-box highlighted by &amp;#039;&amp;#039;&amp;#039;blue arrow with number 2&amp;#039;&amp;#039;&amp;#039; pointing to it). &lt;br /&gt;
&lt;br /&gt;
[http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Automatic_user_configuration Automatic user configuration scripts] run on [https://isiscompute.nd.rl.ac.uk/nxwebplayer isiscompue servers] and configure Mantid for users by setting up access for data in the archive and adding the reference to the users instrument and cycle to the data search path automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Setting_up_Mantid,_Matlab_and_auxiliary_programs_to_process_results_of_inelastic_experiments. Back to Setting up Mantid]&lt;/div&gt;</summary>
		<author><name>Alex Buts</name></author>
	</entry>
	<entry>
		<id>http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Experimental_Data&amp;diff=386</id>
		<title>Experimental Data</title>
		<link rel="alternate" type="text/html" href="http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Experimental_Data&amp;diff=386"/>
		<updated>2023-01-09T15:42:52Z</updated>

		<summary type="html">&lt;p&gt;Alex Buts: /* Access to the results of the experiments */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Access to the results of the experiments == &lt;br /&gt;
&lt;br /&gt;
ISIS experimental data consist of the number of files with extensions &amp;#039;&amp;#039;.raw&amp;#039;&amp;#039;, &amp;#039;&amp;#039;.nxs&amp;#039;&amp;#039; and sometimes &amp;#039;&amp;#039;.txt&amp;#039;&amp;#039;, stored in archive. The name of a file usually contains the instrument name and the number, assigned to a particular run by the instrument software. The right to accessing data in the archive is managed through iCat.&lt;br /&gt;
On [https://isis.analysis.stfc.ac.uk IDAaaS workspaces] and local instrument machines the data are mounted at:&lt;br /&gt;
&lt;br /&gt;
  /archive/NDX[INSTRUMENT_NAME]/Instrument/data/cycle_YY_N&lt;br /&gt;
&lt;br /&gt;
On Windows machines within ISIS local network these data can be accessed using similar link:&lt;br /&gt;
 &lt;br /&gt;
 \\isis\inst$\NDX[INSTRUMENT_NAME]\Instrument\data\cycle_YY_N&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
From Mantid GUI user can also access his data by logging into Catalog with his ISIS user name and password and searching the data, assigned to him. This may request downloading substantial amount of data through internet and may not work on slow connections, but if connection quality is good, users can get their data from the Catalog:&lt;br /&gt;
&lt;br /&gt;
[[File:MantidCatalog.png]]&lt;br /&gt;
&lt;br /&gt;
The data can be also downloaded to users computer using usual sources, (over network from ISIS, on external USB drive, etc...)&lt;br /&gt;
&lt;br /&gt;
After files are available to the user&amp;#039;s computer (either over network or locally) Mantid reduction scripts have to know how to find them. This is done by adding folder with the data to Mantid data search path (&amp;#039;&amp;#039;&amp;#039;green Arrow &amp;#039;&amp;#039;&amp;#039; highlights the Mantid icon to click):&lt;br /&gt;
&lt;br /&gt;
[[File:MantidDataSearchPath.png]]&lt;br /&gt;
&lt;br /&gt;
Search in the Catalog and access to files directly from it usually works in local facility network only (Check-box highlighted by &amp;#039;&amp;#039;&amp;#039;blue arrow with number 2&amp;#039;&amp;#039;&amp;#039; pointing to it). &lt;br /&gt;
&lt;br /&gt;
[http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Automatic_user_configuration Automatic user configuration scripts] run on [https://isiscompute.nd.rl.ac.uk/nxwebplayer isiscompue servers] and configure Mantid for users by setting up access for data in the archive and adding the reference to the users instrument and cycle to the data search path automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Setting_up_Mantid,_Matlab_and_auxiliary_programs_to_process_results_of_inelastic_experiments. Back to Setting up Mantid]&lt;/div&gt;</summary>
		<author><name>Alex Buts</name></author>
	</entry>
	<entry>
		<id>http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Main_Page&amp;diff=385</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Main_Page&amp;diff=385"/>
		<updated>2023-01-09T15:39:18Z</updated>

		<summary type="html">&lt;p&gt;Alex Buts: /* ISIS Direct Inelastic Data Reduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ISIS Direct Inelastic Data Reduction == &lt;br /&gt;
&lt;br /&gt;
Inelastic data reduction is the process of transforming data obtained in inelastic scattering experiment into the data, describing inelastic cross-sections of the processes under investigation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To process the data recorded by [https://www.isis.stfc.ac.uk/Pages/Neutron-spectroscopy.aspx Direct Inelastic Instruments] and obtain the desired cross-sections ISIS scientists use the [http://www.mantidproject.org/Main_Page Mantid-based] reduction program with a range of additional data and set-up parameters, tuning up this program to the particular inelastic instrument and experimental conditions. Users are also provided with access to the [https://isis.analysis.stfc.ac.uk/ computing cluster], dedicated to help them in processing raw experimental data into the form, which has physical meaning.&lt;br /&gt;
&lt;br /&gt;
From a user&amp;#039;s point of view, the processing of their results should be simple and straightforward, namely:&lt;br /&gt;
&lt;br /&gt;
# User logs into his or her [https://data.analysis.stfc.ac.uk/ IDAaaS account] with logon name and password, obtained from the user office and launches virtual machine (creates workspace), dedicated for the instrument and technique used in the experiment. In his home directory he finds a folder with the RB-name of the proposal, approved for the experiment. &lt;br /&gt;
# In this RB folder user can find a python script, necessary to process the results of the experiment, obtained from the instrument. User opens this script in Mantid, changes the run numbers to the numbers obtained in the experiment, can change some reduction parameters familiar to him (the description of the parameters is provided within the script) and runs the script to processes the results of the experiment. User should not need to set up Mantid or modify the advanced reduction parameters.&lt;br /&gt;
# The desktop of the users account also contains links to more advanced sample [http://horace.isis.rl.ac.uk/Main_Page Horace] and Mantid scripts for further analysis and visualization of the experimental data. Some advanced Mantid scripts are also described below. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Services, resources and Mantid settings necessary to allow users to process their data ===&lt;br /&gt;
&lt;br /&gt;
This chapter contains the information about the data reduction service, implemented in ISIS. &lt;br /&gt;
User should familiarize himself with the information on [[Setting up Mantid, Matlab and auxiliary programs to process results of inelastic experiments.]]&lt;br /&gt;
if he is going to set up and process results of his experiments on a computers outside ISIS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
=== Autoreduction service ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; &amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt; On 01/08/2017 Autoreduction service has been disabled for inelastic instruments.&amp;lt;/span&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When Autoreduction service is enabled and set up properly, users data are also processed automatically, namely:&lt;br /&gt;
# Within RB folder a user finds folder named &amp;#039;&amp;#039;&amp;#039;autoreduction&amp;#039;&amp;#039;&amp;#039;. The folder should contain the reduced data processed automatically by [https://users.facilities.rl.ac.uk/auth/?service=http://reduce.isis.cclrc.ac.uk&amp;amp;redirecturl=http://reduce.isis.cclrc.ac.uk/ autoreduction service], which runs on a separate powerful machine and picks up the results of the experiments as they are completed and rapidly reduces them using a script similar to the one the users have in their RB folder.&lt;br /&gt;
#If necessary and convenient, the users should be able to change some parameters and reprocess some or all their runs using the web-interface and [https://users.facilities.rl.ac.uk/auth/?service=http://reduce.isis.cclrc.ac.uk&amp;amp;redirecturl=http://reduce.isis.cclrc.ac.uk/  autoreduction service].&lt;br /&gt;
#The common part of raw data processing (e.g. generation of the &amp;#039;&amp;#039;sqw&amp;#039;&amp;#039; files) can also be delegated to the [https://users.facilities.rl.ac.uk/auth/?service=http://reduce.isis.cclrc.ac.uk&amp;amp;redirecturl=http://reduce.isis.cclrc.ac.uk/  autoreduction service].&lt;br /&gt;
&lt;br /&gt;
The autoreduction service is currently working in test mode, so its availability and reliability are not guaranteed.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Crystal alignment using Mantid]] ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reduction scripts ===&lt;br /&gt;
&lt;br /&gt;
[[ISIS direct reduction script description. ]] contains short description of the scripts, used to process results of the inelastic experiments in ISIS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Chopper parameters ===&lt;br /&gt;
&lt;br /&gt;
Reference material containing information about choppers, used by ISIS inelastic instruments, necessary for chopper &amp;#039;&amp;#039;&amp;#039;flux&amp;amp;resolution&amp;#039;&amp;#039;&amp;#039; calculations can be found in the [[Chopper Parameters]] chapter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Help with editing this wiki ===&lt;br /&gt;
&lt;br /&gt;
Consult the [//meta.wikimedia.org/wiki/Help:Contents User&amp;#039;s Guide] for information on using the wiki software.&lt;br /&gt;
&lt;br /&gt;
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Configuration settings list]&lt;br /&gt;
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]&lt;br /&gt;
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]&lt;/div&gt;</summary>
		<author><name>Alex Buts</name></author>
	</entry>
	<entry>
		<id>http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Main_Page&amp;diff=384</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Main_Page&amp;diff=384"/>
		<updated>2023-01-09T15:20:59Z</updated>

		<summary type="html">&lt;p&gt;Alex Buts: /* ISIS Direct Inelastic Data Reduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ISIS Direct Inelastic Data Reduction == &lt;br /&gt;
&lt;br /&gt;
Inelastic data reduction is the process of transforming data obtained in inelastic scattering experiment into the data, describing inelastic cross-sections of the processes under investigation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To process the data recorded by [https://www.isis.stfc.ac.uk/Pages/Neutron-spectroscopy.aspx Direct Inelastic Instruments] and obtain the desired cross-sections ISIS scientists use the [http://www.mantidproject.org/Main_Page Mantid-based] reduction program with a range of additional data and set-up parameters, tuning up this program to the particular inelastic instrument and experimental conditions. Users are also provided with access to the [http://isiscompute.nd.rl.ac.uk computing cluster], dedicated to help them in processing raw experimental data into the form, which has physical meaning.&lt;br /&gt;
&lt;br /&gt;
From a user&amp;#039;s point of view, the processing of their results should be simple and straightforward, namely:&lt;br /&gt;
&lt;br /&gt;
# User logs into his or her [https://data.analysis.stfc.ac.uk/ IDAaaS account] with logon name and password, obtained from the user office and launches virtual machine (creates workspace), dedicated for the instrument and technique used for the experiment. In his home directory he finds a folder with the RB-name of the proposal, approved for the experiment. &lt;br /&gt;
# In this RB folder user can find a python script, necessary to process the results of the experiment, obtained from the instrument. User opens this script in Mantid, changes the run numbers to the numbers obtained in the experiment, can change some reduction parameters familiar to him (the description of the parameters is provided within the script) and runs the script to processes the results of the experiment. User should not need to set up Mantid or modify the advanced reduction parameters.&lt;br /&gt;
# The desktop of the users account also contains links to more advanced sample [http://horace.isis.rl.ac.uk/Main_Page Horace] and Mantid scripts for further analysis and visualization of the experimental data. Some advanced Mantid scripts are also described below. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Services, resources and Mantid settings necessary to allow users to process their data ===&lt;br /&gt;
&lt;br /&gt;
This chapter contains the information about the data reduction service, implemented in ISIS. &lt;br /&gt;
User should familiarize himself with the information on [[Setting up Mantid, Matlab and auxiliary programs to process results of inelastic experiments.]]&lt;br /&gt;
if he is going to set up and process results of his experiments on a computers outside ISIS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
=== Autoreduction service ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; &amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt; On 01/08/2017 Autoreduction service has been disabled for inelastic instruments.&amp;lt;/span&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When Autoreduction service is enabled and set up properly, users data are also processed automatically, namely:&lt;br /&gt;
# Within RB folder a user finds folder named &amp;#039;&amp;#039;&amp;#039;autoreduction&amp;#039;&amp;#039;&amp;#039;. The folder should contain the reduced data processed automatically by [https://users.facilities.rl.ac.uk/auth/?service=http://reduce.isis.cclrc.ac.uk&amp;amp;redirecturl=http://reduce.isis.cclrc.ac.uk/ autoreduction service], which runs on a separate powerful machine and picks up the results of the experiments as they are completed and rapidly reduces them using a script similar to the one the users have in their RB folder.&lt;br /&gt;
#If necessary and convenient, the users should be able to change some parameters and reprocess some or all their runs using the web-interface and [https://users.facilities.rl.ac.uk/auth/?service=http://reduce.isis.cclrc.ac.uk&amp;amp;redirecturl=http://reduce.isis.cclrc.ac.uk/  autoreduction service].&lt;br /&gt;
#The common part of raw data processing (e.g. generation of the &amp;#039;&amp;#039;sqw&amp;#039;&amp;#039; files) can also be delegated to the [https://users.facilities.rl.ac.uk/auth/?service=http://reduce.isis.cclrc.ac.uk&amp;amp;redirecturl=http://reduce.isis.cclrc.ac.uk/  autoreduction service].&lt;br /&gt;
&lt;br /&gt;
The autoreduction service is currently working in test mode, so its availability and reliability are not guaranteed.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Crystal alignment using Mantid]] ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reduction scripts ===&lt;br /&gt;
&lt;br /&gt;
[[ISIS direct reduction script description. ]] contains short description of the scripts, used to process results of the inelastic experiments in ISIS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Chopper parameters ===&lt;br /&gt;
&lt;br /&gt;
Reference material containing information about choppers, used by ISIS inelastic instruments, necessary for chopper &amp;#039;&amp;#039;&amp;#039;flux&amp;amp;resolution&amp;#039;&amp;#039;&amp;#039; calculations can be found in the [[Chopper Parameters]] chapter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Help with editing this wiki ===&lt;br /&gt;
&lt;br /&gt;
Consult the [//meta.wikimedia.org/wiki/Help:Contents User&amp;#039;s Guide] for information on using the wiki software.&lt;br /&gt;
&lt;br /&gt;
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Configuration settings list]&lt;br /&gt;
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]&lt;br /&gt;
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]&lt;/div&gt;</summary>
		<author><name>Alex Buts</name></author>
	</entry>
	<entry>
		<id>http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Main_Page&amp;diff=383</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Main_Page&amp;diff=383"/>
		<updated>2023-01-09T15:17:55Z</updated>

		<summary type="html">&lt;p&gt;Alex Buts: /* Autoreduction service */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ISIS Direct Inelastic Data Reduction == &lt;br /&gt;
&lt;br /&gt;
Inelastic data reduction is the process of transforming data obtained in inelastic scattering experiment into the data, describing inelastic cross-sections of the processes under investigation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To process the data recorded by [https://www.isis.stfc.ac.uk/Pages/Neutron-spectroscopy.aspx Direct Inelastic Instruments] and obtain the desired cross-sections ISIS scientists use the [http://www.mantidproject.org/Main_Page Mantid-based] reduction program with a range of additional data and set-up parameters, tuning up this program to the particular inelastic instrument and experimental conditions. Users are also provided with access to the [http://isiscompute.nd.rl.ac.uk computing cluster], dedicated to help them in processing raw experimental data into the form, which has physical meaning.&lt;br /&gt;
&lt;br /&gt;
From a user&amp;#039;s point of view, the processing of their results should be simple and straightforward, namely:&lt;br /&gt;
&lt;br /&gt;
# User logs into his or her [https://data.analysis.stfc.ac.uk/ IDAaaS account] with logon name and password, obtained from the user office and launches virtual machine, dedicated for the instrument used for the experiment. In his home directory he finds a folder with the RB-name of the proposal, approved for the experiment. &lt;br /&gt;
# In this RB folder user can find a python script, necessary to process the results of the experiment, obtained from the instrument. User opens this script in Mantid, changes the run numbers to the numbers obtained in the experiment, can change some reduction parameters familiar to him (the description of the parameters is provided within the script) and runs the script to processes the results of the experiment. User should not need to set up Mantid or modify the advanced reduction parameters.&lt;br /&gt;
# The desktop of the users account also contains links to more advanced sample [http://horace.isis.rl.ac.uk/Main_Page Horace] and Mantid scripts for further analysis and visualization of the experimental data. Some advanced Mantid scripts are also described below. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Services, resources and Mantid settings necessary to allow users to process their data ===&lt;br /&gt;
&lt;br /&gt;
This chapter contains the information about the data reduction service, implemented in ISIS. &lt;br /&gt;
User should familiarize himself with the information on [[Setting up Mantid, Matlab and auxiliary programs to process results of inelastic experiments.]]&lt;br /&gt;
if he is going to set up and process results of his experiments on a computers outside ISIS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
=== Autoreduction service ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; &amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt; On 01/08/2017 Autoreduction service has been disabled for inelastic instruments.&amp;lt;/span&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When Autoreduction service is enabled and set up properly, users data are also processed automatically, namely:&lt;br /&gt;
# Within RB folder a user finds folder named &amp;#039;&amp;#039;&amp;#039;autoreduction&amp;#039;&amp;#039;&amp;#039;. The folder should contain the reduced data processed automatically by [https://users.facilities.rl.ac.uk/auth/?service=http://reduce.isis.cclrc.ac.uk&amp;amp;redirecturl=http://reduce.isis.cclrc.ac.uk/ autoreduction service], which runs on a separate powerful machine and picks up the results of the experiments as they are completed and rapidly reduces them using a script similar to the one the users have in their RB folder.&lt;br /&gt;
#If necessary and convenient, the users should be able to change some parameters and reprocess some or all their runs using the web-interface and [https://users.facilities.rl.ac.uk/auth/?service=http://reduce.isis.cclrc.ac.uk&amp;amp;redirecturl=http://reduce.isis.cclrc.ac.uk/  autoreduction service].&lt;br /&gt;
#The common part of raw data processing (e.g. generation of the &amp;#039;&amp;#039;sqw&amp;#039;&amp;#039; files) can also be delegated to the [https://users.facilities.rl.ac.uk/auth/?service=http://reduce.isis.cclrc.ac.uk&amp;amp;redirecturl=http://reduce.isis.cclrc.ac.uk/  autoreduction service].&lt;br /&gt;
&lt;br /&gt;
The autoreduction service is currently working in test mode, so its availability and reliability are not guaranteed.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Crystal alignment using Mantid]] ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reduction scripts ===&lt;br /&gt;
&lt;br /&gt;
[[ISIS direct reduction script description. ]] contains short description of the scripts, used to process results of the inelastic experiments in ISIS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Chopper parameters ===&lt;br /&gt;
&lt;br /&gt;
Reference material containing information about choppers, used by ISIS inelastic instruments, necessary for chopper &amp;#039;&amp;#039;&amp;#039;flux&amp;amp;resolution&amp;#039;&amp;#039;&amp;#039; calculations can be found in the [[Chopper Parameters]] chapter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Help with editing this wiki ===&lt;br /&gt;
&lt;br /&gt;
Consult the [//meta.wikimedia.org/wiki/Help:Contents User&amp;#039;s Guide] for information on using the wiki software.&lt;br /&gt;
&lt;br /&gt;
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Configuration settings list]&lt;br /&gt;
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]&lt;br /&gt;
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]&lt;/div&gt;</summary>
		<author><name>Alex Buts</name></author>
	</entry>
	<entry>
		<id>http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Main_Page&amp;diff=382</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Main_Page&amp;diff=382"/>
		<updated>2023-01-09T15:17:22Z</updated>

		<summary type="html">&lt;p&gt;Alex Buts: /* ISIS Direct Inelastic Data Reduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ISIS Direct Inelastic Data Reduction == &lt;br /&gt;
&lt;br /&gt;
Inelastic data reduction is the process of transforming data obtained in inelastic scattering experiment into the data, describing inelastic cross-sections of the processes under investigation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To process the data recorded by [https://www.isis.stfc.ac.uk/Pages/Neutron-spectroscopy.aspx Direct Inelastic Instruments] and obtain the desired cross-sections ISIS scientists use the [http://www.mantidproject.org/Main_Page Mantid-based] reduction program with a range of additional data and set-up parameters, tuning up this program to the particular inelastic instrument and experimental conditions. Users are also provided with access to the [http://isiscompute.nd.rl.ac.uk computing cluster], dedicated to help them in processing raw experimental data into the form, which has physical meaning.&lt;br /&gt;
&lt;br /&gt;
From a user&amp;#039;s point of view, the processing of their results should be simple and straightforward, namely:&lt;br /&gt;
&lt;br /&gt;
# User logs into his or her [https://data.analysis.stfc.ac.uk/ IDAaaS account] with logon name and password, obtained from the user office and launches virtual machine, dedicated for the instrument used for the experiment. In his home directory he finds a folder with the RB-name of the proposal, approved for the experiment. &lt;br /&gt;
# In this RB folder user can find a python script, necessary to process the results of the experiment, obtained from the instrument. User opens this script in Mantid, changes the run numbers to the numbers obtained in the experiment, can change some reduction parameters familiar to him (the description of the parameters is provided within the script) and runs the script to processes the results of the experiment. User should not need to set up Mantid or modify the advanced reduction parameters.&lt;br /&gt;
# The desktop of the users account also contains links to more advanced sample [http://horace.isis.rl.ac.uk/Main_Page Horace] and Mantid scripts for further analysis and visualization of the experimental data. Some advanced Mantid scripts are also described below. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Services, resources and Mantid settings necessary to allow users to process their data ===&lt;br /&gt;
&lt;br /&gt;
This chapter contains the information about the data reduction service, implemented in ISIS. &lt;br /&gt;
User should familiarize himself with the information on [[Setting up Mantid, Matlab and auxiliary programs to process results of inelastic experiments.]]&lt;br /&gt;
if he is going to set up and process results of his experiments on a computers outside ISIS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Autoreduction service ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; &amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt; On 01/08/2017 Autoreduction service has been disabled for inelastic instruments.&amp;lt;/span&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
When Autoreduction service is enabled and set up properly, users data are also processed automatically, namely:&lt;br /&gt;
# Within RB folder a user finds folder named &amp;#039;&amp;#039;&amp;#039;autoreduction&amp;#039;&amp;#039;&amp;#039;. The folder should contain the reduced data processed automatically by [https://users.facilities.rl.ac.uk/auth/?service=http://reduce.isis.cclrc.ac.uk&amp;amp;redirecturl=http://reduce.isis.cclrc.ac.uk/ autoreduction service], which runs on a separate powerful machine and picks up the results of the experiments as they are completed and rapidly reduces them using a script similar to the one the users have in their RB folder.&lt;br /&gt;
#If necessary and convenient, the users should be able to change some parameters and reprocess some or all their runs using the web-interface and [https://users.facilities.rl.ac.uk/auth/?service=http://reduce.isis.cclrc.ac.uk&amp;amp;redirecturl=http://reduce.isis.cclrc.ac.uk/  autoreduction service].&lt;br /&gt;
#The common part of raw data processing (e.g. generation of the &amp;#039;&amp;#039;sqw&amp;#039;&amp;#039; files) can also be delegated to the [https://users.facilities.rl.ac.uk/auth/?service=http://reduce.isis.cclrc.ac.uk&amp;amp;redirecturl=http://reduce.isis.cclrc.ac.uk/  autoreduction service].&lt;br /&gt;
&lt;br /&gt;
The autoreduction service is currently working in test mode, so its availability and reliability are not guaranteed.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Crystal alignment using Mantid]] ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reduction scripts ===&lt;br /&gt;
&lt;br /&gt;
[[ISIS direct reduction script description. ]] contains short description of the scripts, used to process results of the inelastic experiments in ISIS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Chopper parameters ===&lt;br /&gt;
&lt;br /&gt;
Reference material containing information about choppers, used by ISIS inelastic instruments, necessary for chopper &amp;#039;&amp;#039;&amp;#039;flux&amp;amp;resolution&amp;#039;&amp;#039;&amp;#039; calculations can be found in the [[Chopper Parameters]] chapter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Help with editing this wiki ===&lt;br /&gt;
&lt;br /&gt;
Consult the [//meta.wikimedia.org/wiki/Help:Contents User&amp;#039;s Guide] for information on using the wiki software.&lt;br /&gt;
&lt;br /&gt;
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Configuration settings list]&lt;br /&gt;
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]&lt;br /&gt;
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]&lt;/div&gt;</summary>
		<author><name>Alex Buts</name></author>
	</entry>
	<entry>
		<id>http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Main_Page&amp;diff=381</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Main_Page&amp;diff=381"/>
		<updated>2023-01-09T15:13:50Z</updated>

		<summary type="html">&lt;p&gt;Alex Buts: /* ISIS Direct Inelastic Data Reduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ISIS Direct Inelastic Data Reduction == &lt;br /&gt;
&lt;br /&gt;
Inelastic data reduction is the process of transforming data obtained in inelastic scattering experiment into the data, describing inelastic cross-sections of the processes under investigation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To process the data recorded by [https://www.isis.stfc.ac.uk/Pages/Neutron-spectroscopy.aspx Direct Inelastic Instruments] and obtain the desired cross-sections ISIS scientists use the [http://www.mantidproject.org/Main_Page Mantid-based] reduction program with a range of additional data and set-up parameters, tuning up this program to the particular inelastic instrument and experimental conditions. Users are also provided with access to the [http://isiscompute.nd.rl.ac.uk computing cluster], dedicated to help them in processing raw experimental data into the form, which has physical meaning.&lt;br /&gt;
&lt;br /&gt;
From a user&amp;#039;s point of view, the processing of their results should be simple and straightforward, namely:&lt;br /&gt;
&lt;br /&gt;
# User logs into his or her [http://isiscompute.nd.rl.ac.uk/ isiscompute account] with logon name and password, obtained from the user office. In his home directory he finds a folder with the RB-name of the proposal, approved for the experiment. &lt;br /&gt;
# In this RB folder user can find a python script, necessary to process the results of the experiment, obtained from the instrument. User opens this script in Mantid, changes the run numbers to the numbers obtained in the experiment, can change some reduction parameters familiar to him (the description of the parameters is provided within the script) and run the script to processes the results of the experiment. User should not need to set up Mantid or modify the advanced reduction parameters.&lt;br /&gt;
# The desktop of the users account also contains links to more advanced sample [http://horace.isis.rl.ac.uk/Main_Page Horace] and Mantid scripts for further analysis and visualization of the experimental data. Some advanced Mantid scripts are also described below. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Services, resources and Mantid settings necessary to allow users to process their data ===&lt;br /&gt;
&lt;br /&gt;
This chapter contains the information about the data reduction service, implemented in ISIS. &lt;br /&gt;
User should familiarise himself with the information on [[Setting up Mantid, Matlab and auxiliary programs to process results of inelastic experiments.]]&lt;br /&gt;
if he is going to set up and process results of his experiments on a computers outside ISIS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Autoreduction service ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; &amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt; On 01/08/2017 Autoreduction service has been disabled for inelastic instruments.&amp;lt;/span&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
When Autoreduction service is enabled and set up properly, users data are also processed automatically, namely:&lt;br /&gt;
# Within RB folder a user finds folder named &amp;#039;&amp;#039;&amp;#039;autoreduction&amp;#039;&amp;#039;&amp;#039;. The folder should contain the reduced data processed automatically by [https://users.facilities.rl.ac.uk/auth/?service=http://reduce.isis.cclrc.ac.uk&amp;amp;redirecturl=http://reduce.isis.cclrc.ac.uk/ autoreduction service], which runs on a separate powerful machine and picks up the results of the experiments as they are completed and rapidly reduces them using a script similar to the one the users have in their RB folder.&lt;br /&gt;
#If necessary and convenient, the users should be able to change some parameters and reprocess some or all their runs using the web-interface and [https://users.facilities.rl.ac.uk/auth/?service=http://reduce.isis.cclrc.ac.uk&amp;amp;redirecturl=http://reduce.isis.cclrc.ac.uk/  autoreduction service].&lt;br /&gt;
#The common part of raw data processing (e.g. generation of the &amp;#039;&amp;#039;sqw&amp;#039;&amp;#039; files) can also be delegated to the [https://users.facilities.rl.ac.uk/auth/?service=http://reduce.isis.cclrc.ac.uk&amp;amp;redirecturl=http://reduce.isis.cclrc.ac.uk/  autoreduction service].&lt;br /&gt;
&lt;br /&gt;
The autoreduction service is currently working in test mode, so its availability and reliability are not guaranteed.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Crystal alignment using Mantid]] ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reduction scripts ===&lt;br /&gt;
&lt;br /&gt;
[[ISIS direct reduction script description. ]] contains short description of the scripts, used to process results of the inelastic experiments in ISIS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Chopper parameters ===&lt;br /&gt;
&lt;br /&gt;
Reference material containing information about choppers, used by ISIS inelastic instruments, necessary for chopper &amp;#039;&amp;#039;&amp;#039;flux&amp;amp;resolution&amp;#039;&amp;#039;&amp;#039; calculations can be found in the [[Chopper Parameters]] chapter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Help with editing this wiki ===&lt;br /&gt;
&lt;br /&gt;
Consult the [//meta.wikimedia.org/wiki/Help:Contents User&amp;#039;s Guide] for information on using the wiki software.&lt;br /&gt;
&lt;br /&gt;
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Configuration settings list]&lt;br /&gt;
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]&lt;br /&gt;
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]&lt;/div&gt;</summary>
		<author><name>Alex Buts</name></author>
	</entry>
	<entry>
		<id>http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=ISIS_direct_reduction_script_description.&amp;diff=378</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=378"/>
		<updated>2020-10-19T17:02:36Z</updated>

		<summary type="html">&lt;p&gt;Alex Buts: /* 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 cycle specific master 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_SampleAbs.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 MAPS 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_2018_03.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;
| HET: &lt;br /&gt;
| ---&lt;br /&gt;
| [https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/HET/HETReduction.py HETReduction.py]&lt;br /&gt;
| [https://github.com/mantidproject/mantid/blob/master/instrument/HET_Parameters.xml HET_Parameters.xml]&lt;br /&gt;
| Is not autoconfigured&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;template_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] (Row 8, Output 2 of the Table by the link).&lt;br /&gt;
&lt;br /&gt;
Parameters used by every user 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 the &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 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. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Simple reduction script&amp;#039;&amp;#039; imports the &amp;#039;&amp;#039;full reduction script&amp;#039;&amp;#039;. Imported &amp;#039;&amp;#039;full reduction scripts&amp;#039;&amp;#039; picks up all reduction parameters defaults from the appropriate &amp;#039;&amp;#039;xml&amp;#039;&amp;#039; file and sets up parameters, specified in the script overriding default values. Parameters, specified in the &amp;#039;&amp;#039;Simple reduction script&amp;#039;&amp;#039; override all parameters, specified in the &amp;#039;&amp;#039;full reduction script&amp;#039;&amp;#039; and the instrument specific &amp;#039;&amp;#039;xml&amp;#039;&amp;#039; files. On execution, both simple and advanced reduction scripts run the same data reduction process, described below. &lt;br /&gt;
&lt;br /&gt;
User may work directly with the &amp;#039;&amp;#039;full reduction script&amp;#039;&amp;#039; 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 selected number of simple parameters in a separate &amp;#039;&amp;#039;simple script&amp;#039;&amp;#039; or setting up all parameters together in one &amp;#039;&amp;#039;full script&amp;#039;&amp;#039; 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 the &amp;#039;&amp;#039;simple reduction script&amp;#039;&amp;#039; is present, user can find the definition of the &amp;#039;&amp;#039;&amp;#039;iliad&amp;#039;&amp;#039;&amp;#039; function, used by the &amp;#039;&amp;#039;simple reduction script&amp;#039;&amp;#039; inside the &amp;#039;&amp;#039;full reduction script&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
== Reduction Scripts in Depth ==&lt;br /&gt;
&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. To benefit from reading the following, a user should be familiar with OOP jargon and have some knowledge of Python concepts for &amp;#039;&amp;#039;&amp;#039;Properties descriptors&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;Decorators&amp;#039;&amp;#039;&amp;#039;, and usage of &amp;#039;&amp;#039;&amp;#039;__setattr__&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;__getattr__&amp;#039;&amp;#039;&amp;#039; methods.  We also use word &amp;#039;&amp;#039;&amp;#039;Run&amp;#039;&amp;#039;&amp;#039; as synonym for the results of single inelastic experiment (a file or range of files, recorded during experiment and associated with the instrument and a particular experiment number (run number))&lt;br /&gt;
&lt;br /&gt;
=== Reduction script files and their purpose ===&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;
The following files are located in subfolder &amp;#039;&amp;#039;Direct&amp;#039;&amp;#039;:&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;color:blue;&lt;br /&gt;
! File&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/DirectEnergyConversion.py &amp;#039;&amp;#039;DirectEnergyConversion.py&amp;#039;&amp;#039;]&lt;br /&gt;
| 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;,invoked for each run or sum of runs, and converting data, obtained in experiment into reduced data. All other methods of this class are directly or indirectly called by this method. The class also imports [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/diagnostics.py diagnostics.py] file, containing number of functions, responsible for various diagnostics operations over a Mantid workspace. &lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/NonIDF_Properties.py &amp;#039;&amp;#039;NonIDF_Properties.py&amp;#039;&amp;#039;] &lt;br /&gt;
|The file contains the parent class for the [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/PropertyManager.py &amp;#039;&amp;#039;PropertyManager&amp;#039;&amp;#039;] class below. It instantiates and controls properties, not related to the properties found 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;, or &amp;#039;&amp;#039;&amp;#039;sample_run&amp;#039;&amp;#039;&amp;#039;)&lt;br /&gt;
|-&lt;br /&gt;
| [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/PropertyManager.py &amp;#039;&amp;#039;PropertyManager.py&amp;#039;&amp;#039;]&lt;br /&gt;
| When workspace is loaded, Mantid reads appropriate &amp;#039;&amp;#039;&amp;#039;InstrumentName_Parameters.xml&amp;#039;&amp;#039;&amp;#039; file and interprets all records, found in this file as instrument parameters with appropriate names. This python class, together with [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/NonIDF_Properties.py &amp;#039;&amp;#039;NonIDF_Properties&amp;#039;&amp;#039;] class get access to these parameters and transforms them into &amp;#039;&amp;#039;DirectEnergyConversion&amp;#039;&amp;#039; process properties. This class is also responsible for processing user input and all other &amp;#039;&amp;#039;DirectEnergyConversion&amp;#039;&amp;#039; properties, and provides input data and settings for [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/DirectEnergyConversion.py &amp;#039;&amp;#039;DirectEnergyConversion&amp;#039;&amp;#039;]. To do that &amp;#039;&amp;#039;PropertyManager&amp;#039;&amp;#039;, together with [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/NonIDF_Properties.py  NonIDF_Properties] class instantiates classes found in three other files, namely: [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/PropertiesDescriptors.py &amp;#039;&amp;#039;PropertiesDescriptors.py&amp;#039;&amp;#039;],[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/RunDescriptor.py &amp;#039;&amp;#039;RunDescriptor.py&amp;#039;&amp;#039;]  and [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/ReductionHelpers.py &amp;#039;&amp;#039;ReductionHelpers.py&amp;#039;&amp;#039;].&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/PropertiesDescriptors.py &amp;#039;&amp;#039;PropertiesDescriptors.py&amp;#039;&amp;#039;],[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/RunDescriptor.py &amp;#039;&amp;#039;RunDescriptor.py&amp;#039;&amp;#039;]  and [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/ReductionHelpers.py &amp;#039;&amp;#039;ReductionHelpers.py&amp;#039;&amp;#039;] contain small classes and functions helping to process and provide various input parameters to [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/DirectEnergyConversion.py &amp;#039;&amp;#039;DirectEnergyConversion&amp;#039;&amp;#039;], namely :&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;color:blue;&lt;br /&gt;
! File&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/ReductionHelpers.py &amp;#039;&amp;#039;ReductionHelpers.py&amp;#039;&amp;#039;]&lt;br /&gt;
| contains 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; 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;
|-&lt;br /&gt;
|[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/PropertiesDescriptors.py &amp;#039;&amp;#039;PropertiesDescriptors.py&amp;#039;&amp;#039;] &lt;br /&gt;
| contains classes related to properties, described in &amp;#039;&amp;#039;&amp;#039;Instrument_Parameters.xml&amp;#039;&amp;#039;&amp;#039; but providing 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; present in &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 is indeed present.&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/RunDescriptor.py &amp;#039;&amp;#039;RunDescriptor.py&amp;#039;&amp;#039;]&lt;br /&gt;
| contains one but most important property descriptor, related to the reduced and auxiliary experimental data(file). It&amp;#039;s responsible for conversion between run numbers and file names, loading appropriate files to Mantid to use in reduction, renaming workspaces according to different stages of reduction process, etc. Each run related property such as &amp;#039;&amp;#039;&amp;#039;sample_run&amp;#039;&amp;#039;&amp;#039;,&amp;#039;&amp;#039;&amp;#039;wb_run&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;monovan_run&amp;#039;&amp;#039;&amp;#039;, etc is described by a variable-instance of this class located in [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/NonIDF_Properties.py &amp;#039;&amp;#039;NonIDF_Properties&amp;#039;&amp;#039;] class.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
&amp;#039;&amp;#039;PropertyManager&amp;#039;&amp;#039; and many properties descriptors form files above are implemented as singletons so any property instance can be accessed in reduction as:&lt;br /&gt;
&lt;br /&gt;
   prop = PropertyManager.property_name&lt;br /&gt;
&lt;br /&gt;
When &amp;#039;&amp;#039;PropertyManager&amp;#039;&amp;#039; has been instantiated somewhere in the python workspace (as part of the reduction script, see below) the call like: &lt;br /&gt;
 is_multirep  = PropertyManager.incident_energy.multirep_mode()   Returns true if energy is defined as list of energies and false otherwise (multirep mode)&lt;br /&gt;
or:&lt;br /&gt;
  run_nuber = PropertyManager.sample_run.run_number()    Get run number for defined sample run.&lt;br /&gt;
  ws        = PropertyManager.sample_run.get_workspace()  Get Mantid workspace correspondent to sample run (if one is defined) at current state of reduction&lt;br /&gt;
                                                          The data will be loaded in memory and properly calibrated if this have not happened yet.&lt;br /&gt;
&lt;br /&gt;
Note the difference between getting the whole property above, allowing access to the properties methods, and getting access to property value within &amp;#039;&amp;#039;PropertyManager&amp;#039;&amp;#039; instance (PropertyManager instantiated in DirectEnergyConversion as prop_man):&lt;br /&gt;
  dc = DirectEnergyConversion(&amp;#039;MER&amp;#039;)&lt;br /&gt;
  dc.prop_man.sample_run = 2034  # Accessing the PropertyManager instance &amp;#039;&amp;#039;&amp;#039;prop_men&amp;#039;&amp;#039;&amp;#039; defined within DirectEnergyConversion class&lt;br /&gt;
  print &amp;quot;Sample run number is: &amp;quot;,dc.prop_man.sample_run&lt;br /&gt;
prints:&lt;br /&gt;
 Sample run number is:2034&lt;br /&gt;
while calling &lt;br /&gt;
  ws        = PropertyManager.sample_run.get_workspace()&lt;br /&gt;
after assigning number to the sample run will try to load Merlin workspace and will return it if Merlin run file for experiment with run number 2034 can be found on the Mantid search path.&lt;br /&gt;
&lt;br /&gt;
Simplest reduction script can be build on the basis of &amp;#039;&amp;#039;DirectEnergyConversion&amp;#039;&amp;#039; class as follows:&lt;br /&gt;
 Usage:&lt;br /&gt;
    red = DirectEnergyConversion(&amp;#039;InstrumentName&amp;#039;)&lt;br /&gt;
    red.prop_man.sample_run = run number&lt;br /&gt;
    red.prop_man.wb_run     = Whitebeam&lt;br /&gt;
    red.prop_man.incident_energy = energy guess&lt;br /&gt;
    red.prop_man.energy_bins = [min_val,step,max_val]&lt;br /&gt;
    red.convert_to_energy()&lt;br /&gt;
&lt;br /&gt;
Or in functional form:&lt;br /&gt;
    red = DirectEnergyConversion(&amp;#039;InstrumentName&amp;#039;)&lt;br /&gt;
      and then:&lt;br /&gt;
    red.convert_to_energy(wb_run,sample_run,ei_guess,rebin)&lt;br /&gt;
      or&lt;br /&gt;
    red.convert_to_energy(wb_run,sample_run,ei_guess,rebin,**arguments)&lt;br /&gt;
      or&lt;br /&gt;
    red.convert_to_energy(wb_run,sample_run,ei_guess,rebin,mapfile,**arguments)&lt;br /&gt;
In more details various ways of calling the convert_to_energy method are described within [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/DirectEnergyConversion.py &amp;#039;&amp;#039;DirectEnergyConversion&amp;#039;&amp;#039;] class itself.&lt;br /&gt;
&lt;br /&gt;
=== Reduction wrapper ===&lt;br /&gt;
&lt;br /&gt;
User usually reduces range of data files. In additional to that, if autoreduction is deployed, the parameters of the reduction script should be loaded to and be modifiable from the [https://users.facilities.rl.ac.uk/auth/?service=http://reduce.isis.cclrc.ac.uk&amp;amp;redirecturl=http://reduce.isis.cclrc.ac.uk/ web interface]. &lt;br /&gt;
&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/ReductionWrapper.py ReductionWrapper.py] &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
class provides procedures to run reduction over list of run numbers, to wait until the files intended for reduction are actually recorded and the decorators, switching between the web interface if the reduction is run by the autoreduction and provided by a user if the reduction is run in the user&amp;#039;s Mantid session.&lt;br /&gt;
&lt;br /&gt;
User&amp;#039;s reduction files described in the section above contain the &amp;#039;&amp;#039;&amp;#039;ReductionWrapper&amp;#039;&amp;#039;&amp;#039; class overloaded and modified according to the features of the particular instrument, and the &amp;#039;&amp;#039;__main__&amp;#039;&amp;#039; section, which instantiates appropriate class and executes &amp;#039;&amp;#039;run_reduction()&amp;#039;&amp;#039; method of this &amp;#039;&amp;#039;ReductionWrapper&amp;#039;&amp;#039; instance if the reduction script is run from the user&amp;#039;s session. The web service runs its own instance of the instrument specific &amp;#039;&amp;#039;&amp;#039;ReductionWrapper&amp;#039;&amp;#039;&amp;#039; class, providing this instance with the information to pick up the parameters from the [https://users.facilities.rl.ac.uk/auth/?service=http://reduce.isis.cclrc.ac.uk&amp;amp;redirecturl=http://reduce.isis.cclrc.ac.uk/ autoreduction web interface].&lt;/div&gt;</summary>
		<author><name>Alex Buts</name></author>
	</entry>
	<entry>
		<id>http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=ISIS_direct_reduction_script_description.&amp;diff=377</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=377"/>
		<updated>2020-10-19T16:59:58Z</updated>

		<summary type="html">&lt;p&gt;Alex Buts: /* 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 cycle specific master 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 MAPS 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_2018_03.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;
| HET: &lt;br /&gt;
| ---&lt;br /&gt;
| [https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/HET/HETReduction.py HETReduction.py]&lt;br /&gt;
| [https://github.com/mantidproject/mantid/blob/master/instrument/HET_Parameters.xml HET_Parameters.xml]&lt;br /&gt;
| Is not autoconfigured&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;template_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] (Row 8, Output 2 of the Table by the link).&lt;br /&gt;
&lt;br /&gt;
Parameters used by every user 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 the &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 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. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Simple reduction script&amp;#039;&amp;#039; imports the &amp;#039;&amp;#039;full reduction script&amp;#039;&amp;#039;. Imported &amp;#039;&amp;#039;full reduction scripts&amp;#039;&amp;#039; picks up all reduction parameters defaults from the appropriate &amp;#039;&amp;#039;xml&amp;#039;&amp;#039; file and sets up parameters, specified in the script overriding default values. Parameters, specified in the &amp;#039;&amp;#039;Simple reduction script&amp;#039;&amp;#039; override all parameters, specified in the &amp;#039;&amp;#039;full reduction script&amp;#039;&amp;#039; and the instrument specific &amp;#039;&amp;#039;xml&amp;#039;&amp;#039; files. On execution, both simple and advanced reduction scripts run the same data reduction process, described below. &lt;br /&gt;
&lt;br /&gt;
User may work directly with the &amp;#039;&amp;#039;full reduction script&amp;#039;&amp;#039; 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 selected number of simple parameters in a separate &amp;#039;&amp;#039;simple script&amp;#039;&amp;#039; or setting up all parameters together in one &amp;#039;&amp;#039;full script&amp;#039;&amp;#039; 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 the &amp;#039;&amp;#039;simple reduction script&amp;#039;&amp;#039; is present, user can find the definition of the &amp;#039;&amp;#039;&amp;#039;iliad&amp;#039;&amp;#039;&amp;#039; function, used by the &amp;#039;&amp;#039;simple reduction script&amp;#039;&amp;#039; inside the &amp;#039;&amp;#039;full reduction script&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
== Reduction Scripts in Depth ==&lt;br /&gt;
&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. To benefit from reading the following, a user should be familiar with OOP jargon and have some knowledge of Python concepts for &amp;#039;&amp;#039;&amp;#039;Properties descriptors&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;Decorators&amp;#039;&amp;#039;&amp;#039;, and usage of &amp;#039;&amp;#039;&amp;#039;__setattr__&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;__getattr__&amp;#039;&amp;#039;&amp;#039; methods.  We also use word &amp;#039;&amp;#039;&amp;#039;Run&amp;#039;&amp;#039;&amp;#039; as synonym for the results of single inelastic experiment (a file or range of files, recorded during experiment and associated with the instrument and a particular experiment number (run number))&lt;br /&gt;
&lt;br /&gt;
=== Reduction script files and their purpose ===&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;
The following files are located in subfolder &amp;#039;&amp;#039;Direct&amp;#039;&amp;#039;:&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;color:blue;&lt;br /&gt;
! File&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/DirectEnergyConversion.py &amp;#039;&amp;#039;DirectEnergyConversion.py&amp;#039;&amp;#039;]&lt;br /&gt;
| 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;,invoked for each run or sum of runs, and converting data, obtained in experiment into reduced data. All other methods of this class are directly or indirectly called by this method. The class also imports [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/diagnostics.py diagnostics.py] file, containing number of functions, responsible for various diagnostics operations over a Mantid workspace. &lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/NonIDF_Properties.py &amp;#039;&amp;#039;NonIDF_Properties.py&amp;#039;&amp;#039;] &lt;br /&gt;
|The file contains the parent class for the [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/PropertyManager.py &amp;#039;&amp;#039;PropertyManager&amp;#039;&amp;#039;] class below. It instantiates and controls properties, not related to the properties found 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;, or &amp;#039;&amp;#039;&amp;#039;sample_run&amp;#039;&amp;#039;&amp;#039;)&lt;br /&gt;
|-&lt;br /&gt;
| [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/PropertyManager.py &amp;#039;&amp;#039;PropertyManager.py&amp;#039;&amp;#039;]&lt;br /&gt;
| When workspace is loaded, Mantid reads appropriate &amp;#039;&amp;#039;&amp;#039;InstrumentName_Parameters.xml&amp;#039;&amp;#039;&amp;#039; file and interprets all records, found in this file as instrument parameters with appropriate names. This python class, together with [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/NonIDF_Properties.py &amp;#039;&amp;#039;NonIDF_Properties&amp;#039;&amp;#039;] class get access to these parameters and transforms them into &amp;#039;&amp;#039;DirectEnergyConversion&amp;#039;&amp;#039; process properties. This class is also responsible for processing user input and all other &amp;#039;&amp;#039;DirectEnergyConversion&amp;#039;&amp;#039; properties, and provides input data and settings for [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/DirectEnergyConversion.py &amp;#039;&amp;#039;DirectEnergyConversion&amp;#039;&amp;#039;]. To do that &amp;#039;&amp;#039;PropertyManager&amp;#039;&amp;#039;, together with [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/NonIDF_Properties.py  NonIDF_Properties] class instantiates classes found in three other files, namely: [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/PropertiesDescriptors.py &amp;#039;&amp;#039;PropertiesDescriptors.py&amp;#039;&amp;#039;],[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/RunDescriptor.py &amp;#039;&amp;#039;RunDescriptor.py&amp;#039;&amp;#039;]  and [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/ReductionHelpers.py &amp;#039;&amp;#039;ReductionHelpers.py&amp;#039;&amp;#039;].&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/PropertiesDescriptors.py &amp;#039;&amp;#039;PropertiesDescriptors.py&amp;#039;&amp;#039;],[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/RunDescriptor.py &amp;#039;&amp;#039;RunDescriptor.py&amp;#039;&amp;#039;]  and [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/ReductionHelpers.py &amp;#039;&amp;#039;ReductionHelpers.py&amp;#039;&amp;#039;] contain small classes and functions helping to process and provide various input parameters to [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/DirectEnergyConversion.py &amp;#039;&amp;#039;DirectEnergyConversion&amp;#039;&amp;#039;], namely :&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;color:blue;&lt;br /&gt;
! File&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/ReductionHelpers.py &amp;#039;&amp;#039;ReductionHelpers.py&amp;#039;&amp;#039;]&lt;br /&gt;
| contains 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; 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;
|-&lt;br /&gt;
|[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/PropertiesDescriptors.py &amp;#039;&amp;#039;PropertiesDescriptors.py&amp;#039;&amp;#039;] &lt;br /&gt;
| contains classes related to properties, described in &amp;#039;&amp;#039;&amp;#039;Instrument_Parameters.xml&amp;#039;&amp;#039;&amp;#039; but providing 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; present in &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 is indeed present.&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/RunDescriptor.py &amp;#039;&amp;#039;RunDescriptor.py&amp;#039;&amp;#039;]&lt;br /&gt;
| contains one but most important property descriptor, related to the reduced and auxiliary experimental data(file). It&amp;#039;s responsible for conversion between run numbers and file names, loading appropriate files to Mantid to use in reduction, renaming workspaces according to different stages of reduction process, etc. Each run related property such as &amp;#039;&amp;#039;&amp;#039;sample_run&amp;#039;&amp;#039;&amp;#039;,&amp;#039;&amp;#039;&amp;#039;wb_run&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;monovan_run&amp;#039;&amp;#039;&amp;#039;, etc is described by a variable-instance of this class located in [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/NonIDF_Properties.py &amp;#039;&amp;#039;NonIDF_Properties&amp;#039;&amp;#039;] class.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
&amp;#039;&amp;#039;PropertyManager&amp;#039;&amp;#039; and many properties descriptors form files above are implemented as singletons so any property instance can be accessed in reduction as:&lt;br /&gt;
&lt;br /&gt;
   prop = PropertyManager.property_name&lt;br /&gt;
&lt;br /&gt;
When &amp;#039;&amp;#039;PropertyManager&amp;#039;&amp;#039; has been instantiated somewhere in the python workspace (as part of the reduction script, see below) the call like: &lt;br /&gt;
 is_multirep  = PropertyManager.incident_energy.multirep_mode()   Returns true if energy is defined as list of energies and false otherwise (multirep mode)&lt;br /&gt;
or:&lt;br /&gt;
  run_nuber = PropertyManager.sample_run.run_number()    Get run number for defined sample run.&lt;br /&gt;
  ws        = PropertyManager.sample_run.get_workspace()  Get Mantid workspace correspondent to sample run (if one is defined) at current state of reduction&lt;br /&gt;
                                                          The data will be loaded in memory and properly calibrated if this have not happened yet.&lt;br /&gt;
&lt;br /&gt;
Note the difference between getting the whole property above, allowing access to the properties methods, and getting access to property value within &amp;#039;&amp;#039;PropertyManager&amp;#039;&amp;#039; instance (PropertyManager instantiated in DirectEnergyConversion as prop_man):&lt;br /&gt;
  dc = DirectEnergyConversion(&amp;#039;MER&amp;#039;)&lt;br /&gt;
  dc.prop_man.sample_run = 2034  # Accessing the PropertyManager instance &amp;#039;&amp;#039;&amp;#039;prop_men&amp;#039;&amp;#039;&amp;#039; defined within DirectEnergyConversion class&lt;br /&gt;
  print &amp;quot;Sample run number is: &amp;quot;,dc.prop_man.sample_run&lt;br /&gt;
prints:&lt;br /&gt;
 Sample run number is:2034&lt;br /&gt;
while calling &lt;br /&gt;
  ws        = PropertyManager.sample_run.get_workspace()&lt;br /&gt;
after assigning number to the sample run will try to load Merlin workspace and will return it if Merlin run file for experiment with run number 2034 can be found on the Mantid search path.&lt;br /&gt;
&lt;br /&gt;
Simplest reduction script can be build on the basis of &amp;#039;&amp;#039;DirectEnergyConversion&amp;#039;&amp;#039; class as follows:&lt;br /&gt;
 Usage:&lt;br /&gt;
    red = DirectEnergyConversion(&amp;#039;InstrumentName&amp;#039;)&lt;br /&gt;
    red.prop_man.sample_run = run number&lt;br /&gt;
    red.prop_man.wb_run     = Whitebeam&lt;br /&gt;
    red.prop_man.incident_energy = energy guess&lt;br /&gt;
    red.prop_man.energy_bins = [min_val,step,max_val]&lt;br /&gt;
    red.convert_to_energy()&lt;br /&gt;
&lt;br /&gt;
Or in functional form:&lt;br /&gt;
    red = DirectEnergyConversion(&amp;#039;InstrumentName&amp;#039;)&lt;br /&gt;
      and then:&lt;br /&gt;
    red.convert_to_energy(wb_run,sample_run,ei_guess,rebin)&lt;br /&gt;
      or&lt;br /&gt;
    red.convert_to_energy(wb_run,sample_run,ei_guess,rebin,**arguments)&lt;br /&gt;
      or&lt;br /&gt;
    red.convert_to_energy(wb_run,sample_run,ei_guess,rebin,mapfile,**arguments)&lt;br /&gt;
In more details various ways of calling the convert_to_energy method are described within [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/DirectEnergyConversion.py &amp;#039;&amp;#039;DirectEnergyConversion&amp;#039;&amp;#039;] class itself.&lt;br /&gt;
&lt;br /&gt;
=== Reduction wrapper ===&lt;br /&gt;
&lt;br /&gt;
User usually reduces range of data files. In additional to that, if autoreduction is deployed, the parameters of the reduction script should be loaded to and be modifiable from the [https://users.facilities.rl.ac.uk/auth/?service=http://reduce.isis.cclrc.ac.uk&amp;amp;redirecturl=http://reduce.isis.cclrc.ac.uk/ web interface]. &lt;br /&gt;
&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/ReductionWrapper.py ReductionWrapper.py] &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
class provides procedures to run reduction over list of run numbers, to wait until the files intended for reduction are actually recorded and the decorators, switching between the web interface if the reduction is run by the autoreduction and provided by a user if the reduction is run in the user&amp;#039;s Mantid session.&lt;br /&gt;
&lt;br /&gt;
User&amp;#039;s reduction files described in the section above contain the &amp;#039;&amp;#039;&amp;#039;ReductionWrapper&amp;#039;&amp;#039;&amp;#039; class overloaded and modified according to the features of the particular instrument, and the &amp;#039;&amp;#039;__main__&amp;#039;&amp;#039; section, which instantiates appropriate class and executes &amp;#039;&amp;#039;run_reduction()&amp;#039;&amp;#039; method of this &amp;#039;&amp;#039;ReductionWrapper&amp;#039;&amp;#039; instance if the reduction script is run from the user&amp;#039;s session. The web service runs its own instance of the instrument specific &amp;#039;&amp;#039;&amp;#039;ReductionWrapper&amp;#039;&amp;#039;&amp;#039; class, providing this instance with the information to pick up the parameters from the [https://users.facilities.rl.ac.uk/auth/?service=http://reduce.isis.cclrc.ac.uk&amp;amp;redirecturl=http://reduce.isis.cclrc.ac.uk/ autoreduction web interface].&lt;/div&gt;</summary>
		<author><name>Alex Buts</name></author>
	</entry>
	<entry>
		<id>http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Instrument_parameters_and_Instrument_definitions&amp;diff=376</id>
		<title>Instrument parameters and Instrument definitions</title>
		<link rel="alternate" type="text/html" href="http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Instrument_parameters_and_Instrument_definitions&amp;diff=376"/>
		<updated>2020-10-08T11:11:30Z</updated>

		<summary type="html">&lt;p&gt;Alex Buts: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Experiment specific parameters == &lt;br /&gt;
&lt;br /&gt;
To reduce experimental data described in the previous chapter, user needs access to [http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Location_and_details_of_access_to_instrument_parameters,_necessary_to_reduce_data#Instrument_Definition_Files Instrument Definition Files] (IDF) defining main configuration of the instrument and parameters of the script, [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_sample_scripts_used_in_data_processing which processes the data], and the range of auxiliary files such as &amp;#039;&amp;#039;&amp;#039;detector calibration file&amp;#039;&amp;#039;&amp;#039;, defining actual neutronic positions of detectors in an experiment, &amp;#039;&amp;#039;&amp;#039;map files&amp;#039;&amp;#039;&amp;#039; (extension .map), defining the detector grouping, &amp;#039;&amp;#039;&amp;#039;mask files&amp;#039;&amp;#039;&amp;#039; (extension .msk) defining the lists of detectors which should not be processed and in less extend other files (.par, .phx, .nxs etc.)&lt;br /&gt;
&lt;br /&gt;
On [http://www.isis.stfc.ac.uk/groups/excitations/data-analysis-computers/connecting-to-isiscomputendrlacuk-using-nomachine15120.html isiscompute servers] and instrument cabin computers these files can be accessed at:&lt;br /&gt;
&lt;br /&gt;
  /usr/local/mprogs/InstrumentFiles/[INSTRUMENT_NAME]&lt;br /&gt;
&lt;br /&gt;
folder where the &amp;#039;&amp;#039;&amp;#039;INSTRUMENT_NAME&amp;#039;&amp;#039;&amp;#039; should be replaced by one out of &amp;#039;&amp;#039;&amp;#039;[mari,maps,merlin,let]&amp;#039;&amp;#039;&amp;#039; values list. Some instrument scientists create symbolic links (usually on Desktop) providing quick access to the files relevant for a particular instrument. &lt;br /&gt;
&lt;br /&gt;
[http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Automatic_user_configuration Automatic configuration scripts] running on [https://isiscompute.nd.rl.ac.uk/nxwebplayer isiscompue servers] automatically add appropriate folder, corresponding to the instrument to Mantid data search path (see picture below). This make the data, stored in the folder available to the [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_sample_scripts_used_in_data_processing reduction scripts] and places the link to the instrument files to the Nomachine desktop. &lt;br /&gt;
&lt;br /&gt;
[[File:instrumentFiles.png]]&lt;br /&gt;
&lt;br /&gt;
The path to the requested instrument parameters on the picture above is set to &amp;#039;&amp;#039;&amp;#039;merlin&amp;#039;&amp;#039;&amp;#039; instrument parameter&amp;#039;s folder in the first row of the data search path folders list (blue arrow).&lt;br /&gt;
&lt;br /&gt;
Currently instrument parameters are placed on Github with the repository belonging to PACE project:&lt;br /&gt;
&lt;br /&gt;
 [https://github.com/pace-neutrons/InstrumentFiles]&lt;br /&gt;
&lt;br /&gt;
If user wants to run reduction on their own computer, he needs to checkout these files. Everybody can clone data from this server and some instrument scientists have write access to it. Contact [mailto:alex.buts@stfc.ac.uk Alex Buts] if you believe you  need write access to the server. &lt;br /&gt;
On a Unix machine, an authorized person can add an instrument file to the source control and send it to the server by placing the file into appropriate instrument folder and issuing the following commands:&lt;br /&gt;
&lt;br /&gt;
  git add &amp;quot;file_name&amp;quot;&lt;br /&gt;
  git commit -m&amp;quot; message describing purpose of the file&amp;quot;&lt;br /&gt;
  git push&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://github.com/FITLinuxSupport/analysisscripts/blob/master/UpdateSVN Simple scripts] are running each hour on instrument cabin machines and [https://isiscompute.nd.rl.ac.uk/nxwebplayer isiscompue servers] pulling data from SVN server, so the file added to the svn server on any machine is ready to be used everywhere within an hour. The result of script operations is currently mailed to main instrument machine user (&amp;#039;&amp;#039;mari&amp;#039;&amp;#039;, &amp;#039;&amp;#039;let&amp;#039;&amp;#039;,&amp;#039;&amp;#039;maps&amp;#039;&amp;#039; or &amp;#039;&amp;#039;merlin&amp;#039;&amp;#039;) so you can see results of these scripts work logging in as this user and typing&lt;br /&gt;
 &lt;br /&gt;
 &amp;gt;&amp;gt;mail &lt;br /&gt;
&lt;br /&gt;
command. The logs are regularly reviewed and cleared up manually. On [https://isiscompute.nd.rl.ac.uk/nxwebplayer isiscompue servers] only the last results are logged and placed into:&lt;br /&gt;
&lt;br /&gt;
   /var/log/UpdateSVN.log.&lt;br /&gt;
&lt;br /&gt;
available on &amp;#039;&amp;#039;&amp;#039;ndmlnx01&amp;#039;&amp;#039;&amp;#039; node only.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The GIT command:&lt;br /&gt;
 &lt;br /&gt;
  git pull&lt;br /&gt;
&lt;br /&gt;
can be issued from the instruments folder of a particular machine (always &amp;#039;&amp;#039;&amp;#039;/usr/local/mprogs/InstrumentFiles/&amp;#039;&amp;#039;&amp;#039; but may have additional references on particular machines) to get immediate access to a new data, but on [https://isiscompute.nd.rl.ac.uk/nxwebplayer isiscompue servers] this command needs administrative access.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#0000ff; background:#FF69B4&amp;quot;&amp;gt; In 2015 git was the most convenient way to provide data synchronization between various computers, but other methods are available now. &lt;br /&gt;
Group needs to discuss if this is still appropriate way of sharing data these days. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Setting_up_Mantid,_Matlab_and_auxiliary_programs_to_process_results_of_inelastic_experiments. Back to setting up Mantid]&lt;br /&gt;
&lt;br /&gt;
== Instrument Specific Files (Instrument Definitions) ==&lt;br /&gt;
&lt;br /&gt;
Instrument definition files, which describe the the instrument configuration and main parameters of the reduction are part of [http://docs.mantidproject.org/nightly/concepts/InstrumentDefinitionFile.html Mantid] and are usually located in &amp;#039;&amp;#039;/opt/Mantid/instrument&amp;#039;&amp;#039; folder on Unix or &amp;#039;&amp;#039;MantidInstallationFolder\instrument&amp;#039;&amp;#039;  folder (&amp;#039;&amp;#039;c:\MantidInstall\instrument&amp;#039;&amp;#039; by default) on Windows.&lt;br /&gt;
&lt;br /&gt;
Newer version of these files produced after Mantid release are automatically retrieved by Matnid at startup into &amp;#039;&amp;#039;~/.mantid/instrument&amp;#039;&amp;#039; on Unix or &amp;#039;&amp;#039;c:\Users\USERACCOUNT_FOLDER\AppData\Roaming\mantidproject\mantid\instrument&amp;#039;&amp;#039; folder on Windows. Such files, if present for a particular instrument override files in Mantid installation directory. &lt;br /&gt;
&lt;br /&gt;
  INSTRUMENT_NAME_Parameters.xml&lt;br /&gt;
&lt;br /&gt;
file provide comprehensive list and description of almost all parameters used by [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_sample_scripts_used_in_data_processing the data reduction script] and the file:&lt;br /&gt;
&lt;br /&gt;
  INSTRUMENT_NAME_Definition.xml&lt;br /&gt;
&lt;br /&gt;
describes all details of the instrument geometry. For further details of the file format and their contents user should look at [http://docs.mantidproject.org/nightly/concepts/InstrumentDefinitionFile.html Mantid IDF description] pages.&lt;br /&gt;
&lt;br /&gt;
Actual default parameters for inelastic data reduction scripts, which are used by Mantid reduction script can also be accessed on the web from Mantid Git repository:&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/mantidproject/mantid/blob/master/instrument/MARI_Parameters.xml MARI Reduction parameters]&lt;br /&gt;
*[https://github.com/mantidproject/mantid/blob/master/instrument/MAPS_Parameters.xml MAPS Reduction parameters]&lt;br /&gt;
*[https://github.com/mantidproject/mantid/blob/master/instrument/MERLIN_Parameters_after2013_4.xml MERLIN Reduction parameters]&lt;br /&gt;
*[https://github.com/mantidproject/mantid/blob/master/instrument/LET_Parameters_dr1to12.xml LET Reduction parameters]&lt;br /&gt;
*[https://github.com/mantidproject/mantid/blob/master/instrument/HET_Parameters.xml HET Reduction parameters]&lt;br /&gt;
&lt;br /&gt;
[http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Setting_up_Mantid,_Matlab_and_auxiliary_programs_to_process_results_of_inelastic_experiments. Back to setting up Mantid]&lt;/div&gt;</summary>
		<author><name>Alex Buts</name></author>
	</entry>
	<entry>
		<id>http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Instrument_parameters_and_Instrument_definitions&amp;diff=375</id>
		<title>Instrument parameters and Instrument definitions</title>
		<link rel="alternate" type="text/html" href="http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Instrument_parameters_and_Instrument_definitions&amp;diff=375"/>
		<updated>2020-10-08T09:42:29Z</updated>

		<summary type="html">&lt;p&gt;Alex Buts: /* Experiment specific parameters */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Experiment specific parameters == &lt;br /&gt;
&lt;br /&gt;
To reduce experimental data described in the previous chapter, user needs access to [http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Location_and_details_of_access_to_instrument_parameters,_necessary_to_reduce_data#Instrument_Definition_Files Instrument Definition Files] (IDF) defining main configuration of the instrument and parameters of the script, [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_sample_scripts_used_in_data_processing which processes the data], and the range of auxiliary files such as &amp;#039;&amp;#039;&amp;#039;detector calibration file&amp;#039;&amp;#039;&amp;#039;, defining actual neutronic positions of detectors in an experiment, &amp;#039;&amp;#039;&amp;#039;map files&amp;#039;&amp;#039;&amp;#039; (extension .map), defining the detector grouping, &amp;#039;&amp;#039;&amp;#039;mask files&amp;#039;&amp;#039;&amp;#039; (extension .msk) defining the lists of detectors which should not be processed and in less extend other files (.par, .phx, .nxs etc.)&lt;br /&gt;
&lt;br /&gt;
On [http://www.isis.stfc.ac.uk/groups/excitations/data-analysis-computers/connecting-to-isiscomputendrlacuk-using-nomachine15120.html isiscompute servers] and instrument cabin computers these files can be accessed at:&lt;br /&gt;
&lt;br /&gt;
  /usr/local/mprogs/InstrumentFiles/[INSTRUMENT_NAME]&lt;br /&gt;
&lt;br /&gt;
folder where the &amp;#039;&amp;#039;&amp;#039;INSTRUMENT_NAME&amp;#039;&amp;#039;&amp;#039; should be replaced by one out of &amp;#039;&amp;#039;&amp;#039;[mari,maps,merlin,let]&amp;#039;&amp;#039;&amp;#039; values list. Some instrument scientists create symbolic links (usually on Desktop) providing quick access to the files relevant for a particular instrument. &lt;br /&gt;
&lt;br /&gt;
[http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Automatic_user_configuration Automatic configuration scripts] running on [https://isiscompute.nd.rl.ac.uk/nxwebplayer isiscompue servers] automatically add appropriate folder, corresponding to the instrument to Mantid data search path (see picture below). This make the data, stored in the folder available to the [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_sample_scripts_used_in_data_processing reduction scripts] and places the link to the instrument files to the Nomachine desktop. &lt;br /&gt;
&lt;br /&gt;
[[File:instrumentFiles.png]]&lt;br /&gt;
&lt;br /&gt;
The path to the requested instrument parameters on the picture above is set to &amp;#039;&amp;#039;&amp;#039;merlin&amp;#039;&amp;#039;&amp;#039; instrument parameter&amp;#039;s folder in the first row of the data search path folders list (blue arrow).&lt;br /&gt;
&lt;br /&gt;
Currently instrument parameters are placed on Github with the repository belonging to PACE project:&lt;br /&gt;
&lt;br /&gt;
 [https://github.com/pace-neutrons/InstrumentFiles]&lt;br /&gt;
&lt;br /&gt;
If user wants to run reduction on their own computer, he needs to checkout these files. Everybody can clone data from this server and some instrument scientists have write access to it. Contact [mailto:alex.buts@stfc.ac.uk Alex Buts] if you believe you  need write access to the server. &lt;br /&gt;
On a Unix machine, an authorized person can add an instrument file to the source control and send it to the server by placing the file into appropriate instrument folder and issuing the following commands:&lt;br /&gt;
&lt;br /&gt;
  git add &amp;quot;file_name&amp;quot;&lt;br /&gt;
  git commit -m&amp;quot; message describing purpose of the file&amp;quot;&lt;br /&gt;
  git push&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://github.com/FITLinuxSupport/analysisscripts/blob/master/UpdateSVN Simple scripts] are running each hour on instrument cabin machines and [https://isiscompute.nd.rl.ac.uk/nxwebplayer isiscompue servers] pulling data from SVN server, so the file added to the svn server on any machine is ready to be used everywhere within an hour. The result of script operations is currently mailed to main instrument machine user (&amp;#039;&amp;#039;mari&amp;#039;&amp;#039;, &amp;#039;&amp;#039;let&amp;#039;&amp;#039;,&amp;#039;&amp;#039;maps&amp;#039;&amp;#039; or &amp;#039;&amp;#039;merlin&amp;#039;&amp;#039;) so you can see results of these scripts work logging in as this user and typing&lt;br /&gt;
 &lt;br /&gt;
 &amp;gt;&amp;gt;mail &lt;br /&gt;
&lt;br /&gt;
command. The logs are regularly reviewed and cleared up manually. On [https://isiscompute.nd.rl.ac.uk/nxwebplayer isiscompue servers] only the last results are logged and placed into:&lt;br /&gt;
&lt;br /&gt;
   /var/log/UpdateSVN.log.&lt;br /&gt;
&lt;br /&gt;
available on &amp;#039;&amp;#039;&amp;#039;ndmlnx01&amp;#039;&amp;#039;&amp;#039; node only.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The GIT command:&lt;br /&gt;
 &lt;br /&gt;
  git pull&lt;br /&gt;
&lt;br /&gt;
can be issued from the instruments folder of a particular machine (always &amp;#039;&amp;#039;&amp;#039;/usr/local/mprogs/InstrumentFiles/&amp;#039;&amp;#039;&amp;#039; but may have additional references on particular machines) to get immediate access to a new data, but on [https://isiscompute.nd.rl.ac.uk/nxwebplayer isiscompue servers] this command needs administrative access.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#0000ff; background:#FF69B4&amp;quot;&amp;gt; In 2001 svn was the most convenient way to provide data synchronization between various computers, but other methods are available now. &lt;br /&gt;
Group needs to discuss if this is still appropriate way of sharing data these days. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Setting_up_Mantid,_Matlab_and_auxiliary_programs_to_process_results_of_inelastic_experiments. Back to setting up Mantid]&lt;br /&gt;
&lt;br /&gt;
== Instrument Specific Files (Instrument Definitions) ==&lt;br /&gt;
&lt;br /&gt;
Instrument definition files, which describe the the instrument configuration and main parameters of the reduction are part of [http://docs.mantidproject.org/nightly/concepts/InstrumentDefinitionFile.html Mantid] and are usually located in &amp;#039;&amp;#039;/opt/Mantid/instrument&amp;#039;&amp;#039; folder on Unix or &amp;#039;&amp;#039;MantidInstallationFolder\instrument&amp;#039;&amp;#039;  folder (&amp;#039;&amp;#039;c:\MantidInstall\instrument&amp;#039;&amp;#039; by default) on Windows.&lt;br /&gt;
&lt;br /&gt;
Newer version of these files produced after Mantid release are automatically retrieved by Matnid at startup into &amp;#039;&amp;#039;~/.mantid/instrument&amp;#039;&amp;#039; on Unix or &amp;#039;&amp;#039;c:\Users\USERACCOUNT_FOLDER\AppData\Roaming\mantidproject\mantid\instrument&amp;#039;&amp;#039; folder on Windows. Such files, if present for a particular instrument override files in Mantid installation directory. &lt;br /&gt;
&lt;br /&gt;
  INSTRUMENT_NAME_Parameters.xml&lt;br /&gt;
&lt;br /&gt;
file provide comprehensive list and description of almost all parameters used by [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_sample_scripts_used_in_data_processing the data reduction script] and the file:&lt;br /&gt;
&lt;br /&gt;
  INSTRUMENT_NAME_Definition.xml&lt;br /&gt;
&lt;br /&gt;
describes all details of the instrument geometry. For further details of the file format and their contents user should look at [http://docs.mantidproject.org/nightly/concepts/InstrumentDefinitionFile.html Mantid IDF description] pages.&lt;br /&gt;
&lt;br /&gt;
Actual default parameters for inelastic data reduction scripts, which are used by Mantid reduction script can also be accessed on the web from Mantid Git repository:&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/mantidproject/mantid/blob/master/instrument/MARI_Parameters.xml MARI Reduction parameters]&lt;br /&gt;
*[https://github.com/mantidproject/mantid/blob/master/instrument/MAPS_Parameters.xml MAPS Reduction parameters]&lt;br /&gt;
*[https://github.com/mantidproject/mantid/blob/master/instrument/MERLIN_Parameters_after2013_4.xml MERLIN Reduction parameters]&lt;br /&gt;
*[https://github.com/mantidproject/mantid/blob/master/instrument/LET_Parameters_dr1to12.xml LET Reduction parameters]&lt;br /&gt;
*[https://github.com/mantidproject/mantid/blob/master/instrument/HET_Parameters.xml HET Reduction parameters]&lt;br /&gt;
&lt;br /&gt;
[http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Setting_up_Mantid,_Matlab_and_auxiliary_programs_to_process_results_of_inelastic_experiments. Back to setting up Mantid]&lt;/div&gt;</summary>
		<author><name>Alex Buts</name></author>
	</entry>
	<entry>
		<id>http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Crystal_alignment_using_Mantid&amp;diff=374</id>
		<title>Crystal alignment using Mantid</title>
		<link rel="alternate" type="text/html" href="http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Crystal_alignment_using_Mantid&amp;diff=374"/>
		<updated>2017-09-15T09:57:33Z</updated>

		<summary type="html">&lt;p&gt;Alex Buts: Created page with &amp;quot;Sample Mantid script used to check crystal alignment on an inelastic instrument is stored in [https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/IS...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sample Mantid script used to check crystal alignment on an inelastic instrument is stored in [https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/ISIS/CrystalAlignment/Check_alignement.py Mantid user script repository].&lt;/div&gt;</summary>
		<author><name>Alex Buts</name></author>
	</entry>
	<entry>
		<id>http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Main_Page&amp;diff=373</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Main_Page&amp;diff=373"/>
		<updated>2017-09-15T09:33:53Z</updated>

		<summary type="html">&lt;p&gt;Alex Buts: /* ISIS Direct Inelastic Data Reduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ISIS Direct Inelastic Data Reduction == &lt;br /&gt;
&lt;br /&gt;
Inelastic data reduction is the process of transforming data obtained in inelastic scattering experiment into the data, describing inelastic cross-sections of the processes under investigation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To process the data recorded by [http://www.isis.stfc.ac.uk/groups/excitations/excitations-4640.html Direct Inelastic Instruments] and obtain the desired cross-sections ISIS scientists use the [http://www.mantidproject.org/Main_Page Mantid-based] reduction program with a range of additional data and set-up parameters, tuning up this program to the particular inelastic instrument and experimental conditions. Users are also provided with access to the [http://isiscompute.nd.rl.ac.uk computing cluster], dedicated to help them in processing raw experimental data into the form, which has physical meaning.&lt;br /&gt;
&lt;br /&gt;
From a user&amp;#039;s point of view, the processing of their results should be simple and straightforward, namely:&lt;br /&gt;
&lt;br /&gt;
# User logs into his or her [http://isiscompute.nd.rl.ac.uk/ isiscompute account] with logon name and password, obtained from the user office. In his home directory he finds a folder with the RB-name of the proposal, approved for the experiment. &lt;br /&gt;
# In this RB folder user can find a python script, necessary to process the results of the experiment, obtained from the instrument. User opens this script in Mantid, changes the run numbers to the numbers obtained in the experiment, can change some reduction parameters familiar to him (the description of the parameters is provided within the script) and run the script to processes the results of the experiment. User should not need to set up Mantid or modify the advanced reduction parameters.&lt;br /&gt;
# The desktop of the users account also contains links to more advanced sample [http://horace.isis.rl.ac.uk/Main_Page Horace] and Mantid scripts for further analysis and visualization of the experimental data. Some advanced Mantid scripts are also described below. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Services, resources and Mantid settings necessary to allow users to process their data ===&lt;br /&gt;
&lt;br /&gt;
This chapter contains the information about the data reduction service, implemented in ISIS. &lt;br /&gt;
User should familiarise himself with the information on [[Setting up Mantid, Matlab and auxiliary programs to process results of inelastic experiments.]]&lt;br /&gt;
if he is going to set up and process results of his experiments on a computers outside ISIS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Autoreduction service ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; &amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt; On 01/08/2017 Autoreduction service has been disabled for inelastic instruments.&amp;lt;/span&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
When Autoreduction service is enabled and set up properly, users data are also processed automatically, namely:&lt;br /&gt;
# Within RB folder a user finds folder named &amp;#039;&amp;#039;&amp;#039;autoreduction&amp;#039;&amp;#039;&amp;#039;. The folder should contain the reduced data processed automatically by [https://users.facilities.rl.ac.uk/auth/?service=http://reduce.isis.cclrc.ac.uk&amp;amp;redirecturl=http://reduce.isis.cclrc.ac.uk/ autoreduction service], which runs on a separate powerful machine and picks up the results of the experiments as they are completed and rapidly reduces them using a script similar to the one the users have in their RB folder.&lt;br /&gt;
#If necessary and convenient, the users should be able to change some parameters and reprocess some or all their runs using the web-interface and [https://users.facilities.rl.ac.uk/auth/?service=http://reduce.isis.cclrc.ac.uk&amp;amp;redirecturl=http://reduce.isis.cclrc.ac.uk/  autoreduction service].&lt;br /&gt;
#The common part of raw data processing (e.g. generation of the &amp;#039;&amp;#039;sqw&amp;#039;&amp;#039; files) can also be delegated to the [https://users.facilities.rl.ac.uk/auth/?service=http://reduce.isis.cclrc.ac.uk&amp;amp;redirecturl=http://reduce.isis.cclrc.ac.uk/  autoreduction service].&lt;br /&gt;
&lt;br /&gt;
The autoreduction service is currently working in test mode, so its availability and reliability are not guaranteed.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[Crystal alignment using Mantid]] ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reduction scripts ===&lt;br /&gt;
&lt;br /&gt;
[[ISIS direct reduction script description. ]] contains short description of the scripts, used to process results of the inelastic experiments in ISIS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Chopper parameters ===&lt;br /&gt;
&lt;br /&gt;
Reference material containing information about choppers, used by ISIS inelastic instruments, necessary for chopper &amp;#039;&amp;#039;&amp;#039;flux&amp;amp;resolution&amp;#039;&amp;#039;&amp;#039; calculations can be found in the [[Chopper Parameters]] chapter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Help with editing this wiki ===&lt;br /&gt;
&lt;br /&gt;
Consult the [//meta.wikimedia.org/wiki/Help:Contents User&amp;#039;s Guide] for information on using the wiki software.&lt;br /&gt;
&lt;br /&gt;
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Configuration settings list]&lt;br /&gt;
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]&lt;br /&gt;
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]&lt;/div&gt;</summary>
		<author><name>Alex Buts</name></author>
	</entry>
	<entry>
		<id>http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Main_Page&amp;diff=372</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Main_Page&amp;diff=372"/>
		<updated>2017-09-15T09:30:51Z</updated>

		<summary type="html">&lt;p&gt;Alex Buts: /* Autoreduction service */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ISIS Direct Inelastic Data Reduction == &lt;br /&gt;
&lt;br /&gt;
Inelastic data reduction is the process of transforming data obtained in inelastic scattering experiment into the data, describing inelastic cross-sections of the processes under investigation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To process the data recorded by [http://www.isis.stfc.ac.uk/groups/excitations/excitations-4640.html Direct Inelastic Instruments] and obtain the desired cross-sections ISIS scientists use the [http://www.mantidproject.org/Main_Page Mantid-based] reduction program with a range of additional data and set-up parameters, tuning up this program to the particular inelastic instrument and experimental conditions. Users are also provided with access to the [http://isiscompute.nd.rl.ac.uk computing cluster], dedicated to help them in processing raw experimental data into the form, which has physical meaning.&lt;br /&gt;
&lt;br /&gt;
From a user&amp;#039;s point of view, the processing of their results should be simple and straightforward, namely:&lt;br /&gt;
&lt;br /&gt;
# User logs into his or her [http://isiscompute.nd.rl.ac.uk/ isiscompute account] with logon name and password, obtained from the user office. In his home directory he finds a folder with the RB-name of the proposal, approved for the experiment. &lt;br /&gt;
# In this RB folder user can find a python script, necessary to process the results of the experiment, obtained from the instrument. User opens this script in Mantid, changes the run numbers to the numbers obtained in the experiment, can change some reduction parameters familiar to him (the description of the parameters is provided within the script) and run the script to processes the results of the experiment. User should not need to set up Mantid or modify the advanced reduction parameters.&lt;br /&gt;
# The desktop of the users account also contains links to more advanced sample [http://horace.isis.rl.ac.uk/Main_Page Horace] and Mantid scripts for further analysis and visualization of the experimental data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Services, resources and Mantid settings necessary to allow users to process their data ===&lt;br /&gt;
&lt;br /&gt;
This chapter contains the information about the data reduction service, implemented in ISIS. &lt;br /&gt;
User should familiarise himself with the information on [[Setting up Mantid, Matlab and auxiliary programs to process results of inelastic experiments.]]&lt;br /&gt;
if he is going to set up and process results of his experiments on a computers outside ISIS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Autoreduction service ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; &amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt; On 01/08/2017 Autoreduction service has been disabled for inelastic instruments.&amp;lt;/span&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
When Autoreduction service is enabled and set up properly, users data are also processed automatically, namely:&lt;br /&gt;
# Within RB folder a user finds folder named &amp;#039;&amp;#039;&amp;#039;autoreduction&amp;#039;&amp;#039;&amp;#039;. The folder should contain the reduced data processed automatically by [https://users.facilities.rl.ac.uk/auth/?service=http://reduce.isis.cclrc.ac.uk&amp;amp;redirecturl=http://reduce.isis.cclrc.ac.uk/ autoreduction service], which runs on a separate powerful machine and picks up the results of the experiments as they are completed and rapidly reduces them using a script similar to the one the users have in their RB folder.&lt;br /&gt;
#If necessary and convenient, the users should be able to change some parameters and reprocess some or all their runs using the web-interface and [https://users.facilities.rl.ac.uk/auth/?service=http://reduce.isis.cclrc.ac.uk&amp;amp;redirecturl=http://reduce.isis.cclrc.ac.uk/  autoreduction service].&lt;br /&gt;
#The common part of raw data processing (e.g. generation of the &amp;#039;&amp;#039;sqw&amp;#039;&amp;#039; files) can also be delegated to the [https://users.facilities.rl.ac.uk/auth/?service=http://reduce.isis.cclrc.ac.uk&amp;amp;redirecturl=http://reduce.isis.cclrc.ac.uk/  autoreduction service].&lt;br /&gt;
&lt;br /&gt;
The autoreduction service is currently working in test mode, so its availability and reliability are not guaranteed.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Reduction scripts ===&lt;br /&gt;
&lt;br /&gt;
[[ISIS direct reduction script description. ]] contains short description of the scripts, used to process results of the inelastic experiments in ISIS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Chopper parameters ===&lt;br /&gt;
&lt;br /&gt;
Reference material containing information about choppers, used by ISIS inelastic instruments, necessary for chopper &amp;#039;&amp;#039;&amp;#039;flux&amp;amp;resolution&amp;#039;&amp;#039;&amp;#039; calculations can be found in the [[Chopper Parameters]] chapter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Help with editing this wiki ===&lt;br /&gt;
&lt;br /&gt;
Consult the [//meta.wikimedia.org/wiki/Help:Contents User&amp;#039;s Guide] for information on using the wiki software.&lt;br /&gt;
&lt;br /&gt;
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Configuration settings list]&lt;br /&gt;
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]&lt;br /&gt;
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]&lt;/div&gt;</summary>
		<author><name>Alex Buts</name></author>
	</entry>
	<entry>
		<id>http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=ISIS_direct_reduction_script_description.&amp;diff=371</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=371"/>
		<updated>2017-09-13T15:10:15Z</updated>

		<summary type="html">&lt;p&gt;Alex Buts: /* 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 cycle specific master 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 MAPS 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_2017_2.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;
| HET: &lt;br /&gt;
| ---&lt;br /&gt;
| [https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/HET/HETReduction.py HETReduction.py]&lt;br /&gt;
| [https://github.com/mantidproject/mantid/blob/master/instrument/HET_Parameters.xml HET_Parameters.xml]&lt;br /&gt;
| Is not autoconfigured&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;template_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] (Row 8, Output 2 of the Table by the link).&lt;br /&gt;
&lt;br /&gt;
Parameters used by every user 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 the &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 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. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Simple reduction script&amp;#039;&amp;#039; imports the &amp;#039;&amp;#039;full reduction script&amp;#039;&amp;#039;. Imported &amp;#039;&amp;#039;full reduction scripts&amp;#039;&amp;#039; picks up all reduction parameters defaults from the appropriate &amp;#039;&amp;#039;xml&amp;#039;&amp;#039; file and sets up parameters, specified in the script overriding default values. Parameters, specified in the &amp;#039;&amp;#039;Simple reduction script&amp;#039;&amp;#039; override all parameters, specified in the &amp;#039;&amp;#039;full reduction script&amp;#039;&amp;#039; and the instrument specific &amp;#039;&amp;#039;xml&amp;#039;&amp;#039; files. On execution, both simple and advanced reduction scripts run the same data reduction process, described below. &lt;br /&gt;
&lt;br /&gt;
User may work directly with the &amp;#039;&amp;#039;full reduction script&amp;#039;&amp;#039; 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 selected number of simple parameters in a separate &amp;#039;&amp;#039;simple script&amp;#039;&amp;#039; or setting up all parameters together in one &amp;#039;&amp;#039;full script&amp;#039;&amp;#039; 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 the &amp;#039;&amp;#039;simple reduction script&amp;#039;&amp;#039; is present, user can find the definition of the &amp;#039;&amp;#039;&amp;#039;iliad&amp;#039;&amp;#039;&amp;#039; function, used by the &amp;#039;&amp;#039;simple reduction script&amp;#039;&amp;#039; inside the &amp;#039;&amp;#039;full reduction script&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
== Reduction Scripts in Depth ==&lt;br /&gt;
&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. To benefit from reading the following, a user should be familiar with OOP jargon and have some knowledge of Python concepts for &amp;#039;&amp;#039;&amp;#039;Properties descriptors&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;Decorators&amp;#039;&amp;#039;&amp;#039;, and usage of &amp;#039;&amp;#039;&amp;#039;__setattr__&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;__getattr__&amp;#039;&amp;#039;&amp;#039; methods.  We also use word &amp;#039;&amp;#039;&amp;#039;Run&amp;#039;&amp;#039;&amp;#039; as synonym for the results of single inelastic experiment (a file or range of files, recorded during experiment and associated with the instrument and a particular experiment number (run number))&lt;br /&gt;
&lt;br /&gt;
=== Reduction script files and their purpose ===&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;
The following files are located in subfolder &amp;#039;&amp;#039;Direct&amp;#039;&amp;#039;:&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;color:blue;&lt;br /&gt;
! File&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/DirectEnergyConversion.py &amp;#039;&amp;#039;DirectEnergyConversion.py&amp;#039;&amp;#039;]&lt;br /&gt;
| 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;,invoked for each run or sum of runs, and converting data, obtained in experiment into reduced data. All other methods of this class are directly or indirectly called by this method. The class also imports [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/diagnostics.py diagnostics.py] file, containing number of functions, responsible for various diagnostics operations over a Mantid workspace. &lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/NonIDF_Properties.py &amp;#039;&amp;#039;NonIDF_Properties.py&amp;#039;&amp;#039;] &lt;br /&gt;
|The file contains the parent class for the [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/PropertyManager.py &amp;#039;&amp;#039;PropertyManager&amp;#039;&amp;#039;] class below. It instantiates and controls properties, not related to the properties found 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;, or &amp;#039;&amp;#039;&amp;#039;sample_run&amp;#039;&amp;#039;&amp;#039;)&lt;br /&gt;
|-&lt;br /&gt;
| [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/PropertyManager.py &amp;#039;&amp;#039;PropertyManager.py&amp;#039;&amp;#039;]&lt;br /&gt;
| When workspace is loaded, Mantid reads appropriate &amp;#039;&amp;#039;&amp;#039;InstrumentName_Parameters.xml&amp;#039;&amp;#039;&amp;#039; file and interprets all records, found in this file as instrument parameters with appropriate names. This python class, together with [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/NonIDF_Properties.py &amp;#039;&amp;#039;NonIDF_Properties&amp;#039;&amp;#039;] class get access to these parameters and transforms them into &amp;#039;&amp;#039;DirectEnergyConversion&amp;#039;&amp;#039; process properties. This class is also responsible for processing user input and all other &amp;#039;&amp;#039;DirectEnergyConversion&amp;#039;&amp;#039; properties, and provides input data and settings for [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/DirectEnergyConversion.py &amp;#039;&amp;#039;DirectEnergyConversion&amp;#039;&amp;#039;]. To do that &amp;#039;&amp;#039;PropertyManager&amp;#039;&amp;#039;, together with [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/NonIDF_Properties.py  NonIDF_Properties] class instantiates classes found in three other files, namely: [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/PropertiesDescriptors.py &amp;#039;&amp;#039;PropertiesDescriptors.py&amp;#039;&amp;#039;],[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/RunDescriptor.py &amp;#039;&amp;#039;RunDescriptor.py&amp;#039;&amp;#039;]  and [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/ReductionHelpers.py &amp;#039;&amp;#039;ReductionHelpers.py&amp;#039;&amp;#039;].&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/PropertiesDescriptors.py &amp;#039;&amp;#039;PropertiesDescriptors.py&amp;#039;&amp;#039;],[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/RunDescriptor.py &amp;#039;&amp;#039;RunDescriptor.py&amp;#039;&amp;#039;]  and [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/ReductionHelpers.py &amp;#039;&amp;#039;ReductionHelpers.py&amp;#039;&amp;#039;] contain small classes and functions helping to process and provide various input parameters to [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/DirectEnergyConversion.py &amp;#039;&amp;#039;DirectEnergyConversion&amp;#039;&amp;#039;], namely :&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;color:blue;&lt;br /&gt;
! File&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/ReductionHelpers.py &amp;#039;&amp;#039;ReductionHelpers.py&amp;#039;&amp;#039;]&lt;br /&gt;
| contains 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; 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;
|-&lt;br /&gt;
|[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/PropertiesDescriptors.py &amp;#039;&amp;#039;PropertiesDescriptors.py&amp;#039;&amp;#039;] &lt;br /&gt;
| contains classes related to properties, described in &amp;#039;&amp;#039;&amp;#039;Instrument_Parameters.xml&amp;#039;&amp;#039;&amp;#039; but providing 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; present in &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 is indeed present.&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/RunDescriptor.py &amp;#039;&amp;#039;RunDescriptor.py&amp;#039;&amp;#039;]&lt;br /&gt;
| contains one but most important property descriptor, related to the reduced and auxiliary experimental data(file). It&amp;#039;s responsible for conversion between run numbers and file names, loading appropriate files to Mantid to use in reduction, renaming workspaces according to different stages of reduction process, etc. Each run related property such as &amp;#039;&amp;#039;&amp;#039;sample_run&amp;#039;&amp;#039;&amp;#039;,&amp;#039;&amp;#039;&amp;#039;wb_run&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;monovan_run&amp;#039;&amp;#039;&amp;#039;, etc is described by a variable-instance of this class located in [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/NonIDF_Properties.py &amp;#039;&amp;#039;NonIDF_Properties&amp;#039;&amp;#039;] class.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
&amp;#039;&amp;#039;PropertyManager&amp;#039;&amp;#039; and many properties descriptors form files above are implemented as singletons so any property instance can be accessed in reduction as:&lt;br /&gt;
&lt;br /&gt;
   prop = PropertyManager.property_name&lt;br /&gt;
&lt;br /&gt;
When &amp;#039;&amp;#039;PropertyManager&amp;#039;&amp;#039; has been instantiated somewhere in the python workspace (as part of the reduction script, see below) the call like: &lt;br /&gt;
 is_multirep  = PropertyManager.incident_energy.multirep_mode()   Returns true if energy is defined as list of energies and false otherwise (multirep mode)&lt;br /&gt;
or:&lt;br /&gt;
  run_nuber = PropertyManager.sample_run.run_number()    Get run number for defined sample run.&lt;br /&gt;
  ws        = PropertyManager.sample_run.get_workspace()  Get Mantid workspace correspondent to sample run (if one is defined) at current state of reduction&lt;br /&gt;
                                                          The data will be loaded in memory and properly calibrated if this have not happened yet.&lt;br /&gt;
&lt;br /&gt;
Note the difference between getting the whole property above, allowing access to the properties methods, and getting access to property value within &amp;#039;&amp;#039;PropertyManager&amp;#039;&amp;#039; instance (PropertyManager instantiated in DirectEnergyConversion as prop_man):&lt;br /&gt;
  dc = DirectEnergyConversion(&amp;#039;MER&amp;#039;)&lt;br /&gt;
  dc.prop_man.sample_run = 2034  # Accessing the PropertyManager instance &amp;#039;&amp;#039;&amp;#039;prop_men&amp;#039;&amp;#039;&amp;#039; defined within DirectEnergyConversion class&lt;br /&gt;
  print &amp;quot;Sample run number is: &amp;quot;,dc.prop_man.sample_run&lt;br /&gt;
prints:&lt;br /&gt;
 Sample run number is:2034&lt;br /&gt;
while calling &lt;br /&gt;
  ws        = PropertyManager.sample_run.get_workspace()&lt;br /&gt;
after assigning number to the sample run will try to load Merlin workspace and will return it if Merlin run file for experiment with run number 2034 can be found on the Mantid search path.&lt;br /&gt;
&lt;br /&gt;
Simplest reduction script can be build on the basis of &amp;#039;&amp;#039;DirectEnergyConversion&amp;#039;&amp;#039; class as follows:&lt;br /&gt;
 Usage:&lt;br /&gt;
    red = DirectEnergyConversion(&amp;#039;InstrumentName&amp;#039;)&lt;br /&gt;
    red.prop_man.sample_run = run number&lt;br /&gt;
    red.prop_man.wb_run     = Whitebeam&lt;br /&gt;
    red.prop_man.incident_energy = energy guess&lt;br /&gt;
    red.prop_man.energy_bins = [min_val,step,max_val]&lt;br /&gt;
    red.convert_to_energy()&lt;br /&gt;
&lt;br /&gt;
Or in functional form:&lt;br /&gt;
    red = DirectEnergyConversion(&amp;#039;InstrumentName&amp;#039;)&lt;br /&gt;
      and then:&lt;br /&gt;
    red.convert_to_energy(wb_run,sample_run,ei_guess,rebin)&lt;br /&gt;
      or&lt;br /&gt;
    red.convert_to_energy(wb_run,sample_run,ei_guess,rebin,**arguments)&lt;br /&gt;
      or&lt;br /&gt;
    red.convert_to_energy(wb_run,sample_run,ei_guess,rebin,mapfile,**arguments)&lt;br /&gt;
In more details various ways of calling the convert_to_energy method are described within [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/DirectEnergyConversion.py &amp;#039;&amp;#039;DirectEnergyConversion&amp;#039;&amp;#039;] class itself.&lt;br /&gt;
&lt;br /&gt;
=== Reduction wrapper ===&lt;br /&gt;
&lt;br /&gt;
User usually reduces range of data files. In additional to that, if autoreduction is deployed, the parameters of the reduction script should be loaded to and be modifiable from the [https://users.facilities.rl.ac.uk/auth/?service=http://reduce.isis.cclrc.ac.uk&amp;amp;redirecturl=http://reduce.isis.cclrc.ac.uk/ web interface]. &lt;br /&gt;
&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/ReductionWrapper.py ReductionWrapper.py] &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
class provides procedures to run reduction over list of run numbers, to wait until the files intended for reduction are actually recorded and the decorators, switching between the web interface if the reduction is run by the autoreduction and provided by a user if the reduction is run in the user&amp;#039;s Mantid session.&lt;br /&gt;
&lt;br /&gt;
User&amp;#039;s reduction files described in the section above contain the &amp;#039;&amp;#039;&amp;#039;ReductionWrapper&amp;#039;&amp;#039;&amp;#039; class overloaded and modified according to the features of the particular instrument, and the &amp;#039;&amp;#039;__main__&amp;#039;&amp;#039; section, which instantiates appropriate class and executes &amp;#039;&amp;#039;run_reduction()&amp;#039;&amp;#039; method of this &amp;#039;&amp;#039;ReductionWrapper&amp;#039;&amp;#039; instance if the reduction script is run from the user&amp;#039;s session. The web service runs its own instance of the instrument specific &amp;#039;&amp;#039;&amp;#039;ReductionWrapper&amp;#039;&amp;#039;&amp;#039; class, providing this instance with the information to pick up the parameters from the [https://users.facilities.rl.ac.uk/auth/?service=http://reduce.isis.cclrc.ac.uk&amp;amp;redirecturl=http://reduce.isis.cclrc.ac.uk/ autoreduction web interface].&lt;/div&gt;</summary>
		<author><name>Alex Buts</name></author>
	</entry>
	<entry>
		<id>http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Reduction_scripts&amp;diff=370</id>
		<title>Reduction scripts</title>
		<link rel="alternate" type="text/html" href="http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Reduction_scripts&amp;diff=370"/>
		<updated>2017-09-13T14:52:50Z</updated>

		<summary type="html">&lt;p&gt;Alex Buts: /* Reduction scripts used to process the experimental results */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Reduction scripts used to process the experimental results == &lt;br /&gt;
&lt;br /&gt;
ISIS reduction scripts contain number of interconnected scripts which are the part of Mantid and can be located in &amp;#039;&amp;#039;Mantid Installation Folder/scripts/Inelastic/Direct/&amp;#039;&amp;#039; or see [https://github.com/mantidproject/mantid/tree/master/scripts/Inelastic/Direct Mantid distribution on the web]. These scripts set up and run various [http://docs.mantidproject.org/nightly/algorithms/index.html Mantid algorithms] to process input data according to the instrument related settings defined in [https://github.com/mantidproject/mantid/tree/master/instrument Instrument parameters files] and  the settings, specific to a particular experiment. The later settings have to be done by instrument scientist and user locally in special scripts, allowing user to make these settings and run Mantid to reduce their data. An instrument specific examples of such scripts are part of Mantid continuous integration system and can be accessed on the web: (see, e.g. [https://github.com/mantidproject/mantid/blob/master/Testing/SystemTests/tests/analysis/ISIS_MariReduction.py MARI], [https://github.com/mantidproject/mantid/blob/master/Testing/SystemTests/tests/analysis/ISIS_MAPS_DGSReduction.py MAPS], [https://github.com/mantidproject/mantid/blob/master/Testing/SystemTests/tests/analysis/ISIS_MERLINReduction.py MERLIN] and [https://github.com/mantidproject/mantid/blob/master/Testing/SystemTests/tests/analysis/ISIS_LETReduction.py LET] or [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/ISIS_direct_reduction_script_description. their separate description] within this wiki)&lt;br /&gt;
&lt;br /&gt;
Instrument scientists modify these scripts according to the requests of a particular experiment and Mantid provides special way to share these scripts through &amp;#039;&amp;#039;&amp;#039;Mantid script repository&amp;#039;&amp;#039;&amp;#039; configured at&lt;br /&gt;
&lt;br /&gt;
  File-&amp;gt;Script Repository &lt;br /&gt;
&lt;br /&gt;
field of Mantid GUI (see field pointed at as 1 on the picture below):&lt;br /&gt;
&lt;br /&gt;
[[File:InstallScriptRepositorye.png|800px]]&lt;br /&gt;
&lt;br /&gt;
The repository, installed locally according to the wizard invoked from this menu allows to download scripts located in the repository and share &lt;br /&gt;
the changes made to these files with other users of this repository.  In addition to data exchange, ScriptRepository wizard configures Python path, to make repository&amp;#039;s scripts runnable from Mantid. When Mantid starts, it updates its  local copy of the &amp;#039;&amp;#039;&amp;#039;Mantid script repository&amp;#039;&amp;#039;&amp;#039; from the web. The progress of this operations reported to the Mantid log window (shown as the background of the fig above)&lt;br /&gt;
Default parameters of these scripts are part of Mantid and are described [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_instrument_parameters,_necessary_to_reduce_data#Instrument_Definition_Files in Instrument Definition Files] section of this Wiki.&lt;br /&gt;
&lt;br /&gt;
Physically the &amp;#039;&amp;#039;&amp;#039;Mantid script repository&amp;#039;&amp;#039;&amp;#039; is located on [https://github.com/mantidproject/scriptrepository GitHub] and is normal Git repository, which is accessed through simplified Mantid GUI interface, but can also be operated by a person who has github account and is familiar with Git by accessing [https://github.com/mantidproject/scriptrepository GitScriptRepository] link and performing normal git operations. &lt;br /&gt;
&lt;br /&gt;
[https://isiscompute.nd.rl.ac.uk/nxwebplayer Isiscompue servers] have Git repository cloned at &lt;br /&gt;
&lt;br /&gt;
  /opt/UserScripts/&lt;br /&gt;
&lt;br /&gt;
folder, where the folder: &lt;br /&gt;
&lt;br /&gt;
  /opt/UserScripts/direct_inelastic/&amp;#039;&amp;#039;&amp;#039;[InstrumentName]&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
contains scripts, used by excitation group. [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Automatic_user_configuration Automatic user configuration scripts] configure Mantid in user accounts to be able to run the scripts from this repository.  In addition to that, configuration script processes special [https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/MARI/USER_Files_description.xml USER_Files_description.xml] file, if one is found in particular instrument folder and copy all files, specified in this file to the RB folders, corresponding to the instrument. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To have write access to the repository through Mantid (and see what is actually there using Mantid GUI) users have to install &amp;#039;&amp;#039;&amp;#039;Mantid script repository&amp;#039;&amp;#039;&amp;#039; through Mantid (or Git) into their accounts. &lt;br /&gt;
&lt;br /&gt;
[https://github.com/FITLinuxSupport/analysisscripts/blob/master/UpdateSVN Small configuration script] runs on isiscompute every hour, and together with updating [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_instrument_parameters,_necessary_to_reduce_data Instrument Parameters repository], updates git repository, so all files changed or added by instrument scientists become available on isiscompute within an hour.  This script operations are logged to:&lt;br /&gt;
&lt;br /&gt;
 /var/log/UpdateSVN.log.&lt;br /&gt;
&lt;br /&gt;
which is available on &amp;#039;&amp;#039;&amp;#039;ndmlnx01&amp;#039;&amp;#039;&amp;#039; node only. Root can update the repository on request. See [[Automatic user configuration]] pages for detailed description of things, done to provide users with up-to-date data and parameters. &lt;br /&gt;
&lt;br /&gt;
As &amp;#039;&amp;#039;&amp;#039;Mantid script repository&amp;#039;&amp;#039;&amp;#039; is a git repository, it has to obey the constrains imposed by GitHub. One of this constrains is the limitation on the size of the files allowed to be stored on GitHub. This does not allow to use Git repository for storing [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_instrument_parameters,_necessary_to_reduce_data Instrument files], necessary for data analysis, so local svn repository, described in [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_instrument_parameters,_necessary_to_reduce_data another chapter], has to be used instead. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#0000ff; background:#FF69B4&amp;quot;&amp;gt;  [http://www.isis.stfc.ac.uk/instruments/mari/mari4765.html MARI] instrument scientists who use small instrument parameter files, were able to use &amp;#039;&amp;#039;&amp;#039;Mantid script repository&amp;#039;&amp;#039;&amp;#039; for instrument files, but even this does not work very well. Any other instrument just can not push sufficient size files to Git.&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#0000ff; background:#FF69B4&amp;quot;&amp;gt; &lt;br /&gt;
At the fall of 2015 GitHub introduced [https://git-lfs.github.com/ Large file storage] so instrument files can be now stored in GitHub, though Mantid should be modified to use such possibility  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Setting_up_Mantid,_Matlab_and_auxiliary_programs_to_process_results_of_inelastic_experiments. Back to setting up Mantid]&lt;/div&gt;</summary>
		<author><name>Alex Buts</name></author>
	</entry>
	<entry>
		<id>http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=ISIS_direct_reduction_script_description.&amp;diff=369</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=369"/>
		<updated>2017-08-16T17:47:03Z</updated>

		<summary type="html">&lt;p&gt;Alex Buts: /* Reduction script files and their purpose */&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 cycle specific master 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 MAPS 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;
| HET: &lt;br /&gt;
| ---&lt;br /&gt;
| [https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/HET/HETReduction.py HETReduction.py]&lt;br /&gt;
| [https://github.com/mantidproject/mantid/blob/master/instrument/HET_Parameters.xml HET_Parameters.xml]&lt;br /&gt;
| Is not autoconfigured&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;template_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] (Row 8, Output 2 of the Table by the link).&lt;br /&gt;
&lt;br /&gt;
Parameters used by every user 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 the &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 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. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Simple reduction script&amp;#039;&amp;#039; imports the &amp;#039;&amp;#039;full reduction script&amp;#039;&amp;#039;. Imported &amp;#039;&amp;#039;full reduction scripts&amp;#039;&amp;#039; picks up all reduction parameters defaults from the appropriate &amp;#039;&amp;#039;xml&amp;#039;&amp;#039; file and sets up parameters, specified in the script overriding default values. Parameters, specified in the &amp;#039;&amp;#039;Simple reduction script&amp;#039;&amp;#039; override all parameters, specified in the &amp;#039;&amp;#039;full reduction script&amp;#039;&amp;#039; and the instrument specific &amp;#039;&amp;#039;xml&amp;#039;&amp;#039; files. On execution, both simple and advanced reduction scripts run the same data reduction process, described below. &lt;br /&gt;
&lt;br /&gt;
User may work directly with the &amp;#039;&amp;#039;full reduction script&amp;#039;&amp;#039; 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 selected number of simple parameters in a separate &amp;#039;&amp;#039;simple script&amp;#039;&amp;#039; or setting up all parameters together in one &amp;#039;&amp;#039;full script&amp;#039;&amp;#039; 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 the &amp;#039;&amp;#039;simple reduction script&amp;#039;&amp;#039; is present, user can find the definition of the &amp;#039;&amp;#039;&amp;#039;iliad&amp;#039;&amp;#039;&amp;#039; function, used by the &amp;#039;&amp;#039;simple reduction script&amp;#039;&amp;#039; inside the &amp;#039;&amp;#039;full reduction script&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
== Reduction Scripts in Depth ==&lt;br /&gt;
&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. To benefit from reading the following, a user should be familiar with OOP jargon and have some knowledge of Python concepts for &amp;#039;&amp;#039;&amp;#039;Properties descriptors&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;Decorators&amp;#039;&amp;#039;&amp;#039;, and usage of &amp;#039;&amp;#039;&amp;#039;__setattr__&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;__getattr__&amp;#039;&amp;#039;&amp;#039; methods.  We also use word &amp;#039;&amp;#039;&amp;#039;Run&amp;#039;&amp;#039;&amp;#039; as synonym for the results of single inelastic experiment (a file or range of files, recorded during experiment and associated with the instrument and a particular experiment number (run number))&lt;br /&gt;
&lt;br /&gt;
=== Reduction script files and their purpose ===&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;
The following files are located in subfolder &amp;#039;&amp;#039;Direct&amp;#039;&amp;#039;:&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;color:blue;&lt;br /&gt;
! File&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/DirectEnergyConversion.py &amp;#039;&amp;#039;DirectEnergyConversion.py&amp;#039;&amp;#039;]&lt;br /&gt;
| 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;,invoked for each run or sum of runs, and converting data, obtained in experiment into reduced data. All other methods of this class are directly or indirectly called by this method. The class also imports [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/diagnostics.py diagnostics.py] file, containing number of functions, responsible for various diagnostics operations over a Mantid workspace. &lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/NonIDF_Properties.py &amp;#039;&amp;#039;NonIDF_Properties.py&amp;#039;&amp;#039;] &lt;br /&gt;
|The file contains the parent class for the [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/PropertyManager.py &amp;#039;&amp;#039;PropertyManager&amp;#039;&amp;#039;] class below. It instantiates and controls properties, not related to the properties found 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;, or &amp;#039;&amp;#039;&amp;#039;sample_run&amp;#039;&amp;#039;&amp;#039;)&lt;br /&gt;
|-&lt;br /&gt;
| [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/PropertyManager.py &amp;#039;&amp;#039;PropertyManager.py&amp;#039;&amp;#039;]&lt;br /&gt;
| When workspace is loaded, Mantid reads appropriate &amp;#039;&amp;#039;&amp;#039;InstrumentName_Parameters.xml&amp;#039;&amp;#039;&amp;#039; file and interprets all records, found in this file as instrument parameters with appropriate names. This python class, together with [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/NonIDF_Properties.py &amp;#039;&amp;#039;NonIDF_Properties&amp;#039;&amp;#039;] class get access to these parameters and transforms them into &amp;#039;&amp;#039;DirectEnergyConversion&amp;#039;&amp;#039; process properties. This class is also responsible for processing user input and all other &amp;#039;&amp;#039;DirectEnergyConversion&amp;#039;&amp;#039; properties, and provides input data and settings for [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/DirectEnergyConversion.py &amp;#039;&amp;#039;DirectEnergyConversion&amp;#039;&amp;#039;]. To do that &amp;#039;&amp;#039;PropertyManager&amp;#039;&amp;#039;, together with [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/NonIDF_Properties.py  NonIDF_Properties] class instantiates classes found in three other files, namely: [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/PropertiesDescriptors.py &amp;#039;&amp;#039;PropertiesDescriptors.py&amp;#039;&amp;#039;],[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/RunDescriptor.py &amp;#039;&amp;#039;RunDescriptor.py&amp;#039;&amp;#039;]  and [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/ReductionHelpers.py &amp;#039;&amp;#039;ReductionHelpers.py&amp;#039;&amp;#039;].&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/PropertiesDescriptors.py &amp;#039;&amp;#039;PropertiesDescriptors.py&amp;#039;&amp;#039;],[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/RunDescriptor.py &amp;#039;&amp;#039;RunDescriptor.py&amp;#039;&amp;#039;]  and [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/ReductionHelpers.py &amp;#039;&amp;#039;ReductionHelpers.py&amp;#039;&amp;#039;] contain small classes and functions helping to process and provide various input parameters to [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/DirectEnergyConversion.py &amp;#039;&amp;#039;DirectEnergyConversion&amp;#039;&amp;#039;], namely :&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;color:blue;&lt;br /&gt;
! File&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/ReductionHelpers.py &amp;#039;&amp;#039;ReductionHelpers.py&amp;#039;&amp;#039;]&lt;br /&gt;
| contains 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; 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;
|-&lt;br /&gt;
|[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/PropertiesDescriptors.py &amp;#039;&amp;#039;PropertiesDescriptors.py&amp;#039;&amp;#039;] &lt;br /&gt;
| contains classes related to properties, described in &amp;#039;&amp;#039;&amp;#039;Instrument_Parameters.xml&amp;#039;&amp;#039;&amp;#039; but providing 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; present in &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 is indeed present.&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/RunDescriptor.py &amp;#039;&amp;#039;RunDescriptor.py&amp;#039;&amp;#039;]&lt;br /&gt;
| contains one but most important property descriptor, related to the reduced and auxiliary experimental data(file). It&amp;#039;s responsible for conversion between run numbers and file names, loading appropriate files to Mantid to use in reduction, renaming workspaces according to different stages of reduction process, etc. Each run related property such as &amp;#039;&amp;#039;&amp;#039;sample_run&amp;#039;&amp;#039;&amp;#039;,&amp;#039;&amp;#039;&amp;#039;wb_run&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;monovan_run&amp;#039;&amp;#039;&amp;#039;, etc is described by a variable-instance of this class located in [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/NonIDF_Properties.py &amp;#039;&amp;#039;NonIDF_Properties&amp;#039;&amp;#039;] class.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
&amp;#039;&amp;#039;PropertyManager&amp;#039;&amp;#039; and many properties descriptors form files above are implemented as singletons so any property instance can be accessed in reduction as:&lt;br /&gt;
&lt;br /&gt;
   prop = PropertyManager.property_name&lt;br /&gt;
&lt;br /&gt;
When &amp;#039;&amp;#039;PropertyManager&amp;#039;&amp;#039; has been instantiated somewhere in the python workspace (as part of the reduction script, see below) the call like: &lt;br /&gt;
 is_multirep  = PropertyManager.incident_energy.multirep_mode()   Returns true if energy is defined as list of energies and false otherwise (multirep mode)&lt;br /&gt;
or:&lt;br /&gt;
  run_nuber = PropertyManager.sample_run.run_number()    Get run number for defined sample run.&lt;br /&gt;
  ws        = PropertyManager.sample_run.get_workspace()  Get Mantid workspace correspondent to sample run (if one is defined) at current state of reduction&lt;br /&gt;
                                                          The data will be loaded in memory and properly calibrated if this have not happened yet.&lt;br /&gt;
&lt;br /&gt;
Note the difference between getting the whole property above, allowing access to the properties methods, and getting access to property value within &amp;#039;&amp;#039;PropertyManager&amp;#039;&amp;#039; instance (PropertyManager instantiated in DirectEnergyConversion as prop_man):&lt;br /&gt;
  dc = DirectEnergyConversion(&amp;#039;MER&amp;#039;)&lt;br /&gt;
  dc.prop_man.sample_run = 2034  # Accessing the PropertyManager instance &amp;#039;&amp;#039;&amp;#039;prop_men&amp;#039;&amp;#039;&amp;#039; defined within DirectEnergyConversion class&lt;br /&gt;
  print &amp;quot;Sample run number is: &amp;quot;,dc.prop_man.sample_run&lt;br /&gt;
prints:&lt;br /&gt;
 Sample run number is:2034&lt;br /&gt;
while calling &lt;br /&gt;
  ws        = PropertyManager.sample_run.get_workspace()&lt;br /&gt;
after assigning number to the sample run will try to load Merlin workspace and will return it if Merlin run file for experiment with run number 2034 can be found on the Mantid search path.&lt;br /&gt;
&lt;br /&gt;
Simplest reduction script can be build on the basis of &amp;#039;&amp;#039;DirectEnergyConversion&amp;#039;&amp;#039; class as follows:&lt;br /&gt;
 Usage:&lt;br /&gt;
    red = DirectEnergyConversion(&amp;#039;InstrumentName&amp;#039;)&lt;br /&gt;
    red.prop_man.sample_run = run number&lt;br /&gt;
    red.prop_man.wb_run     = Whitebeam&lt;br /&gt;
    red.prop_man.incident_energy = energy guess&lt;br /&gt;
    red.prop_man.energy_bins = [min_val,step,max_val]&lt;br /&gt;
    red.convert_to_energy()&lt;br /&gt;
&lt;br /&gt;
Or in functional form:&lt;br /&gt;
    red = DirectEnergyConversion(&amp;#039;InstrumentName&amp;#039;)&lt;br /&gt;
      and then:&lt;br /&gt;
    red.convert_to_energy(wb_run,sample_run,ei_guess,rebin)&lt;br /&gt;
      or&lt;br /&gt;
    red.convert_to_energy(wb_run,sample_run,ei_guess,rebin,**arguments)&lt;br /&gt;
      or&lt;br /&gt;
    red.convert_to_energy(wb_run,sample_run,ei_guess,rebin,mapfile,**arguments)&lt;br /&gt;
In more details various ways of calling the convert_to_energy method are described within [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/DirectEnergyConversion.py &amp;#039;&amp;#039;DirectEnergyConversion&amp;#039;&amp;#039;] class itself.&lt;br /&gt;
&lt;br /&gt;
=== Reduction wrapper ===&lt;br /&gt;
&lt;br /&gt;
User usually reduces range of data files. In additional to that, if autoreduction is deployed, the parameters of the reduction script should be loaded to and be modifiable from the [https://users.facilities.rl.ac.uk/auth/?service=http://reduce.isis.cclrc.ac.uk&amp;amp;redirecturl=http://reduce.isis.cclrc.ac.uk/ web interface]. &lt;br /&gt;
&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/ReductionWrapper.py ReductionWrapper.py] &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
class provides procedures to run reduction over list of run numbers, to wait until the files intended for reduction are actually recorded and the decorators, switching between the web interface if the reduction is run by the autoreduction and provided by a user if the reduction is run in the user&amp;#039;s Mantid session.&lt;br /&gt;
&lt;br /&gt;
User&amp;#039;s reduction files described in the section above contain the &amp;#039;&amp;#039;&amp;#039;ReductionWrapper&amp;#039;&amp;#039;&amp;#039; class overloaded and modified according to the features of the particular instrument, and the &amp;#039;&amp;#039;__main__&amp;#039;&amp;#039; section, which instantiates appropriate class and executes &amp;#039;&amp;#039;run_reduction()&amp;#039;&amp;#039; method of this &amp;#039;&amp;#039;ReductionWrapper&amp;#039;&amp;#039; instance if the reduction script is run from the user&amp;#039;s session. The web service runs its own instance of the instrument specific &amp;#039;&amp;#039;&amp;#039;ReductionWrapper&amp;#039;&amp;#039;&amp;#039; class, providing this instance with the information to pick up the parameters from the [https://users.facilities.rl.ac.uk/auth/?service=http://reduce.isis.cclrc.ac.uk&amp;amp;redirecturl=http://reduce.isis.cclrc.ac.uk/ autoreduction web interface].&lt;/div&gt;</summary>
		<author><name>Alex Buts</name></author>
	</entry>
	<entry>
		<id>http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=ISIS_direct_reduction_script_description.&amp;diff=368</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=368"/>
		<updated>2017-08-16T17:38:07Z</updated>

		<summary type="html">&lt;p&gt;Alex Buts: /* Reduction script files and their purpose */&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 cycle specific master 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 MAPS 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;
| HET: &lt;br /&gt;
| ---&lt;br /&gt;
| [https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/HET/HETReduction.py HETReduction.py]&lt;br /&gt;
| [https://github.com/mantidproject/mantid/blob/master/instrument/HET_Parameters.xml HET_Parameters.xml]&lt;br /&gt;
| Is not autoconfigured&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;template_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] (Row 8, Output 2 of the Table by the link).&lt;br /&gt;
&lt;br /&gt;
Parameters used by every user 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 the &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 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. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Simple reduction script&amp;#039;&amp;#039; imports the &amp;#039;&amp;#039;full reduction script&amp;#039;&amp;#039;. Imported &amp;#039;&amp;#039;full reduction scripts&amp;#039;&amp;#039; picks up all reduction parameters defaults from the appropriate &amp;#039;&amp;#039;xml&amp;#039;&amp;#039; file and sets up parameters, specified in the script overriding default values. Parameters, specified in the &amp;#039;&amp;#039;Simple reduction script&amp;#039;&amp;#039; override all parameters, specified in the &amp;#039;&amp;#039;full reduction script&amp;#039;&amp;#039; and the instrument specific &amp;#039;&amp;#039;xml&amp;#039;&amp;#039; files. On execution, both simple and advanced reduction scripts run the same data reduction process, described below. &lt;br /&gt;
&lt;br /&gt;
User may work directly with the &amp;#039;&amp;#039;full reduction script&amp;#039;&amp;#039; 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 selected number of simple parameters in a separate &amp;#039;&amp;#039;simple script&amp;#039;&amp;#039; or setting up all parameters together in one &amp;#039;&amp;#039;full script&amp;#039;&amp;#039; 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 the &amp;#039;&amp;#039;simple reduction script&amp;#039;&amp;#039; is present, user can find the definition of the &amp;#039;&amp;#039;&amp;#039;iliad&amp;#039;&amp;#039;&amp;#039; function, used by the &amp;#039;&amp;#039;simple reduction script&amp;#039;&amp;#039; inside the &amp;#039;&amp;#039;full reduction script&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
== Reduction Scripts in Depth ==&lt;br /&gt;
&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. To benefit from reading the following, a user should be familiar with OOP jargon and have some knowledge of Python concepts for &amp;#039;&amp;#039;&amp;#039;Properties descriptors&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;Decorators&amp;#039;&amp;#039;&amp;#039;, and usage of &amp;#039;&amp;#039;&amp;#039;__setattr__&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;__getattr__&amp;#039;&amp;#039;&amp;#039; methods.  We also use word &amp;#039;&amp;#039;&amp;#039;Run&amp;#039;&amp;#039;&amp;#039; as synonym for the results of single inelastic experiment (a file or range of files, recorded during experiment and associated with the instrument and a particular experiment number (run number))&lt;br /&gt;
&lt;br /&gt;
=== Reduction script files and their purpose ===&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;
The following files are located in subfolder &amp;#039;&amp;#039;Direct&amp;#039;&amp;#039;:&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;color:blue;&lt;br /&gt;
! File&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/DirectEnergyConversion.py &amp;#039;&amp;#039;DirectEnergyConversion.py&amp;#039;&amp;#039;]&lt;br /&gt;
| 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;,invoked for each run or sum of runs, and converting data, obtained in experiment into reduced data. All other methods of this class are directly or indirectly called by this method. The class also imports [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/diagnostics.py diagnostics.py] file, containing number of functions, responsible for various diagnostics operations over a Mantid workspace. &lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/NonIDF_Properties.py &amp;#039;&amp;#039;NonIDF_Properties.py&amp;#039;&amp;#039;] &lt;br /&gt;
|The file contains the parent class for the [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/PropertyManager.py &amp;#039;&amp;#039;PropertyManager&amp;#039;&amp;#039;] class below. It instantiates and controls properties, not related to the properties found 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;, or &amp;#039;&amp;#039;&amp;#039;sample_run&amp;#039;&amp;#039;&amp;#039;)&lt;br /&gt;
|-&lt;br /&gt;
| [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/PropertyManager.py &amp;#039;&amp;#039;PropertyManager.py&amp;#039;&amp;#039;]&lt;br /&gt;
| When workspace is loaded, Mantid reads appropriate &amp;#039;&amp;#039;&amp;#039;InstrumentName_Parameters.xml&amp;#039;&amp;#039;&amp;#039; file and interprets all records, found in this file as instrument parameters with appropriate names. This python class, together with [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/NonIDF_Properties.py &amp;#039;&amp;#039;NonIDF_Properties&amp;#039;&amp;#039;] class get access to these parameters and transforms them into &amp;#039;&amp;#039;DirectEnergyConversion&amp;#039;&amp;#039; process properties. This class is also responsible for processing user input and all other &amp;#039;&amp;#039;DirectEnergyConversion&amp;#039;&amp;#039; properties, and provides input data and settings for [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/DirectEnergyConversion.py &amp;#039;&amp;#039;DirectEnergyConversion&amp;#039;&amp;#039;]. To do that &amp;#039;&amp;#039;PropertyManager&amp;#039;&amp;#039;, together with [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/NonIDF_Properties.py  NonIDF_Properties] class instantiates classes found in three other files, namely: [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/PropertiesDescriptors.py &amp;#039;&amp;#039;PropertiesDescriptors.py&amp;#039;&amp;#039;],[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/RunDescriptor.py &amp;#039;&amp;#039;RunDescriptor.py&amp;#039;&amp;#039;]  and [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/ReductionHelpers.py &amp;#039;&amp;#039;ReductionHelpers.py&amp;#039;&amp;#039;].&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/PropertiesDescriptors.py &amp;#039;&amp;#039;PropertiesDescriptors.py&amp;#039;&amp;#039;],[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/RunDescriptor.py &amp;#039;&amp;#039;RunDescriptor.py&amp;#039;&amp;#039;]  and [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/ReductionHelpers.py &amp;#039;&amp;#039;ReductionHelpers.py&amp;#039;&amp;#039;] contain small classes and functions helping to process and provide various input parameters to [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/DirectEnergyConversion.py &amp;#039;&amp;#039;DirectEnergyConversion&amp;#039;&amp;#039;], namely :&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;color:blue;&lt;br /&gt;
! File&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/ReductionHelpers.py &amp;#039;&amp;#039;ReductionHelpers.py&amp;#039;&amp;#039;]&lt;br /&gt;
| contains 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; 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;
|-&lt;br /&gt;
|[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/PropertiesDescriptors.py &amp;#039;&amp;#039;PropertiesDescriptors.py&amp;#039;&amp;#039;] &lt;br /&gt;
| contains classes related to properties, described in &amp;#039;&amp;#039;&amp;#039;Instrument_Parameters.xml&amp;#039;&amp;#039;&amp;#039; but providing 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; present in &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 is indeed present.&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/RunDescriptor.py &amp;#039;&amp;#039;RunDescriptor.py&amp;#039;&amp;#039;]&lt;br /&gt;
| contains one but most important property descriptor, related to the reduced and auxiliary experimental data(file). It&amp;#039;s responsible for conversion between run numbers and file names, loading appropriate files to Mantid to use in reduction, renaming workspaces according to different stages of reduction process, etc. Each run related property such as &amp;#039;&amp;#039;&amp;#039;sample_run&amp;#039;&amp;#039;&amp;#039;,&amp;#039;&amp;#039;&amp;#039;wb_run&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;monovan_run&amp;#039;&amp;#039;&amp;#039;, etc is described by a variable-instance of this class located in [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/NonIDF_Properties.py &amp;#039;&amp;#039;NonIDF_Properties&amp;#039;&amp;#039;] class.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
&amp;#039;&amp;#039;PropertyManager&amp;#039;&amp;#039; and many properties descriptors form files above are implemented as singletons so any property instance can be accessed in reduction as:&lt;br /&gt;
&lt;br /&gt;
   prop = PropertyManager.property_name&lt;br /&gt;
&lt;br /&gt;
after &amp;#039;&amp;#039;PropertyManager&amp;#039;&amp;#039; has been instantiated somewhere in the python workspace (as part of the reduction script, see below) e.g.: &lt;br /&gt;
 is_multirep  = PropertyManager.incident_energy.multirep_mode()   Return true if energy is defined as list of energies and false otherwise (multirep mode)&lt;br /&gt;
or:&lt;br /&gt;
  run_nuber = PropertyManager.sample_run.run_number()    Get run number for defined sample run.&lt;br /&gt;
  ws        = PropertyManager.sample_run.get_workspace()  Get Mantid workspace correspondent to sample run (if one is defined) at current state of reduction&lt;br /&gt;
                                                          The data will be loaded in memory and properly calibrated if this have not happened yet.&lt;br /&gt;
&lt;br /&gt;
Note the difference between getting the whole property above, allowing access to the properties methods, and getting access to property value within &amp;#039;&amp;#039;PropertyManager&amp;#039;&amp;#039; instance (PropertyManager instantiated in DirectEnergyConversion as prop_man):&lt;br /&gt;
  dc = DirectEnergyConversion(&amp;#039;MER&amp;#039;)&lt;br /&gt;
  dc.prop_man.sample_run = 2034  # Accessing the PropertyManager instance &amp;#039;&amp;#039;&amp;#039;prop_men&amp;#039;&amp;#039;&amp;#039; defined within DirectEnergyConversion class&lt;br /&gt;
  print &amp;quot;Sample run number is: &amp;quot;,dc.prop_man.sample_run&lt;br /&gt;
prints:&lt;br /&gt;
 Sample run number is:2034&lt;br /&gt;
while calling &lt;br /&gt;
  ws        = PropertyManager.sample_run.get_workspace()&lt;br /&gt;
after assigning number to the sample run will try to load Merlin workspace and will return it if Merlin run file for experiment with run number 2034 can be found on the Mantid search path.&lt;br /&gt;
&lt;br /&gt;
Simplest reduction script can be build on the basis of &amp;#039;&amp;#039;DirectEnergyConversion&amp;#039;&amp;#039; class as follows:&lt;br /&gt;
 Usage:&lt;br /&gt;
    red = DirectEnergyConversion(&amp;#039;InstrumentName&amp;#039;)&lt;br /&gt;
    red.prop_man.sample_run = run number&lt;br /&gt;
    red.prop_man.wb_run     = Whitebeam&lt;br /&gt;
    red.prop_man.incident_energy = energy guess&lt;br /&gt;
    red.prop_man.energy_bins = [min_val,step,max_val]&lt;br /&gt;
    red.convert_to_energy()&lt;br /&gt;
&lt;br /&gt;
Or in functional form:&lt;br /&gt;
    red = DirectEnergyConversion(&amp;#039;InstrumentName&amp;#039;)&lt;br /&gt;
      and then:&lt;br /&gt;
    red.convert_to_energy(wb_run,sample_run,ei_guess,rebin)&lt;br /&gt;
      or&lt;br /&gt;
    red.convert_to_energy(wb_run,sample_run,ei_guess,rebin,**arguments)&lt;br /&gt;
      or&lt;br /&gt;
    red.convert_to_energy(wb_run,sample_run,ei_guess,rebin,mapfile,**arguments)&lt;br /&gt;
In more details various ways of calling the convert_to_energy method are described within [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/DirectEnergyConversion.py &amp;#039;&amp;#039;DirectEnergyConversion&amp;#039;&amp;#039;] class itself.&lt;br /&gt;
&lt;br /&gt;
=== Reduction wrapper ===&lt;br /&gt;
&lt;br /&gt;
User usually reduces range of data files. In additional to that, if autoreduction is deployed, the parameters of the reduction script should be loaded to and be modifiable from the [https://users.facilities.rl.ac.uk/auth/?service=http://reduce.isis.cclrc.ac.uk&amp;amp;redirecturl=http://reduce.isis.cclrc.ac.uk/ web interface]. &lt;br /&gt;
&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/ReductionWrapper.py ReductionWrapper.py] &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
class provides procedures to run reduction over list of run numbers, to wait until the files intended for reduction are actually recorded and the decorators, switching between the web interface if the reduction is run by the autoreduction and provided by a user if the reduction is run in the user&amp;#039;s Mantid session.&lt;br /&gt;
&lt;br /&gt;
User&amp;#039;s reduction files described in the section above contain the &amp;#039;&amp;#039;&amp;#039;ReductionWrapper&amp;#039;&amp;#039;&amp;#039; class overloaded and modified according to the features of the particular instrument, and the &amp;#039;&amp;#039;__main__&amp;#039;&amp;#039; section, which instantiates appropriate class and executes &amp;#039;&amp;#039;run_reduction()&amp;#039;&amp;#039; method of this &amp;#039;&amp;#039;ReductionWrapper&amp;#039;&amp;#039; instance if the reduction script is run from the user&amp;#039;s session. The web service runs its own instance of the instrument specific &amp;#039;&amp;#039;&amp;#039;ReductionWrapper&amp;#039;&amp;#039;&amp;#039; class, providing this instance with the information to pick up the parameters from the [https://users.facilities.rl.ac.uk/auth/?service=http://reduce.isis.cclrc.ac.uk&amp;amp;redirecturl=http://reduce.isis.cclrc.ac.uk/ autoreduction web interface].&lt;/div&gt;</summary>
		<author><name>Alex Buts</name></author>
	</entry>
	<entry>
		<id>http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=ISIS_direct_reduction_script_description.&amp;diff=367</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=367"/>
		<updated>2017-08-16T17:36:24Z</updated>

		<summary type="html">&lt;p&gt;Alex Buts: /* Reduction script files and their purpose */&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 cycle specific master 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 MAPS 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;
| HET: &lt;br /&gt;
| ---&lt;br /&gt;
| [https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/HET/HETReduction.py HETReduction.py]&lt;br /&gt;
| [https://github.com/mantidproject/mantid/blob/master/instrument/HET_Parameters.xml HET_Parameters.xml]&lt;br /&gt;
| Is not autoconfigured&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;template_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] (Row 8, Output 2 of the Table by the link).&lt;br /&gt;
&lt;br /&gt;
Parameters used by every user 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 the &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 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. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Simple reduction script&amp;#039;&amp;#039; imports the &amp;#039;&amp;#039;full reduction script&amp;#039;&amp;#039;. Imported &amp;#039;&amp;#039;full reduction scripts&amp;#039;&amp;#039; picks up all reduction parameters defaults from the appropriate &amp;#039;&amp;#039;xml&amp;#039;&amp;#039; file and sets up parameters, specified in the script overriding default values. Parameters, specified in the &amp;#039;&amp;#039;Simple reduction script&amp;#039;&amp;#039; override all parameters, specified in the &amp;#039;&amp;#039;full reduction script&amp;#039;&amp;#039; and the instrument specific &amp;#039;&amp;#039;xml&amp;#039;&amp;#039; files. On execution, both simple and advanced reduction scripts run the same data reduction process, described below. &lt;br /&gt;
&lt;br /&gt;
User may work directly with the &amp;#039;&amp;#039;full reduction script&amp;#039;&amp;#039; 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 selected number of simple parameters in a separate &amp;#039;&amp;#039;simple script&amp;#039;&amp;#039; or setting up all parameters together in one &amp;#039;&amp;#039;full script&amp;#039;&amp;#039; 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 the &amp;#039;&amp;#039;simple reduction script&amp;#039;&amp;#039; is present, user can find the definition of the &amp;#039;&amp;#039;&amp;#039;iliad&amp;#039;&amp;#039;&amp;#039; function, used by the &amp;#039;&amp;#039;simple reduction script&amp;#039;&amp;#039; inside the &amp;#039;&amp;#039;full reduction script&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
== Reduction Scripts in Depth ==&lt;br /&gt;
&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. To benefit from reading the following, a user should be familiar with OOP jargon and have some knowledge of Python concepts for &amp;#039;&amp;#039;&amp;#039;Properties descriptors&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;Decorators&amp;#039;&amp;#039;&amp;#039;, and usage of &amp;#039;&amp;#039;&amp;#039;__setattr__&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;__getattr__&amp;#039;&amp;#039;&amp;#039; methods.  We also use word &amp;#039;&amp;#039;&amp;#039;Run&amp;#039;&amp;#039;&amp;#039; as synonym for the results of single inelastic experiment (a file or range of files, recorded during experiment and associated with the instrument and a particular experiment number (run number))&lt;br /&gt;
&lt;br /&gt;
=== Reduction script files and their purpose ===&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;
The following files are located in subfolder &amp;#039;&amp;#039;Direct&amp;#039;&amp;#039;:&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;color:blue;&lt;br /&gt;
! File&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/DirectEnergyConversion.py &amp;#039;&amp;#039;DirectEnergyConversion.py&amp;#039;&amp;#039;]&lt;br /&gt;
| 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;,invoked for each run or sum of runs, and converting data, obtained in experiment into reduced data. All other methods of this class are directly or indirectly called by this method. The class also imports [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/diagnostics.py diagnostics.py] file, containing number of functions, responsible for various diagnostics operations over a Mantid workspace. &lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/NonIDF_Properties.py &amp;#039;&amp;#039;NonIDF_Properties.py&amp;#039;&amp;#039;] &lt;br /&gt;
|The file contains the parent class for the [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/PropertyManager.py &amp;#039;&amp;#039;PropertyManager&amp;#039;&amp;#039;] class below. It instantiates and controls properties, not related to the properties found 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;, or &amp;#039;&amp;#039;&amp;#039;sample_run&amp;#039;&amp;#039;&amp;#039;)&lt;br /&gt;
|-&lt;br /&gt;
| [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/PropertyManager.py &amp;#039;&amp;#039;PropertyManager.py&amp;#039;&amp;#039;]&lt;br /&gt;
| When workspace is loaded, Mantid reads appropriate &amp;#039;&amp;#039;&amp;#039;InstrumentName_Parameters.xml&amp;#039;&amp;#039;&amp;#039; file and interprets all records, found in this file as instrument parameters with appropriate names. This python class, together with [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/NonIDF_Properties.py &amp;#039;&amp;#039;NonIDF_Properties&amp;#039;&amp;#039;] class get access to these parameters and transforms them into &amp;#039;&amp;#039;DirectEnergyConversion&amp;#039;&amp;#039; process properties. This class is also responsible for processing user input and all other &amp;#039;&amp;#039;DirectEnergyConversion&amp;#039;&amp;#039; properties, and provides input data and settings for [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/DirectEnergyConversion.py &amp;#039;&amp;#039;DirectEnergyConversion&amp;#039;&amp;#039;]. To do that &amp;#039;&amp;#039;PropertyManager&amp;#039;&amp;#039;, together with [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/NonIDF_Properties.py  NonIDF_Properties] class instantiates classes found in three other files, namely: [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/PropertiesDescriptors.py &amp;#039;&amp;#039;PropertiesDescriptors.py&amp;#039;&amp;#039;],[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/RunDescriptor.py &amp;#039;&amp;#039;RunDescriptor.py&amp;#039;&amp;#039;]  and [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/ReductionHelpers.py &amp;#039;&amp;#039;ReductionHelpers.py&amp;#039;&amp;#039;].&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/PropertiesDescriptors.py &amp;#039;&amp;#039;PropertiesDescriptors.py&amp;#039;&amp;#039;],[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/RunDescriptor.py &amp;#039;&amp;#039;RunDescriptor.py&amp;#039;&amp;#039;]  and [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/ReductionHelpers.py &amp;#039;&amp;#039;ReductionHelpers.py&amp;#039;&amp;#039;] contain small classes and functions helping to process and provide various input parameters to [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/DirectEnergyConversion.py &amp;#039;&amp;#039;DirectEnergyConversion&amp;#039;&amp;#039;], namely :&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;color:blue;&lt;br /&gt;
! File&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/ReductionHelpers.py &amp;#039;&amp;#039;ReductionHelpers.py&amp;#039;&amp;#039;]&lt;br /&gt;
| contains 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; 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;
|-&lt;br /&gt;
|[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/PropertiesDescriptors.py &amp;#039;&amp;#039;PropertiesDescriptors.py&amp;#039;&amp;#039;] &lt;br /&gt;
| contains classes related to properties, described in &amp;#039;&amp;#039;&amp;#039;Instrument_Parameters.xml&amp;#039;&amp;#039;&amp;#039; but providing 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; present in &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 is indeed present.&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/RunDescriptor.py &amp;#039;&amp;#039;RunDescriptor.py&amp;#039;&amp;#039;]&lt;br /&gt;
| contains one but most important property descriptor, related to the reduced and auxiliary experimental data(file). It&amp;#039;s responsible for conversion between run numbers and file names, loading appropriate files to Mantid to use in reduction, renaming workspaces according to different stages of reduction process, etc. Each run related property such as &amp;#039;&amp;#039;&amp;#039;sample_run&amp;#039;&amp;#039;&amp;#039;,&amp;#039;&amp;#039;&amp;#039;wb_run&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;monovan_run&amp;#039;&amp;#039;&amp;#039;, etc is described by a variable-instance of this class located in [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/NonIDF_Properties.py &amp;#039;&amp;#039;NonIDF_Properties&amp;#039;&amp;#039;] class.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
&amp;#039;&amp;#039;PropertyManager&amp;#039;&amp;#039; and many properties descriptors form files above are implemented as singletons so any property instance can be accessed in reduction as:&lt;br /&gt;
&lt;br /&gt;
   prop = PropertyManager.property_name&lt;br /&gt;
&lt;br /&gt;
after &amp;#039;&amp;#039;PropertyManager&amp;#039;&amp;#039; has been instantiated somewhere in the python workspace (as part of the reduction script, see below) e.g.: &lt;br /&gt;
 is_multirep  = PropertyManager.incident_energy.multirep_mode()   Return true if energy is defined as list of energies and false otherwise (multirep mode)&lt;br /&gt;
or:&lt;br /&gt;
  run_nuber = PropertyManager.sample_run.run_number()    Get run number for defined sample run.&lt;br /&gt;
  ws        = PropertyManager.sample_run.get_workspace()  Get Mantid workspace correspondent to sample run (if one is defined) at current state of reduction&lt;br /&gt;
                                                          The data will be loaded in memory and properly calibrated if this have not happened yet.&lt;br /&gt;
&lt;br /&gt;
Note the difference between getting the whole property above, allowing access to the properties methods, and getting access to property value within &amp;#039;&amp;#039;PropertyManager&amp;#039;&amp;#039; instance (PropertyManager instantiated in DirectEnergyConversion as prop_man):&lt;br /&gt;
  dc = DirectEnergyConversion(&amp;#039;MER&amp;#039;)&lt;br /&gt;
  dc.prop_man.sample_run = 2034&lt;br /&gt;
  print &amp;quot;Sample run number is: &amp;quot;,dc.prop_man.sample_run&lt;br /&gt;
prints:&lt;br /&gt;
 Sample run number is:2034&lt;br /&gt;
while calling &lt;br /&gt;
  ws        = PropertyManager.sample_run.get_workspace()&lt;br /&gt;
after assigning number to the sample run will try to load Merlin workspace and will return it if Merlin run file for experiment with run number 2034 can be found on the Mantid search path.&lt;br /&gt;
&lt;br /&gt;
Simplest reduction script can be build on the basis of &amp;#039;&amp;#039;DirectEnergyConversion&amp;#039;&amp;#039; class as follows:&lt;br /&gt;
 Usage:&lt;br /&gt;
    red = DirectEnergyConversion(&amp;#039;InstrumentName&amp;#039;)&lt;br /&gt;
    red.prop_man.sample_run = run number&lt;br /&gt;
    red.prop_man.wb_run     = Whitebeam&lt;br /&gt;
    red.prop_man.incident_energy = energy guess&lt;br /&gt;
    red.prop_man.energy_bins = [min_val,step,max_val]&lt;br /&gt;
    red.convert_to_energy()&lt;br /&gt;
&lt;br /&gt;
Or in functional form:&lt;br /&gt;
    red = DirectEnergyConversion(&amp;#039;InstrumentName&amp;#039;)&lt;br /&gt;
      and then:&lt;br /&gt;
    red.convert_to_energy(wb_run,sample_run,ei_guess,rebin)&lt;br /&gt;
      or&lt;br /&gt;
    red.convert_to_energy(wb_run,sample_run,ei_guess,rebin,**arguments)&lt;br /&gt;
      or&lt;br /&gt;
    red.convert_to_energy(wb_run,sample_run,ei_guess,rebin,mapfile,**arguments)&lt;br /&gt;
In more details various ways of calling the convert_to_energy method are described within [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/DirectEnergyConversion.py &amp;#039;&amp;#039;DirectEnergyConversion&amp;#039;&amp;#039;] class itself.&lt;br /&gt;
&lt;br /&gt;
=== Reduction wrapper ===&lt;br /&gt;
&lt;br /&gt;
User usually reduces range of data files. In additional to that, if autoreduction is deployed, the parameters of the reduction script should be loaded to and be modifiable from the [https://users.facilities.rl.ac.uk/auth/?service=http://reduce.isis.cclrc.ac.uk&amp;amp;redirecturl=http://reduce.isis.cclrc.ac.uk/ web interface]. &lt;br /&gt;
&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/ReductionWrapper.py ReductionWrapper.py] &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
class provides procedures to run reduction over list of run numbers, to wait until the files intended for reduction are actually recorded and the decorators, switching between the web interface if the reduction is run by the autoreduction and provided by a user if the reduction is run in the user&amp;#039;s Mantid session.&lt;br /&gt;
&lt;br /&gt;
User&amp;#039;s reduction files described in the section above contain the &amp;#039;&amp;#039;&amp;#039;ReductionWrapper&amp;#039;&amp;#039;&amp;#039; class overloaded and modified according to the features of the particular instrument, and the &amp;#039;&amp;#039;__main__&amp;#039;&amp;#039; section, which instantiates appropriate class and executes &amp;#039;&amp;#039;run_reduction()&amp;#039;&amp;#039; method of this &amp;#039;&amp;#039;ReductionWrapper&amp;#039;&amp;#039; instance if the reduction script is run from the user&amp;#039;s session. The web service runs its own instance of the instrument specific &amp;#039;&amp;#039;&amp;#039;ReductionWrapper&amp;#039;&amp;#039;&amp;#039; class, providing this instance with the information to pick up the parameters from the [https://users.facilities.rl.ac.uk/auth/?service=http://reduce.isis.cclrc.ac.uk&amp;amp;redirecturl=http://reduce.isis.cclrc.ac.uk/ autoreduction web interface].&lt;/div&gt;</summary>
		<author><name>Alex Buts</name></author>
	</entry>
	<entry>
		<id>http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Main_Page&amp;diff=366</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Main_Page&amp;diff=366"/>
		<updated>2017-08-16T13:31:53Z</updated>

		<summary type="html">&lt;p&gt;Alex Buts: /* Autoreduction service */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ISIS Direct Inelastic Data Reduction == &lt;br /&gt;
&lt;br /&gt;
Inelastic data reduction is the process of transforming data obtained in inelastic scattering experiment into the data, describing inelastic cross-sections of the processes under investigation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To process the data recorded by [http://www.isis.stfc.ac.uk/groups/excitations/excitations-4640.html Direct Inelastic Instruments] and obtain the desired cross-sections ISIS scientists use the [http://www.mantidproject.org/Main_Page Mantid-based] reduction program with a range of additional data and set-up parameters, tuning up this program to the particular inelastic instrument and experimental conditions. Users are also provided with access to the [http://isiscompute.nd.rl.ac.uk computing cluster], dedicated to help them in processing raw experimental data into the form, which has physical meaning.&lt;br /&gt;
&lt;br /&gt;
From a user&amp;#039;s point of view, the processing of their results should be simple and straightforward, namely:&lt;br /&gt;
&lt;br /&gt;
# User logs into his or her [http://isiscompute.nd.rl.ac.uk/ isiscompute account] with logon name and password, obtained from the user office. In his home directory he finds a folder with the RB-name of the proposal, approved for the experiment. &lt;br /&gt;
# In this RB folder user can find a python script, necessary to process the results of the experiment, obtained from the instrument. User opens this script in Mantid, changes the run numbers to the numbers obtained in the experiment, can change some reduction parameters familiar to him (the description of the parameters is provided within the script) and run the script to processes the results of the experiment. User should not need to set up Mantid or modify the advanced reduction parameters.&lt;br /&gt;
# The desktop of the users account also contains links to more advanced sample [http://horace.isis.rl.ac.uk/Main_Page Horace] and Mantid scripts for further analysis and visualization of the experimental data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Services, resources and Mantid settings necessary to allow users to process their data ===&lt;br /&gt;
&lt;br /&gt;
This chapter contains the information about the data reduction service, implemented in ISIS. &lt;br /&gt;
User should familiarise himself with the information on [[Setting up Mantid, Matlab and auxiliary programs to process results of inelastic experiments.]]&lt;br /&gt;
if he is going to set up and process results of his experiments on a computers outside ISIS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Autoreduction service ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; &amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt; On 01/08/2017 Autoreduction service has been disabled for inelastic instruments.&amp;lt;/span&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
When Autoreduction service is enabled and set up properly, users data are also processed automatically, namely:&lt;br /&gt;
# Within RB folder a user finds folder named &amp;#039;&amp;#039;&amp;#039;autoreduction&amp;#039;&amp;#039;&amp;#039;. The folder should contain the reduced data processed automatically by [https://users.facilities.rl.ac.uk/auth/?service=http://reduce.isis.cclrc.ac.uk&amp;amp;redirecturl=http://reduce.isis.cclrc.ac.uk/ autoreduction service], which runs on a separate powerful machine and picks up the results of the experiments as they are completed and rapidly reduces them using a script similar to the one the users have in their RB folder.&lt;br /&gt;
#If necessary and convenient, the users should be able to change some parameters and reprocess some or all their runs using the web-interface and [https://users.facilities.rl.ac.uk/auth/?service=http://reduce.isis.cclrc.ac.uk&amp;amp;redirecturl=http://reduce.isis.cclrc.ac.uk/  autoreduction service].&lt;br /&gt;
#The common part of raw data processing (e.g. generation of the &amp;#039;&amp;#039;sqw&amp;#039;&amp;#039; files) can also be delegated to the [https://users.facilities.rl.ac.uk/auth/?service=http://reduce.isis.cclrc.ac.uk&amp;amp;redirecturl=http://reduce.isis.cclrc.ac.uk/  autoreduction service].&lt;br /&gt;
&lt;br /&gt;
The autoreduction service is currently working in test mode, so its availability and reliability are not guaranteed.&lt;br /&gt;
&lt;br /&gt;
=== Reduction scripts ===&lt;br /&gt;
&lt;br /&gt;
[[ISIS direct reduction script description. ]] contains short description of the scripts, used to process results of the inelastic experiments in ISIS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Chopper parameters ===&lt;br /&gt;
&lt;br /&gt;
Reference material containing information about choppers, used by ISIS inelastic instruments, necessary for chopper &amp;#039;&amp;#039;&amp;#039;flux&amp;amp;resolution&amp;#039;&amp;#039;&amp;#039; calculations can be found in the [[Chopper Parameters]] chapter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Help with editing this wiki ===&lt;br /&gt;
&lt;br /&gt;
Consult the [//meta.wikimedia.org/wiki/Help:Contents User&amp;#039;s Guide] for information on using the wiki software.&lt;br /&gt;
&lt;br /&gt;
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Configuration settings list]&lt;br /&gt;
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]&lt;br /&gt;
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]&lt;/div&gt;</summary>
		<author><name>Alex Buts</name></author>
	</entry>
	<entry>
		<id>http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Main_Page&amp;diff=365</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Main_Page&amp;diff=365"/>
		<updated>2017-08-16T13:29:52Z</updated>

		<summary type="html">&lt;p&gt;Alex Buts: /* Autoreduction service */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ISIS Direct Inelastic Data Reduction == &lt;br /&gt;
&lt;br /&gt;
Inelastic data reduction is the process of transforming data obtained in inelastic scattering experiment into the data, describing inelastic cross-sections of the processes under investigation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To process the data recorded by [http://www.isis.stfc.ac.uk/groups/excitations/excitations-4640.html Direct Inelastic Instruments] and obtain the desired cross-sections ISIS scientists use the [http://www.mantidproject.org/Main_Page Mantid-based] reduction program with a range of additional data and set-up parameters, tuning up this program to the particular inelastic instrument and experimental conditions. Users are also provided with access to the [http://isiscompute.nd.rl.ac.uk computing cluster], dedicated to help them in processing raw experimental data into the form, which has physical meaning.&lt;br /&gt;
&lt;br /&gt;
From a user&amp;#039;s point of view, the processing of their results should be simple and straightforward, namely:&lt;br /&gt;
&lt;br /&gt;
# User logs into his or her [http://isiscompute.nd.rl.ac.uk/ isiscompute account] with logon name and password, obtained from the user office. In his home directory he finds a folder with the RB-name of the proposal, approved for the experiment. &lt;br /&gt;
# In this RB folder user can find a python script, necessary to process the results of the experiment, obtained from the instrument. User opens this script in Mantid, changes the run numbers to the numbers obtained in the experiment, can change some reduction parameters familiar to him (the description of the parameters is provided within the script) and run the script to processes the results of the experiment. User should not need to set up Mantid or modify the advanced reduction parameters.&lt;br /&gt;
# The desktop of the users account also contains links to more advanced sample [http://horace.isis.rl.ac.uk/Main_Page Horace] and Mantid scripts for further analysis and visualization of the experimental data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Services, resources and Mantid settings necessary to allow users to process their data ===&lt;br /&gt;
&lt;br /&gt;
This chapter contains the information about the data reduction service, implemented in ISIS. &lt;br /&gt;
User should familiarise himself with the information on [[Setting up Mantid, Matlab and auxiliary programs to process results of inelastic experiments.]]&lt;br /&gt;
if he is going to set up and process results of his experiments on a computers outside ISIS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Autoreduction service ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; On 01/08/2017 Autoreduction service has been disabled for inelastic instruments.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
When Autoreduction service is enabled and set up properly, users data are also processed automatically, namely:&lt;br /&gt;
# Within RB folder a user finds folder named &amp;#039;&amp;#039;&amp;#039;autoreduction&amp;#039;&amp;#039;&amp;#039;. The folder should contain the reduced data processed automatically by [https://users.facilities.rl.ac.uk/auth/?service=http://reduce.isis.cclrc.ac.uk&amp;amp;redirecturl=http://reduce.isis.cclrc.ac.uk/ autoreduction service], which runs on a separate powerful machine and picks up the results of the experiments as they are completed and rapidly reduces them using a script similar to the one the users have in their RB folder.&lt;br /&gt;
#If necessary and convenient, the users should be able to change some parameters and reprocess some or all their runs using the web-interface and [https://users.facilities.rl.ac.uk/auth/?service=http://reduce.isis.cclrc.ac.uk&amp;amp;redirecturl=http://reduce.isis.cclrc.ac.uk/  autoreduction service].&lt;br /&gt;
#The common part of raw data processing (e.g. generation of the &amp;#039;&amp;#039;sqw&amp;#039;&amp;#039; files) can also be delegated to the [https://users.facilities.rl.ac.uk/auth/?service=http://reduce.isis.cclrc.ac.uk&amp;amp;redirecturl=http://reduce.isis.cclrc.ac.uk/  autoreduction service].&lt;br /&gt;
&lt;br /&gt;
The autoreduction service is currently working in test mode, so its availability and reliability are not guaranteed.&lt;br /&gt;
&lt;br /&gt;
=== Reduction scripts ===&lt;br /&gt;
&lt;br /&gt;
[[ISIS direct reduction script description. ]] contains short description of the scripts, used to process results of the inelastic experiments in ISIS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Chopper parameters ===&lt;br /&gt;
&lt;br /&gt;
Reference material containing information about choppers, used by ISIS inelastic instruments, necessary for chopper &amp;#039;&amp;#039;&amp;#039;flux&amp;amp;resolution&amp;#039;&amp;#039;&amp;#039; calculations can be found in the [[Chopper Parameters]] chapter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Help with editing this wiki ===&lt;br /&gt;
&lt;br /&gt;
Consult the [//meta.wikimedia.org/wiki/Help:Contents User&amp;#039;s Guide] for information on using the wiki software.&lt;br /&gt;
&lt;br /&gt;
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Configuration settings list]&lt;br /&gt;
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]&lt;br /&gt;
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]&lt;/div&gt;</summary>
		<author><name>Alex Buts</name></author>
	</entry>
	<entry>
		<id>http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Instrument_parameters_and_Instrument_definitions&amp;diff=364</id>
		<title>Instrument parameters and Instrument definitions</title>
		<link rel="alternate" type="text/html" href="http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Instrument_parameters_and_Instrument_definitions&amp;diff=364"/>
		<updated>2017-08-16T13:26:49Z</updated>

		<summary type="html">&lt;p&gt;Alex Buts: /* Instrument Specific Files (Instrument Definitions) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Experiment specific parameters == &lt;br /&gt;
&lt;br /&gt;
To reduce experimental data described in the previous chapter, user needs access to [http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Location_and_details_of_access_to_instrument_parameters,_necessary_to_reduce_data#Instrument_Definition_Files Instrument Definition Files] (IDF) defining main configuration of the instrument and parameters of the script, [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_sample_scripts_used_in_data_processing which processes the data], and the range of auxiliary files such as &amp;#039;&amp;#039;&amp;#039;detector calibration file&amp;#039;&amp;#039;&amp;#039;, defining actual neutronic positions of detectors in an experiment, &amp;#039;&amp;#039;&amp;#039;map files&amp;#039;&amp;#039;&amp;#039; (extension .map), defining the detector grouping, &amp;#039;&amp;#039;&amp;#039;mask files&amp;#039;&amp;#039;&amp;#039; (extension .msk) defining the lists of detectors which should not be processed and in less extend other files (.par, .phx, .nxs etc.)&lt;br /&gt;
&lt;br /&gt;
On [http://www.isis.stfc.ac.uk/groups/excitations/data-analysis-computers/connecting-to-isiscomputendrlacuk-using-nomachine15120.html isiscompute servers] and instrument cabin computers these files can be accessed at:&lt;br /&gt;
&lt;br /&gt;
  /usr/local/mprogs/InstrumentFiles/[INSTRUMENT_NAME]&lt;br /&gt;
&lt;br /&gt;
folder where the &amp;#039;&amp;#039;&amp;#039;INSTRUMENT_NAME&amp;#039;&amp;#039;&amp;#039; should be replaced by one out of &amp;#039;&amp;#039;&amp;#039;[mari,maps,merlin,let]&amp;#039;&amp;#039;&amp;#039; values list. Some instrument scientists create symbolic links (usually on Desktop) providing quick access to the files relevant for a particular instrument. &lt;br /&gt;
&lt;br /&gt;
[http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Automatic_user_configuration Automatic configuration scripts] running on [https://isiscompute.nd.rl.ac.uk/nxwebplayer isiscompue servers] automatically add appropriate folder, corresponding to the instrument to Mantid data search path (see picture below). This make the data, stored in the folder available to the [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_sample_scripts_used_in_data_processing reduction scripts] and places the link to the instrument files to the Nomachine desktop. &lt;br /&gt;
&lt;br /&gt;
[[File:instrumentFiles.png]]&lt;br /&gt;
&lt;br /&gt;
The path to the requested instrument parameters on the picture above is set to &amp;#039;&amp;#039;&amp;#039;merlin&amp;#039;&amp;#039;&amp;#039; instrument parameter&amp;#039;s folder in the first row of the data search path folders list (blue arrow).&lt;br /&gt;
&lt;br /&gt;
Currently instrument parameter are placed under [https://en.wikipedia.org/wiki/Apache_Subversion SVN source control] with server at:&lt;br /&gt;
&lt;br /&gt;
 [https://svn.isis.rl.ac.uk/InstrumentFiles/trunk https://svn.isis.rl.ac.uk/InstrumentFiles/trunk]&lt;br /&gt;
&lt;br /&gt;
If user wants to run reduction on their own computer, he needs to get these files. Everybody can read data from this server and some instrument scientists have write access to it. Contact [mailto:freddie.akeroyd@stfc.ac.uk Freddie Akeroyd] if you believe you  need write access to the server. &lt;br /&gt;
On a Unix machine, an authorized person can add an instrument file to the source control and send it to the server by placing the file into appropriate instrument folder and issuing the following commands:&lt;br /&gt;
&lt;br /&gt;
  svn add &amp;quot;file_name&amp;quot;&lt;br /&gt;
  svn commit -m&amp;quot; message describing purpose of the file&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[http://tortoisesvn.net/ Tortoise SVN] can be installed on a Windows machine to provide simple and straightforward GUI to control svn operations. &lt;br /&gt;
&lt;br /&gt;
[https://github.com/FITLinuxSupport/analysisscripts/blob/master/UpdateSVN Simple scripts] are running each hour on instrument cabin machines and [https://isiscompute.nd.rl.ac.uk/nxwebplayer isiscompue servers] pulling data from SVN server, so the file added to the svn server on any machine is ready to be used everywhere within an hour. The result of script operations is currently mailed to main instrument machine user (&amp;#039;&amp;#039;mari&amp;#039;&amp;#039;, &amp;#039;&amp;#039;let&amp;#039;&amp;#039;,&amp;#039;&amp;#039;maps&amp;#039;&amp;#039; or &amp;#039;&amp;#039;merlin&amp;#039;&amp;#039;) so you can see results of these scripts work logging in as this user and typing&lt;br /&gt;
 &lt;br /&gt;
 &amp;gt;&amp;gt;mail &lt;br /&gt;
&lt;br /&gt;
command. The logs are regularly reviewed and cleared up manually. On [https://isiscompute.nd.rl.ac.uk/nxwebplayer isiscompue servers] only the last results are logged and placed into:&lt;br /&gt;
&lt;br /&gt;
   /var/log/UpdateSVN.log.&lt;br /&gt;
&lt;br /&gt;
available on &amp;#039;&amp;#039;&amp;#039;ndmlnx01&amp;#039;&amp;#039;&amp;#039; node only.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The SVN command:&lt;br /&gt;
 &lt;br /&gt;
  svn update &lt;br /&gt;
&lt;br /&gt;
can be issued from svn folder of a particular machine (always &amp;#039;&amp;#039;&amp;#039;/usr/local/mprogs/InstrumentFiles/&amp;#039;&amp;#039;&amp;#039; but may have additional references on particular machines) to get immediate access to a new data, but on [https://isiscompute.nd.rl.ac.uk/nxwebplayer isiscompue servers] this command needs administrative access.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#0000ff; background:#FF69B4&amp;quot;&amp;gt; In 2001 svn was the most convenient way to provide data synchronization between various computers, but other methods are available now. &lt;br /&gt;
Group needs to discuss if this is still appropriate way of sharing data these days. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Setting_up_Mantid,_Matlab_and_auxiliary_programs_to_process_results_of_inelastic_experiments. Back to setting up Mantid]&lt;br /&gt;
&lt;br /&gt;
== Instrument Specific Files (Instrument Definitions) ==&lt;br /&gt;
&lt;br /&gt;
Instrument definition files, which describe the the instrument configuration and main parameters of the reduction are part of [http://docs.mantidproject.org/nightly/concepts/InstrumentDefinitionFile.html Mantid] and are usually located in &amp;#039;&amp;#039;/opt/Mantid/instrument&amp;#039;&amp;#039; folder on Unix or &amp;#039;&amp;#039;MantidInstallationFolder\instrument&amp;#039;&amp;#039;  folder (&amp;#039;&amp;#039;c:\MantidInstall\instrument&amp;#039;&amp;#039; by default) on Windows.&lt;br /&gt;
&lt;br /&gt;
Newer version of these files produced after Mantid release are automatically retrieved by Matnid at startup into &amp;#039;&amp;#039;~/.mantid/instrument&amp;#039;&amp;#039; on Unix or &amp;#039;&amp;#039;c:\Users\USERACCOUNT_FOLDER\AppData\Roaming\mantidproject\mantid\instrument&amp;#039;&amp;#039; folder on Windows. Such files, if present for a particular instrument override files in Mantid installation directory. &lt;br /&gt;
&lt;br /&gt;
  INSTRUMENT_NAME_Parameters.xml&lt;br /&gt;
&lt;br /&gt;
file provide comprehensive list and description of almost all parameters used by [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_sample_scripts_used_in_data_processing the data reduction script] and the file:&lt;br /&gt;
&lt;br /&gt;
  INSTRUMENT_NAME_Definition.xml&lt;br /&gt;
&lt;br /&gt;
describes all details of the instrument geometry. For further details of the file format and their contents user should look at [http://docs.mantidproject.org/nightly/concepts/InstrumentDefinitionFile.html Mantid IDF description] pages.&lt;br /&gt;
&lt;br /&gt;
Actual default parameters for inelastic data reduction scripts, which are used by Mantid reduction script can also be accessed on the web from Mantid Git repository:&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/mantidproject/mantid/blob/master/instrument/MARI_Parameters.xml MARI Reduction parameters]&lt;br /&gt;
*[https://github.com/mantidproject/mantid/blob/master/instrument/MAPS_Parameters.xml MAPS Reduction parameters]&lt;br /&gt;
*[https://github.com/mantidproject/mantid/blob/master/instrument/MERLIN_Parameters_after2013_4.xml MERLIN Reduction parameters]&lt;br /&gt;
*[https://github.com/mantidproject/mantid/blob/master/instrument/LET_Parameters_dr1to12.xml LET Reduction parameters]&lt;br /&gt;
*[https://github.com/mantidproject/mantid/blob/master/instrument/HET_Parameters.xml HET Reduction parameters]&lt;br /&gt;
&lt;br /&gt;
[http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Setting_up_Mantid,_Matlab_and_auxiliary_programs_to_process_results_of_inelastic_experiments. Back to setting up Mantid]&lt;/div&gt;</summary>
		<author><name>Alex Buts</name></author>
	</entry>
	<entry>
		<id>http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=ISIS_direct_reduction_script_description.&amp;diff=363</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=363"/>
		<updated>2017-08-16T13:21:46Z</updated>

		<summary type="html">&lt;p&gt;Alex Buts: /* 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 cycle specific master 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 MAPS 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;
| HET: &lt;br /&gt;
| ---&lt;br /&gt;
| [https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/HET/HETReduction.py HETReduction.py]&lt;br /&gt;
| [https://github.com/mantidproject/mantid/blob/master/instrument/HET_Parameters.xml HET_Parameters.xml]&lt;br /&gt;
| Is not autoconfigured&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;template_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] (Row 8, Output 2 of the Table by the link).&lt;br /&gt;
&lt;br /&gt;
Parameters used by every user 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 the &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 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. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Simple reduction script&amp;#039;&amp;#039; imports the &amp;#039;&amp;#039;full reduction script&amp;#039;&amp;#039;. Imported &amp;#039;&amp;#039;full reduction scripts&amp;#039;&amp;#039; picks up all reduction parameters defaults from the appropriate &amp;#039;&amp;#039;xml&amp;#039;&amp;#039; file and sets up parameters, specified in the script overriding default values. Parameters, specified in the &amp;#039;&amp;#039;Simple reduction script&amp;#039;&amp;#039; override all parameters, specified in the &amp;#039;&amp;#039;full reduction script&amp;#039;&amp;#039; and the instrument specific &amp;#039;&amp;#039;xml&amp;#039;&amp;#039; files. On execution, both simple and advanced reduction scripts run the same data reduction process, described below. &lt;br /&gt;
&lt;br /&gt;
User may work directly with the &amp;#039;&amp;#039;full reduction script&amp;#039;&amp;#039; 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 selected number of simple parameters in a separate &amp;#039;&amp;#039;simple script&amp;#039;&amp;#039; or setting up all parameters together in one &amp;#039;&amp;#039;full script&amp;#039;&amp;#039; 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 the &amp;#039;&amp;#039;simple reduction script&amp;#039;&amp;#039; is present, user can find the definition of the &amp;#039;&amp;#039;&amp;#039;iliad&amp;#039;&amp;#039;&amp;#039; function, used by the &amp;#039;&amp;#039;simple reduction script&amp;#039;&amp;#039; inside the &amp;#039;&amp;#039;full reduction script&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
== Reduction Scripts in Depth ==&lt;br /&gt;
&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. To benefit from reading the following, a user should be familiar with OOP jargon and have some knowledge of Python concepts for &amp;#039;&amp;#039;&amp;#039;Properties descriptors&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;Decorators&amp;#039;&amp;#039;&amp;#039;, and usage of &amp;#039;&amp;#039;&amp;#039;__setattr__&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;__getattr__&amp;#039;&amp;#039;&amp;#039; methods.  We also use word &amp;#039;&amp;#039;&amp;#039;Run&amp;#039;&amp;#039;&amp;#039; as synonym for the results of single inelastic experiment (a file or range of files, recorded during experiment and associated with the instrument and a particular experiment number (run number))&lt;br /&gt;
&lt;br /&gt;
=== Reduction script files and their purpose ===&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;
The following files are located in subfolder &amp;#039;&amp;#039;Direct&amp;#039;&amp;#039;:&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;color:blue;&lt;br /&gt;
! File&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/DirectEnergyConversion.py &amp;#039;&amp;#039;DirectEnergyConversion.py&amp;#039;&amp;#039;]&lt;br /&gt;
| 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;,invoked for each run or sum of runs, and converting data, obtained in experiment into reduced data. All other methods of this class are directly or indirectly called by this method. The class also imports [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/diagnostics.py diagnostics.py] file, containing number of functions, responsible for various diagnostics operations over a Mantid workspace. &lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/NonIDF_Properties.py &amp;#039;&amp;#039;NonIDF_Properties.py&amp;#039;&amp;#039;] &lt;br /&gt;
|The file contains the parent class for the [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/PropertyManager.py &amp;#039;&amp;#039;PropertyManager&amp;#039;&amp;#039;] class below. It instantiates and controls properties, not related to the properties found 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;, or &amp;#039;&amp;#039;&amp;#039;sample_run&amp;#039;&amp;#039;&amp;#039;)&lt;br /&gt;
|-&lt;br /&gt;
| [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/PropertyManager.py &amp;#039;&amp;#039;PropertyManager.py&amp;#039;&amp;#039;]&lt;br /&gt;
| When workspace is loaded, Mantid reads appropriate &amp;#039;&amp;#039;&amp;#039;InstrumentName_Parameters.xml&amp;#039;&amp;#039;&amp;#039; file and interprets all records, found in this file as instrument parameters with appropriate names. This python class, together with [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/NonIDF_Properties.py &amp;#039;&amp;#039;NonIDF_Properties&amp;#039;&amp;#039;] class get access to these parameters and transforms them into &amp;#039;&amp;#039;DirectEnergyConversion&amp;#039;&amp;#039; process properties. This class is also responsible for processing user input and all other &amp;#039;&amp;#039;DirectEnergyConversion&amp;#039;&amp;#039; properties, and provides input data and settings for [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/DirectEnergyConversion.py &amp;#039;&amp;#039;DirectEnergyConversion&amp;#039;&amp;#039;]. To do that &amp;#039;&amp;#039;PropertyManager&amp;#039;&amp;#039;, together with [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/NonIDF_Properties.py  NonIDF_Properties] class instantiates classes found in three other files, namely: [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/PropertiesDescriptors.py &amp;#039;&amp;#039;PropertiesDescriptors.py&amp;#039;&amp;#039;],[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/RunDescriptor.py &amp;#039;&amp;#039;RunDescriptor.py&amp;#039;&amp;#039;]  and [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/ReductionHelpers.py &amp;#039;&amp;#039;ReductionHelpers.py&amp;#039;&amp;#039;].&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/PropertiesDescriptors.py &amp;#039;&amp;#039;PropertiesDescriptors.py&amp;#039;&amp;#039;],[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/RunDescriptor.py &amp;#039;&amp;#039;RunDescriptor.py&amp;#039;&amp;#039;]  and [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/ReductionHelpers.py &amp;#039;&amp;#039;ReductionHelpers.py&amp;#039;&amp;#039;] contain small classes and functions helping to process and provide various input parameters to [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/DirectEnergyConversion.py &amp;#039;&amp;#039;DirectEnergyConversion&amp;#039;&amp;#039;], namely :&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;wikitable&amp;quot; style=&amp;quot;color:blue;&lt;br /&gt;
! File&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/ReductionHelpers.py &amp;#039;&amp;#039;ReductionHelpers.py&amp;#039;&amp;#039;]&lt;br /&gt;
| contains 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; 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;
|-&lt;br /&gt;
|[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/PropertiesDescriptors.py &amp;#039;&amp;#039;PropertiesDescriptors.py&amp;#039;&amp;#039;] &lt;br /&gt;
| contains classes related to properties, described in &amp;#039;&amp;#039;&amp;#039;Instrument_Parameters.xml&amp;#039;&amp;#039;&amp;#039; but providing 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; present in &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 is indeed present.&lt;br /&gt;
|-&lt;br /&gt;
|[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/RunDescriptor.py &amp;#039;&amp;#039;RunDescriptor.py&amp;#039;&amp;#039;]&lt;br /&gt;
| contains one but most important property descriptor, related to the reduced and auxiliary experimental data(file). It&amp;#039;s responsible for conversion between run numbers and file names, loading appropriate files to Mantid to use in reduction, renaming workspaces according to different stages of reduction process, etc. Each run related property such as &amp;#039;&amp;#039;&amp;#039;sample_run&amp;#039;&amp;#039;&amp;#039;,&amp;#039;&amp;#039;&amp;#039;wb_run&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;monovan_run&amp;#039;&amp;#039;&amp;#039;, etc is described by a variable-instance of this class located in [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/NonIDF_Properties.py &amp;#039;&amp;#039;NonIDF_Properties&amp;#039;&amp;#039;] class.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
&amp;#039;&amp;#039;PropertyManager&amp;#039;&amp;#039; and many properties descriptors form files above are implemented as singletons so any property instance can be accessed in reduction as:&lt;br /&gt;
&lt;br /&gt;
   prop = PropertyManager.property_name&lt;br /&gt;
&lt;br /&gt;
e.g.: &lt;br /&gt;
 is_multirep  = PropertyManager.incident_energy.multirep_mode()   Return true if energy is defined as list of energies and false otherwise (multirep mode)&lt;br /&gt;
or:&lt;br /&gt;
  run_nuber = PropertyManager.sample_run.run_number()    Get run number for defined sample run.&lt;br /&gt;
  ws        = PropertyManager.sample_run.get_workspace()  Get Mantid workspace correspondent to sample run (if one is defined) at current state of reduction&lt;br /&gt;
                                                          The data will be loaded in memory and properly calibrated if this have not happened yet.&lt;br /&gt;
&lt;br /&gt;
Note the difference between getting the whole property above, allowing access to the properties methods, and getting access to property value within &amp;#039;&amp;#039;PropertyManager&amp;#039;&amp;#039; instance (PropertyManager instantiated in DirectEnergyConversion as prop_man):&lt;br /&gt;
  dc = DirectEnergyConversion(&amp;#039;MER&amp;#039;)&lt;br /&gt;
  dc.prop_man.sample_run = 2034&lt;br /&gt;
  print &amp;quot;Sample run number is: &amp;quot;,dc.prop_man.sample_run&lt;br /&gt;
prints:&lt;br /&gt;
 Sample run number is:2034&lt;br /&gt;
while calling &lt;br /&gt;
  ws        = PropertyManager.sample_run.get_workspace()&lt;br /&gt;
after assigning number to the sample run will try to load Merlin workspace and will return it if Merlin run file for experiment with run number 2034 can be found on the Mantid search path.&lt;br /&gt;
&lt;br /&gt;
Simplest reduction script can be build on the basis of &amp;#039;&amp;#039;DirectEnergyConversion&amp;#039;&amp;#039; class as follows:&lt;br /&gt;
 Usage:&lt;br /&gt;
    red = DirectEnergyConversion(&amp;#039;InstrumentName&amp;#039;)&lt;br /&gt;
    red.prop_man.sample_run = run number&lt;br /&gt;
    red.prop_man.wb_run     = Whitebeam&lt;br /&gt;
    red.prop_man.incident_energy = energy guess&lt;br /&gt;
    red.prop_man.energy_bins = [min_val,step,max_val]&lt;br /&gt;
    red.convert_to_energy()&lt;br /&gt;
&lt;br /&gt;
Or in functional form:&lt;br /&gt;
    red = DirectEnergyConversion(&amp;#039;InstrumentName&amp;#039;)&lt;br /&gt;
      and then:&lt;br /&gt;
    red.convert_to_energy(wb_run,sample_run,ei_guess,rebin)&lt;br /&gt;
      or&lt;br /&gt;
    red.convert_to_energy(wb_run,sample_run,ei_guess,rebin,**arguments)&lt;br /&gt;
      or&lt;br /&gt;
    red.convert_to_energy(wb_run,sample_run,ei_guess,rebin,mapfile,**arguments)&lt;br /&gt;
In more details various ways of calling the convert_to_energy method are described within [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/DirectEnergyConversion.py &amp;#039;&amp;#039;DirectEnergyConversion&amp;#039;&amp;#039;] class itself.&lt;br /&gt;
&lt;br /&gt;
=== Reduction wrapper ===&lt;br /&gt;
&lt;br /&gt;
User usually reduces range of data files. In additional to that, if autoreduction is deployed, the parameters of the reduction script should be loaded to and be modifiable from the [https://users.facilities.rl.ac.uk/auth/?service=http://reduce.isis.cclrc.ac.uk&amp;amp;redirecturl=http://reduce.isis.cclrc.ac.uk/ web interface]. &lt;br /&gt;
&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;[https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/ReductionWrapper.py ReductionWrapper.py] &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
class provides procedures to run reduction over list of run numbers, to wait until the files intended for reduction are actually recorded and the decorators, switching between the web interface if the reduction is run by the autoreduction and provided by a user if the reduction is run in the user&amp;#039;s Mantid session.&lt;br /&gt;
&lt;br /&gt;
User&amp;#039;s reduction files described in the section above contain the &amp;#039;&amp;#039;&amp;#039;ReductionWrapper&amp;#039;&amp;#039;&amp;#039; class overloaded and modified according to the features of the particular instrument, and the &amp;#039;&amp;#039;__main__&amp;#039;&amp;#039; section, which instantiates appropriate class and executes &amp;#039;&amp;#039;run_reduction()&amp;#039;&amp;#039; method of this &amp;#039;&amp;#039;ReductionWrapper&amp;#039;&amp;#039; instance if the reduction script is run from the user&amp;#039;s session. The web service runs its own instance of the instrument specific &amp;#039;&amp;#039;&amp;#039;ReductionWrapper&amp;#039;&amp;#039;&amp;#039; class, providing this instance with the information to pick up the parameters from the [https://users.facilities.rl.ac.uk/auth/?service=http://reduce.isis.cclrc.ac.uk&amp;amp;redirecturl=http://reduce.isis.cclrc.ac.uk/ autoreduction web interface].&lt;/div&gt;</summary>
		<author><name>Alex Buts</name></author>
	</entry>
	<entry>
		<id>http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Reduction_scripts&amp;diff=362</id>
		<title>Reduction scripts</title>
		<link rel="alternate" type="text/html" href="http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Reduction_scripts&amp;diff=362"/>
		<updated>2017-05-02T08:54:29Z</updated>

		<summary type="html">&lt;p&gt;Alex Buts: /* Reduction scripts used to process the experimental results */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Reduction scripts used to process the experimental results == &lt;br /&gt;
&lt;br /&gt;
ISIS reduction scripts contain number of interconnected scripts which are the part of Mantid and can be located in &amp;#039;&amp;#039;Mantid Installation Folder/scripts/Inelastic/Direct/&amp;#039;&amp;#039; or see [https://github.com/mantidproject/mantid/tree/master/scripts/Inelastic/Direct Mantid distribution on the web]. These scripts set up and run various [http://docs.mantidproject.org/nightly/algorithms/index.html Mantid algorithms] to process input data according to the instrument related settings defined in [https://github.com/mantidproject/mantid/tree/master/instrument Instrument parameters files] and  the settings, specific to a particular experiment. The later settings have to be done by instrument scientist and user locally in special scripts, allowing user to make these settings and run Mantid to reduce their data. An instrument specific examples of such scripts are part of Mantid continuous integration system and can be accessed on the web: (see, e.g. [https://github.com/mantidproject/mantid/blob/master/Testing/SystemTests/tests/analysis/ISIS_MariReduction.py MARI], [https://github.com/mantidproject/mantid/blob/master/Testing/SystemTests/tests/analysis/ISIS_MAPS_DGSReduction.py MAPS], [https://github.com/mantidproject/mantid/blob/master/Testing/SystemTests/tests/analysis/ISIS_MERLINReduction.py MERLIN] and [https://github.com/mantidproject/mantid/blob/master/Testing/SystemTests/tests/analysis/ISIS_LETReduction.py LET] or [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/ISIS_direct_reduction_script_description their separate description] within this wiki)&lt;br /&gt;
&lt;br /&gt;
Instrument scientists modify these scripts according to the requests of a particular experiment and Mantid provides special way to share these scripts through &amp;#039;&amp;#039;&amp;#039;Mantid script repository&amp;#039;&amp;#039;&amp;#039; configured at&lt;br /&gt;
&lt;br /&gt;
  File-&amp;gt;Script Repository &lt;br /&gt;
&lt;br /&gt;
field of Mantid GUI (see field pointed at as 1 on the picture below):&lt;br /&gt;
&lt;br /&gt;
[[File:InstallScriptRepositorye.png|800px]]&lt;br /&gt;
&lt;br /&gt;
The repository, installed locally according to the wizard invoked from this menu allows to download scripts located in the repository and share &lt;br /&gt;
the changes made to these files with other users of this repository.  In addition to data exchange, ScriptRepository wizard configures Python path, to make repository&amp;#039;s scripts runnable from Mantid. When Mantid starts, it updates its  local copy of the &amp;#039;&amp;#039;&amp;#039;Mantid script repository&amp;#039;&amp;#039;&amp;#039; from the web. The progress of this operations reported to the Mantid log window (shown as the background of the fig above)&lt;br /&gt;
Default parameters of these scripts are part of Mantid and are described [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_instrument_parameters,_necessary_to_reduce_data#Instrument_Definition_Files in Instrument Definition Files] section of this Wiki.&lt;br /&gt;
&lt;br /&gt;
Physically the &amp;#039;&amp;#039;&amp;#039;Mantid script repository&amp;#039;&amp;#039;&amp;#039; is located on [https://github.com/mantidproject/scriptrepository GitHub] and is normal Git repository, which is accessed through simplified Mantid GUI interface, but can also be operated by a person who has github account and is familiar with Git by accessing [https://github.com/mantidproject/scriptrepository GitScriptRepository] link and performing normal git operations. &lt;br /&gt;
&lt;br /&gt;
[https://isiscompute.nd.rl.ac.uk/nxwebplayer Isiscompue servers] have Git repository cloned at &lt;br /&gt;
&lt;br /&gt;
  /opt/UserScripts/&lt;br /&gt;
&lt;br /&gt;
folder, where the folder: &lt;br /&gt;
&lt;br /&gt;
  /opt/UserScripts/direct_inelastic/&amp;#039;&amp;#039;&amp;#039;[InstrumentName]&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
contains scripts, used by excitation group. [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Automatic_user_configuration Automatic user configuration scripts] configure Mantid in user accounts to be able to run the scripts from this repository.  In addition to that, configuration script processes special [https://github.com/mantidproject/scriptrepository/blob/master/direct_inelastic/MARI/USER_Files_description.xml USER_Files_description.xml] file, if one is found in particular instrument folder and copy all files, specified in this file to the RB folders, corresponding to the instrument. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To have write access to the repository through Mantid (and see what is actually there using Mantid GUI) users have to install &amp;#039;&amp;#039;&amp;#039;Mantid script repository&amp;#039;&amp;#039;&amp;#039; through Mantid (or Git) into their accounts. &lt;br /&gt;
&lt;br /&gt;
[https://github.com/FITLinuxSupport/analysisscripts/blob/master/UpdateSVN Small configuration script] runs on isiscompute every hour, and together with updating [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_instrument_parameters,_necessary_to_reduce_data Instrument Parameters repository], updates git repository, so all files changed or added by instrument scientists become available on isiscompute within an hour.  This script operations are logged to:&lt;br /&gt;
&lt;br /&gt;
 /var/log/UpdateSVN.log.&lt;br /&gt;
&lt;br /&gt;
which is available on &amp;#039;&amp;#039;&amp;#039;ndmlnx01&amp;#039;&amp;#039;&amp;#039; node only. Root can update the repository on request. See [[Automatic user configuration]] pages for detailed description of things, done to provide users with up-to-date data and parameters. &lt;br /&gt;
&lt;br /&gt;
As &amp;#039;&amp;#039;&amp;#039;Mantid script repository&amp;#039;&amp;#039;&amp;#039; is a git repository, it has to obey the constrains imposed by GitHub. One of this constrains is the limitation on the size of the files allowed to be stored on GitHub. This does not allow to use Git repository for storing [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_instrument_parameters,_necessary_to_reduce_data Instrument files], necessary for data analysis, so local svn repository, described in [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Location_and_details_of_access_to_instrument_parameters,_necessary_to_reduce_data another chapter], has to be used instead. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#0000ff; background:#FF69B4&amp;quot;&amp;gt;  [http://www.isis.stfc.ac.uk/instruments/mari/mari4765.html MARI] instrument scientists who use small instrument parameter files, were able to use &amp;#039;&amp;#039;&amp;#039;Mantid script repository&amp;#039;&amp;#039;&amp;#039; for instrument files, but even this does not work very well. Any other instrument just can not push sufficient size files to Git.&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#0000ff; background:#FF69B4&amp;quot;&amp;gt; &lt;br /&gt;
At the fall of 2015 GitHub introduced [https://git-lfs.github.com/ Large file storage] so instrument files can be now stored in GitHub, though Mantid should be modified to use such possibility  &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Setting_up_Mantid,_Matlab_and_auxiliary_programs_to_process_results_of_inelastic_experiments. Back to setting up Mantid]&lt;/div&gt;</summary>
		<author><name>Alex Buts</name></author>
	</entry>
	<entry>
		<id>http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Main_Page&amp;diff=361</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Main_Page&amp;diff=361"/>
		<updated>2017-05-02T08:39:01Z</updated>

		<summary type="html">&lt;p&gt;Alex Buts: /* ISIS Direct Inelastic Data Reduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ISIS Direct Inelastic Data Reduction == &lt;br /&gt;
&lt;br /&gt;
Inelastic data reduction is the process of transforming data obtained in inelastic scattering experiment into the data, describing inelastic cross-sections of the processes under investigation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To process the data recorded by [http://www.isis.stfc.ac.uk/groups/excitations/excitations-4640.html Direct Inelastic Instruments] and obtain the desired cross-sections ISIS scientists use the [http://www.mantidproject.org/Main_Page Mantid-based] reduction program with a range of additional data and set-up parameters, tuning up this program to the particular inelastic instrument and experimental conditions. Users are also provided with access to the [http://isiscompute.nd.rl.ac.uk computing cluster], dedicated to help them in processing raw experimental data into the form, which has physical meaning.&lt;br /&gt;
&lt;br /&gt;
From a user&amp;#039;s point of view, the processing of their results should be simple and straightforward, namely:&lt;br /&gt;
&lt;br /&gt;
# User logs into his or her [http://isiscompute.nd.rl.ac.uk/ isiscompute account] with logon name and password, obtained from the user office. In his home directory he finds a folder with the RB-name of the proposal, approved for the experiment. &lt;br /&gt;
# In this RB folder user can find a python script, necessary to process the results of the experiment, obtained from the instrument. User opens this script in Mantid, changes the run numbers to the numbers obtained in the experiment, can change some reduction parameters familiar to him (the description of the parameters is provided within the script) and run the script to processes the results of the experiment. User should not need to set up Mantid or modify the advanced reduction parameters.&lt;br /&gt;
# The desktop of the users account also contains links to more advanced sample [http://horace.isis.rl.ac.uk/Main_Page Horace] and Mantid scripts for further analysis and visualization of the experimental data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Services, resources and Mantid settings necessary to allow users to process their data ===&lt;br /&gt;
&lt;br /&gt;
This chapter contains the information about the data reduction service, implemented in ISIS. &lt;br /&gt;
User should familiarise himself with the information on [[Setting up Mantid, Matlab and auxiliary programs to process results of inelastic experiments.]]&lt;br /&gt;
if he is going to set up and process results of his experiments on a computers outside ISIS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Autoreduction service ===&lt;br /&gt;
&lt;br /&gt;
When Autoreduction service is enabled and set up properly, users data are also processed automatically, namely:&lt;br /&gt;
# Within RB folder a user finds folder named &amp;#039;&amp;#039;&amp;#039;autoreduction&amp;#039;&amp;#039;&amp;#039;. The folder should contain the reduced data processed automatically by [https://users.facilities.rl.ac.uk/auth/?service=http://reduce.isis.cclrc.ac.uk&amp;amp;redirecturl=http://reduce.isis.cclrc.ac.uk/ autoreduction service], which runs on a separate powerful machine and picks up the results of the experiments as they are completed and rapidly reduces them using a script similar to the one the users have in their RB folder.&lt;br /&gt;
#If necessary and convenient, the users should be able to change some parameters and reprocess some or all their runs using the web-interface and [https://users.facilities.rl.ac.uk/auth/?service=http://reduce.isis.cclrc.ac.uk&amp;amp;redirecturl=http://reduce.isis.cclrc.ac.uk/  autoreduction service].&lt;br /&gt;
#The common part of raw data processing (e.g. generation of the &amp;#039;&amp;#039;sqw&amp;#039;&amp;#039; files) can also be delegated to the [https://users.facilities.rl.ac.uk/auth/?service=http://reduce.isis.cclrc.ac.uk&amp;amp;redirecturl=http://reduce.isis.cclrc.ac.uk/  autoreduction service].&lt;br /&gt;
&lt;br /&gt;
The autoreduction service is currently working in test mode, so its availability and reliability are not guaranteed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reduction scripts ===&lt;br /&gt;
&lt;br /&gt;
[[ISIS direct reduction script description. ]] contains short description of the scripts, used to process results of the inelastic experiments in ISIS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Chopper parameters ===&lt;br /&gt;
&lt;br /&gt;
Reference material containing information about choppers, used by ISIS inelastic instruments, necessary for chopper &amp;#039;&amp;#039;&amp;#039;flux&amp;amp;resolution&amp;#039;&amp;#039;&amp;#039; calculations can be found in the [[Chopper Parameters]] chapter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Help with editing this wiki ===&lt;br /&gt;
&lt;br /&gt;
Consult the [//meta.wikimedia.org/wiki/Help:Contents User&amp;#039;s Guide] for information on using the wiki software.&lt;br /&gt;
&lt;br /&gt;
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Configuration settings list]&lt;br /&gt;
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]&lt;br /&gt;
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]&lt;/div&gt;</summary>
		<author><name>Alex Buts</name></author>
	</entry>
	<entry>
		<id>http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Main_Page&amp;diff=360</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Main_Page&amp;diff=360"/>
		<updated>2017-05-02T08:36:55Z</updated>

		<summary type="html">&lt;p&gt;Alex Buts: /* ISIS Direct Inelastic Data Reduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ISIS Direct Inelastic Data Reduction == &lt;br /&gt;
&lt;br /&gt;
Inelastic data reduction is the process of transforming data obtained in inelastic scattering experiment into the data, describing inelastic cross-sections of the processes under investigation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To process the data recorded by [http://www.isis.stfc.ac.uk/groups/excitations/excitations-4640.html Direct Inelastic Instruments] and obtain the desired cross-sections ISIS scientists use the [http://www.mantidproject.org/Main_Page Mantid-based] reduction program with a range of additional data and set-up parameters, tuning up this program to the particular inelastic instrument and experimental conditions. Users are also provided with access to the [http://isiscompute.nd.rl.ac.uk computing cluster], dedicated to help them in processing raw experimental data into the form, which has physical meaning.&lt;br /&gt;
&lt;br /&gt;
From a user&amp;#039;s point of view, the processing of their results should be simple and straightforward, namely:&lt;br /&gt;
&lt;br /&gt;
# User logs into his or her [http://isiscompute.nd.rl.ac.uk/ isiscompute account] with logon name and password, obtained from the user office. In his home directory he finds a folder with the RB-name of the proposal, approved for the experiment. &lt;br /&gt;
# In this RB folder user can find a python script, necessary to process the results of the experiment, obtained from the instrument. User opens this script in Mantid, changes the run numbers to the numbers obtained in the experiment, can change some reduction parameters familiar to him (the description of the parameters is provided within the script) and run the script to processes the results of the experiment. User should not need to set up Mantid or modify the advanced reduction parameters.&lt;br /&gt;
# The desktop of the users account also contains links to more advanced sample [http://horace.isis.rl.ac.uk/Main_Page Horace] and Mantid scripts for further analysis and visualization of the experimental data.&lt;br /&gt;
&lt;br /&gt;
=== Services, resources and Mantid settings necessary to allow users to process their data ===&lt;br /&gt;
&lt;br /&gt;
This chapter contains the information about the data reduction service, implemented in ISIS. &lt;br /&gt;
User should familiarise himself with the information on [[Setting up Mantid, Matlab and auxiliary programs to process results of inelastic experiments.]]&lt;br /&gt;
if he is going to set up and process results of his experiments on a computers outside ISIS.&lt;br /&gt;
&lt;br /&gt;
=== Autoreduction service ===&lt;br /&gt;
When Autoreduction service is enabled and set up properly, users data are also processed automatically, namely:&lt;br /&gt;
# Within RB folder a user finds folder named &amp;#039;&amp;#039;&amp;#039;autoreduction&amp;#039;&amp;#039;&amp;#039;. The folder should contain the reduced data processed automatically by [https://users.facilities.rl.ac.uk/auth/?service=http://reduce.isis.cclrc.ac.uk&amp;amp;redirecturl=http://reduce.isis.cclrc.ac.uk/ autoreduction service], which runs on a separate powerful machine and picks up the results of the experiments as they are completed and rapidly reduces them using a script similar to the one the users have in their RB folder.&lt;br /&gt;
#If necessary and convenient, the users should be able to change some parameters and reprocess some or all their runs using the web-interface and [https://users.facilities.rl.ac.uk/auth/?service=http://reduce.isis.cclrc.ac.uk&amp;amp;redirecturl=http://reduce.isis.cclrc.ac.uk/  autoreduction service].&lt;br /&gt;
#The common part of raw data processing (e.g. generation of the &amp;#039;&amp;#039;sqw&amp;#039;&amp;#039; files) can also be delegated to the [https://users.facilities.rl.ac.uk/auth/?service=http://reduce.isis.cclrc.ac.uk&amp;amp;redirecturl=http://reduce.isis.cclrc.ac.uk/  autoreduction service].&lt;br /&gt;
&lt;br /&gt;
The autoreduction service is currently working in test mode, so its availability and reliability are not guaranteed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reduction scripts ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[ISIS direct reduction script description. ]] contains short description of the scripts, used to process results of the inelastic experiments in ISIS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Chopper parameters ===&lt;br /&gt;
&lt;br /&gt;
Reference material containing information about choppers, used by ISIS inelastic instruments, necessary for chopper &amp;#039;&amp;#039;&amp;#039;flux&amp;amp;resolution&amp;#039;&amp;#039;&amp;#039; calculations can be found in the [[Chopper Parameters]] chapter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Help with editing this wiki ===&lt;br /&gt;
&lt;br /&gt;
Consult the [//meta.wikimedia.org/wiki/Help:Contents User&amp;#039;s Guide] for information on using the wiki software.&lt;br /&gt;
&lt;br /&gt;
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Configuration settings list]&lt;br /&gt;
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]&lt;br /&gt;
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]&lt;/div&gt;</summary>
		<author><name>Alex Buts</name></author>
	</entry>
	<entry>
		<id>http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Main_Page&amp;diff=359</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Main_Page&amp;diff=359"/>
		<updated>2017-05-02T08:32:08Z</updated>

		<summary type="html">&lt;p&gt;Alex Buts: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ISIS Direct Inelastic Data Reduction == &lt;br /&gt;
&lt;br /&gt;
Inelastic data reduction is the process of transforming data obtained in inelastic scattering experiment into the data, describing inelastic cross-sections of the processes under investigation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To process the data recorded by [http://www.isis.stfc.ac.uk/groups/excitations/excitations-4640.html Direct Inelastic Instruments] and obtain the desired cross-sections ISIS scientists use the [http://www.mantidproject.org/Main_Page Mantid-based] reduction program with a range of additional data and set-up parameters, tuning up this program to the particular inelastic instrument and experimental conditions. Users are also provided with access to the [http://isiscompute.nd.rl.ac.uk computing cluster], dedicated to help them in processing raw experimental data into the form, which has physical meaning.&lt;br /&gt;
&lt;br /&gt;
From a user&amp;#039;s point of view, the processing of their results should be simple and straightforward, namely:&lt;br /&gt;
&lt;br /&gt;
# User logs into his or her [http://isiscompute.nd.rl.ac.uk/ isiscompute account] with logon name and password, obtained from the user office. In his home directory he finds a folder with the RB-name of the proposal, approved for the experiment. &lt;br /&gt;
# In this RB folder user can find a python script, necessary to process the results of the experiment, obtained from the instrument. User opens this script in Mantid, changes the run numbers to the numbers obtained in the experiment, can change some reduction parameters familiar to him (the description of the parameters is provided within the script) and run the script to processes the results of the experiment. User should not need to set up Mantid or modify the advanced reduction parameters.&lt;br /&gt;
# On the desktop of users account there are also links to sample Horace and Mantid scripts to do further analysis of the data.&lt;br /&gt;
&lt;br /&gt;
=== Services, resources and Mantid settings necessary to allow users to process their data ===&lt;br /&gt;
&lt;br /&gt;
This chapter contains the information about the data reduction service, implemented in ISIS. &lt;br /&gt;
User should familiarise himself with the information on [[Setting up Mantid, Matlab and auxiliary programs to process results of inelastic experiments.]]&lt;br /&gt;
if he is going to set up and process results of his experiments on a computers outside ISIS.&lt;br /&gt;
&lt;br /&gt;
=== Autoreduction service ===&lt;br /&gt;
When Autoreduction service is enabled and set up properly, users data are also processed automatically, namely:&lt;br /&gt;
# Within RB folder a user finds folder named &amp;#039;&amp;#039;&amp;#039;autoreduction&amp;#039;&amp;#039;&amp;#039;. The folder should contain the reduced data processed automatically by [https://users.facilities.rl.ac.uk/auth/?service=http://reduce.isis.cclrc.ac.uk&amp;amp;redirecturl=http://reduce.isis.cclrc.ac.uk/ autoreduction service], which runs on a separate powerful machine and picks up the results of the experiments as they are completed and rapidly reduces them using a script similar to the one the users have in their RB folder.&lt;br /&gt;
#If necessary and convenient, the users should be able to change some parameters and reprocess some or all their runs using the web-interface and [https://users.facilities.rl.ac.uk/auth/?service=http://reduce.isis.cclrc.ac.uk&amp;amp;redirecturl=http://reduce.isis.cclrc.ac.uk/  autoreduction service].&lt;br /&gt;
#The common part of raw data processing (e.g. generation of the &amp;#039;&amp;#039;sqw&amp;#039;&amp;#039; files) can also be delegated to the [https://users.facilities.rl.ac.uk/auth/?service=http://reduce.isis.cclrc.ac.uk&amp;amp;redirecturl=http://reduce.isis.cclrc.ac.uk/  autoreduction service].&lt;br /&gt;
&lt;br /&gt;
The autoreduction service is currently working in test mode, so its availability and reliability are not guaranteed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reduction scripts ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[ISIS direct reduction script description. ]] contains short description of the scripts, used to process results of the inelastic experiments in ISIS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Chopper parameters ===&lt;br /&gt;
&lt;br /&gt;
Reference material containing information about choppers, used by ISIS inelastic instruments, necessary for chopper &amp;#039;&amp;#039;&amp;#039;flux&amp;amp;resolution&amp;#039;&amp;#039;&amp;#039; calculations can be found in the [[Chopper Parameters]] chapter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Help with editing this wiki ===&lt;br /&gt;
&lt;br /&gt;
Consult the [//meta.wikimedia.org/wiki/Help:Contents User&amp;#039;s Guide] for information on using the wiki software.&lt;br /&gt;
&lt;br /&gt;
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Configuration settings list]&lt;br /&gt;
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]&lt;br /&gt;
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]&lt;/div&gt;</summary>
		<author><name>Alex Buts</name></author>
	</entry>
	<entry>
		<id>http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Automatic_user_configuration&amp;diff=358</id>
		<title>Automatic user configuration</title>
		<link rel="alternate" type="text/html" href="http://shadow.nd.rl.ac.uk/wiki/idr/index.php?title=Automatic_user_configuration&amp;diff=358"/>
		<updated>2017-03-22T18:15:25Z</updated>

		<summary type="html">&lt;p&gt;Alex Buts: /* Automatic user configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Automatic user configuration ==&lt;br /&gt;
&lt;br /&gt;
When an experiment is approved and scheduled by instrument scientist, [http://www.isis.stfc.ac.uk/user-office/ User office] assigns a user with his/her federal ID, which allows user to access ISIS network including [http://isiscompute.nd.rl.ac.uk/ isiscompute servers] and provides appropriate information to [Catalog service], giving the user rights to access the data through the Catalog. &lt;br /&gt;
&lt;br /&gt;
At some stage, special [http://icatingest2.isis.cclrc.ac.uk/excitations.txt information file], which defines the participants of the experiments and the scientists who have access to the data of this experiment is placed on the [http://icatingest2.isis.cclrc.ac.uk/excitations.txt internal server] where it is accessed and automatically processed by [https://github.com/FITLinuxSupport/analysisscripts/blob/master/Build_Mantid_config.py issicompute configuration script]. The format of the file is .json and the sample contents is provided below.&lt;br /&gt;
&lt;br /&gt;
The automatic isiscompute configuration script runs twice a day on [https://isiscompute.nd.rl.ac.uk/nxwebplayer isiscompue server] processing the information file, creating user accounts and appropriate RB folders and giving users permissions to access their RB folders on the basis of the information file. [mailto:alex.buts@stfc.ac.uk Alex Buts] and [https://www.facilities.rl.ac.uk/itsupport/default.aspx FBU IT support] [mailto:FITServiceDesk@stfc.ac.uk FBU IT support (Jeffs Warren)] have access and can modify this script. At the final stage this script runs [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/ISISDirecInelasticConfig.py the Mantid configuration script for inelastic instruments], which configures each user&amp;#039;s Mantid to use appropriate [[Experimental Data]], [[Instrument parameters and Instrument definitions]], necessary to reduce experimental data. It also provides users with initial version of [[Reduction scripts]], which users should modify to their requests according to the [http://shadow.nd.rl.ac.uk/wiki/idr/index.php/ISIS_direct_reduction_script_description. description], using help of their instrument scientist if necessary. [mailto:alex.buts@stfc.ac.uk Alex Buts] is responsible for maintaining this script.&lt;br /&gt;
&lt;br /&gt;
When initial [[Reduction scripts]] are copied to user&amp;#039;s RB folder from the [https://github.com/mantidproject/scriptrepository/tree/master/direct_inelastic Mantid Script Repository] sample folder, script date is set to the experiment start date and the time -- to the exact midnight of the start date. Configuration script running twice a day checks this date and if it does not changed, replaces the existing script with the script, found in the Mantid Script Repository sample folder. If somebody touched the copied script, its date and time changes and [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/ISISDirecInelasticConfig.py autoconfiguration script] stops replacing the file. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The diagram and the table below summarize the user creation workflow:&lt;br /&gt;
&lt;br /&gt;
[http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Setting_up_Mantid,_Matlab_and_auxiliary_programs_to_process_results_of_inelastic_experiments. Back to setting up Mantid]&lt;br /&gt;
&lt;br /&gt;
=== ISISOMPUTE User creation workflow ===&lt;br /&gt;
&lt;br /&gt;
[[File:UserConfigWorkflow.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
Less visual but more detailed description of the workflow is provided in the table below. The number of the row in the table corresponds to the number of the block in the diagram above.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;color:blue;&lt;br /&gt;
! Stage Num&lt;br /&gt;
! Input&lt;br /&gt;
! Frequency, Actor &amp;amp; Event&lt;br /&gt;
! Result&lt;br /&gt;
! Person responsible&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| --&lt;br /&gt;
| Two weeks before Cycle, Crhis closes archive on the previous cycle. Sets up new cycle&lt;br /&gt;
| Cycle Folders appear in the archive.&lt;br /&gt;
| Chris Moreton-Smith&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| ---&lt;br /&gt;
| Somebody from the team sets up new cycle for cataloguing data.&lt;br /&gt;
| Data are searchable through iCat.&lt;br /&gt;
| Tom Griffin&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Results of the review pannel &lt;br /&gt;
| On request, Instrument Scientists, schedules experiment in Scheduler application&lt;br /&gt;
| Input for scheduler script&lt;br /&gt;
| Instrument Scientist&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| e-mail to PI from 5.1, about experiment accepted&lt;br /&gt;
| Experimental team is added to visits system&lt;br /&gt;
| Input for scheduler scripts&lt;br /&gt;
| PI on accepted proposal&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| Results from 3 &amp;amp; 4&lt;br /&gt;
| Twice a day: &amp;#039;&amp;#039;&amp;#039;Scheduler&amp;#039;&amp;#039;&amp;#039; scripts runs processing inputs.&lt;br /&gt;
|&lt;br /&gt;
# Emails user office to create&amp;amp;renew FedID-s&lt;br /&gt;
# Generates [http://icatingest2.isis.cclrc.ac.uk/excitations.txt information file] containing RB number, Instrument, Cycle, visitors names &amp;amp; FedIDs&lt;br /&gt;
| Contact responsible from [mailto:isisdata@stfc.ac.uk data acquisition support group]&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| Output 5.1 from Scheduler script&lt;br /&gt;
| Create FedID &amp;amp; renew the old one&lt;br /&gt;
| &lt;br /&gt;
# User team as input for 5&lt;br /&gt;
# E-mails to users &lt;br /&gt;
| User&amp;#039;s office&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| Output 5.2 from Scheduler script&lt;br /&gt;
| Twice a day: [https://github.com/FITLinuxSupport/analysisscripts/blob/master/Build_Mantid_config.py issicompute configuration script]&lt;br /&gt;
| &lt;br /&gt;
# Creates RB folders, User folders, access rights, autoreduction configuration. &lt;br /&gt;
# Users got rights to log into isiscompute and access their experiment folders.&lt;br /&gt;
# Starts Mantid Configuration script (8) and provides it with information about FedID&amp;amp;instrument&amp;amp;RB number&lt;br /&gt;
| Jeff Warren &amp;amp; Alex Buts&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| 7.3 and contents of MantidConfig folders&lt;br /&gt;
| [https://github.com/mantidproject/mantid/blob/master/scripts/Inelastic/Direct/ISISDirecInelasticConfig.py Mantid configuration script], started by  [https://github.com/FITLinuxSupport/analysisscripts/blob/master/Build_Mantid_config.py issicompute configuration script]&lt;br /&gt;
|  &lt;br /&gt;
# Mantid configured for first usage, [[Experimental Data]] and [[Instrument parameters and Instrument definitions]] data search path is set up and path to common inelastic script is configured.&lt;br /&gt;
# User scripts copied to users according their instruments and the contents of [https://github.com/mantidproject/scriptrepository/tree/master/direct_inelastic Mantid Users Script repository]&lt;br /&gt;
| Alex Buts&lt;br /&gt;
|-&lt;br /&gt;
| 9.&lt;br /&gt;
| Contents of [https://github.com/mantidproject/scriptrepository/tree/master/direct_inelastic Mantid Users Script repository] on the web. Contents of SVN servers on the web.&lt;br /&gt;
| Once an Hour: [https://github.com/FITLinuxSupport/analysisscripts/blob/master/UpdateSVN Inelastic data update script] pulls contents of the web repositories into files on isiscompute.&lt;br /&gt;
| [[Instrument parameters and Instrument definitions]] files in correspondent isiscompute folders are up-to date&lt;br /&gt;
| Jeff Warren &amp;amp; Alex Buts&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Setting_up_Mantid,_Matlab_and_auxiliary_programs_to_process_results_of_inelastic_experiments. Back to setting up Mantid]&lt;br /&gt;
&lt;br /&gt;
=== Extract from .json file defined users who has access to the data ===&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
 &amp;quot;Last Updated&amp;quot;: 20150413,&lt;br /&gt;
 &amp;quot;experiments&amp;quot;:&lt;br /&gt;
 [&lt;br /&gt;
   {&lt;br /&gt;
    &amp;quot;RbNumber&amp;quot;: &amp;quot;1234567&amp;quot;,&lt;br /&gt;
    &amp;quot;Instrument&amp;quot;: &amp;quot;MERLIN&amp;quot;,&lt;br /&gt;
    &amp;quot;Cycle&amp;quot;: &amp;quot;2013/4&amp;quot;,&lt;br /&gt;
    &amp;quot;StartDate&amp;quot;: &amp;quot;20131203&amp;quot;,&lt;br /&gt;
    &amp;quot;Permissions&amp;quot;: [&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;email&amp;quot;: &amp;quot;YYYY@stfc.ac.uk&amp;quot;,&lt;br /&gt;
        &amp;quot;fedid&amp;quot;: &amp;quot;XXXXX&amp;quot;&lt;br /&gt;
      },&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;email&amp;quot;: &amp;quot;warren.jeffs@stfc.ac.uk&amp;quot;,&lt;br /&gt;
        &amp;quot;fedid&amp;quot;: &amp;quot;gpq43739&amp;quot;&lt;br /&gt;
      },&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;email&amp;quot;: &amp;quot;alex.buts@stfc.ac.uk&amp;quot;,&lt;br /&gt;
        &amp;quot;fedid&amp;quot;: &amp;quot;wkc26243&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    ]&lt;br /&gt;
  },&lt;br /&gt;
  { &amp;quot;NEXT RB NUMBER&amp;quot;&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://shadow.nd.rl.ac.uk/wiki/idr/index.php/Setting_up_Mantid,_Matlab_and_auxiliary_programs_to_process_results_of_inelastic_experiments. Back to setting up Mantid]&lt;/div&gt;</summary>
		<author><name>Alex Buts</name></author>
	</entry>
</feed>