<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://libisis.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Dickon+Champion</id>
	<title>LIBISIS - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://libisis.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Dickon+Champion"/>
	<link rel="alternate" type="text/html" href="http://libisis.org/Special:Contributions/Dickon_Champion"/>
	<updated>2026-04-30T22:05:36Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.13</generator>
	<entry>
		<id>http://libisis.org/index.php?title=User:Dickon_Champion&amp;diff=2850</id>
		<title>User:Dickon Champion</title>
		<link rel="alternate" type="text/html" href="http://libisis.org/index.php?title=User:Dickon_Champion&amp;diff=2850"/>
		<updated>2008-09-09T16:24:13Z</updated>

		<summary type="html">&lt;p&gt;Dickon Champion: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A one time employee at ISIS/RAL (2002 - 2008), developed Fortran data structure and manipulation functions. Developed homer scripting process as well as GUI.&lt;br /&gt;
&lt;br /&gt;
Now a Consultant for Actica consulting.&lt;/div&gt;</summary>
		<author><name>Dickon Champion</name></author>
	</entry>
	<entry>
		<id>http://libisis.org/index.php?title=User:Dickon_Champion&amp;diff=2849</id>
		<title>User:Dickon Champion</title>
		<link rel="alternate" type="text/html" href="http://libisis.org/index.php?title=User:Dickon_Champion&amp;diff=2849"/>
		<updated>2008-09-09T16:19:09Z</updated>

		<summary type="html">&lt;p&gt;Dickon Champion: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Consultant for Actica consulting&lt;/div&gt;</summary>
		<author><name>Dickon Champion</name></author>
	</entry>
	<entry>
		<id>http://libisis.org/index.php?title=Homer_Utilities&amp;diff=2566</id>
		<title>Homer Utilities</title>
		<link rel="alternate" type="text/html" href="http://libisis.org/index.php?title=Homer_Utilities&amp;diff=2566"/>
		<updated>2008-07-14T17:00:52Z</updated>

		<summary type="html">&lt;p&gt;Dickon Champion: /* dae access */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== gget == &lt;br /&gt;
generic raw file access&lt;br /&gt;
&lt;br /&gt;
it is possible at the matlab comand line to extract any variable from the rawfile by making a call to a populated [[IXTraw_file]] object.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; rawfile=IXTraw_file(&amp;#039;/path/to/my/file.raw&amp;#039;)&lt;br /&gt;
&amp;gt;&amp;gt; value=gget(rawfile,&amp;#039;FIELD&amp;#039;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== dae access ==&lt;br /&gt;
&lt;br /&gt;
It is possible to access the data in the DAE by populating an [[IXTraw_file]] with a special string argument. We prefix &amp;lt;tt&amp;gt;DAE:&amp;lt;/tt&amp;gt; to the name of the instrument control computer. Once this has been successfully populated all data access and get functions can be called.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; rawf=IXTraw_file(&amp;#039;DAE:ndxmerlin&amp;#039;)&lt;br /&gt;
&amp;gt;&amp;gt; w1=getspectrum(rawf,1)&lt;br /&gt;
&amp;gt;&amp;gt; title=gget(rawf,&amp;#039;TITL&amp;#039;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This process is not possible with all instruments and requires the newest ICP to be installed. Full homer processes are possible but take a very long time, it is best used to access single spectra.&lt;br /&gt;
&lt;br /&gt;
== head and mhead ==&lt;br /&gt;
&lt;br /&gt;
head() returns the header information for the raw file defined by the run_number, or the path to a defined raw file. Multiple run numbers can be combined together with limited practical use.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt;  head(run_number)&lt;br /&gt;
&amp;gt;&amp;gt;  head(path_to_raw_file)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;run_number&amp;lt;/tt&amp;gt; can be defined in the following ways&lt;br /&gt;
#  a numerical array of numbers &amp;lt;tt&amp;gt; [12345  45673 34436]&amp;lt;/tt&amp;gt; or a single numeric&lt;br /&gt;
# an array of strings &amp;lt;tt&amp;gt;char(&amp;#039;12345&amp;#039; &amp;#039;45673&amp;#039; &amp;#039;34436&amp;#039;)&amp;lt;/tt&amp;gt; or a single  string&lt;br /&gt;
# a cell array of strings &amp;lt;tt&amp;gt;{&amp;#039;12345&amp;#039; &amp;#039;45673&amp;#039; &amp;#039;34436&amp;#039;}&amp;lt;/tt&amp;gt;&lt;br /&gt;
# a cell array of numerics &amp;lt;tt&amp;gt;{12345  45673 34436}&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;path_to_raw_file&amp;lt;/tt&amp;gt; is defined as a string or a cell array of strings of the form &amp;lt;tt&amp;gt;&amp;#039;C:\data\myfile.raw&amp;#039;&amp;lt;/tt&amp;gt;, relative paths are also possible as well as using the [[Global IXTpath objects]] &amp;lt;tt&amp;gt;&amp;#039;inst_data:::myfile.raw&amp;#039;&amp;lt;/tt&amp;gt; provided they have been set properly in the [[Instrument setup]]&lt;br /&gt;
&lt;br /&gt;
mhead() returns the header information for each raw file defined by an &amp;#039;&amp;#039;&amp;#039;array&amp;#039;&amp;#039;&amp;#039; of run numbers, or an &amp;#039;&amp;#039;&amp;#039;array&amp;#039;&amp;#039;&amp;#039; of paths to a raw file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt;  mhead(run_numbers)&lt;br /&gt;
&amp;gt;&amp;gt;  mhead(paths_to_raw_files)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;run_numbers&amp;lt;/tt&amp;gt; can be defined in the following ways&lt;br /&gt;
#  a numerical array of numbers &amp;lt;tt&amp;gt; [12345  45673 34436]&amp;lt;/tt&amp;gt;&lt;br /&gt;
# an array of strings &amp;lt;tt&amp;gt;char(&amp;#039;12345&amp;#039; &amp;#039;45673&amp;#039; &amp;#039;34436&amp;#039;)&amp;lt;/tt&amp;gt; &lt;br /&gt;
# a cell array of strings &amp;lt;tt&amp;gt;{&amp;#039;12345&amp;#039; &amp;#039;45673&amp;#039; &amp;#039;34436&amp;#039;}&amp;lt;/tt&amp;gt;&lt;br /&gt;
# a cell array of numerics &amp;lt;tt&amp;gt;{12345  45673 34436}&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;paths_to_raw_files&amp;lt;/tt&amp;gt; is defined as a cell or string array of the form &amp;lt;tt&amp;gt;&amp;#039;C:\data\myfile.raw&amp;#039;&amp;lt;/tt&amp;gt;,  relative paths are also possible as well as using the [[Global IXTpath objects]] &amp;lt;tt&amp;gt;&amp;#039;inst_data:::myfile.raw&amp;#039;&amp;lt;/tt&amp;gt; provided they have been set properly in the [[Instrument setup]]&lt;br /&gt;
&lt;br /&gt;
== get_ei and mget_ei ==&lt;br /&gt;
get_ei() returns the energy of given a monochromatic run number, a guide energy can optionally be provided to focus the search for a monitor peak. It also optionally returns a structure containing the peak position, area and normalised area of the two monitors used to determine the energy.  Multiple run numbers may be combined.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt;  [ei,props]=get_ei(run_number,ei_guess)&lt;br /&gt;
&amp;gt;&amp;gt;  [ei,props]=get_ei(path_to_raw_file,ei_guess)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;run_number&amp;lt;/tt&amp;gt; can be defined in the following ways&lt;br /&gt;
#  a numerical array of numbers &amp;lt;tt&amp;gt; [12345  45673 34436]&amp;lt;/tt&amp;gt; or a single numeric&lt;br /&gt;
# an array of strings &amp;lt;tt&amp;gt;char(&amp;#039;12345&amp;#039; &amp;#039;45673&amp;#039; &amp;#039;34436&amp;#039;)&amp;lt;/tt&amp;gt; or a single  string&lt;br /&gt;
# a cell array of strings &amp;lt;tt&amp;gt;{&amp;#039;12345&amp;#039; &amp;#039;45673&amp;#039; &amp;#039;34436&amp;#039;}&amp;lt;/tt&amp;gt;&lt;br /&gt;
# a cell array of numerics &amp;lt;tt&amp;gt;{12345  45673 34436}&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;path_to_raw_file&amp;lt;/tt&amp;gt; is defined as a string or a cell array of strings of the form &amp;lt;tt&amp;gt;&amp;#039;C:\data\myfile.raw&amp;#039;&amp;lt;/tt&amp;gt;, relative paths are also possible as well as using the [[Global IXTpath objects]] &amp;lt;tt&amp;gt;&amp;#039;inst_data:::myfile.raw&amp;#039;&amp;lt;/tt&amp;gt; provided they have been set properly in the [[Instrument setup]]&lt;br /&gt;
* ei_guess is a single numeric value containing the starting ei for get_ei to use in its calculation&lt;br /&gt;
&lt;br /&gt;
mget_ei()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt;  [ei,props]=mget_ei(run_numbers,ei_guesses)&lt;br /&gt;
&amp;gt;&amp;gt;  [ei,props]=mget_ei(path_to_raw_file,ei_guesses)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;run_numbers&amp;lt;/tt&amp;gt; can be defined in the following ways&lt;br /&gt;
#  a numerical array of numbers &amp;lt;tt&amp;gt; [12345  45673 34436]&amp;lt;/tt&amp;gt;&lt;br /&gt;
# an array of strings &amp;lt;tt&amp;gt;char(&amp;#039;12345&amp;#039; &amp;#039;45673&amp;#039; &amp;#039;34436&amp;#039;)&amp;lt;/tt&amp;gt; &lt;br /&gt;
# a cell array of strings &amp;lt;tt&amp;gt;{&amp;#039;12345&amp;#039; &amp;#039;45673&amp;#039; &amp;#039;34436&amp;#039;}&amp;lt;/tt&amp;gt;&lt;br /&gt;
# a cell array of numerics &amp;lt;tt&amp;gt;{12345  45673 34436}&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;paths_to_raw_files&amp;lt;/tt&amp;gt; is defined as a cell or string array of the form &amp;lt;tt&amp;gt;&amp;#039;C:\data\myfile.raw&amp;#039;&amp;lt;/tt&amp;gt;,  relative paths are also possible as well as using the [[Global IXTpath objects]] &amp;lt;tt&amp;gt;&amp;#039;inst_data:::myfile.raw&amp;#039;&amp;lt;/tt&amp;gt; provided they have been set properly in the [[Instrument setup]]&lt;br /&gt;
*ei_guesses must be a numerical array equal to the number of run_numbers, containing the starting ei for mget_ei to use in the energy calculation for each run&lt;/div&gt;</summary>
		<author><name>Dickon Champion</name></author>
	</entry>
	<entry>
		<id>http://libisis.org/index.php?title=Homer_Utilities&amp;diff=2565</id>
		<title>Homer Utilities</title>
		<link rel="alternate" type="text/html" href="http://libisis.org/index.php?title=Homer_Utilities&amp;diff=2565"/>
		<updated>2008-07-14T16:51:05Z</updated>

		<summary type="html">&lt;p&gt;Dickon Champion: /* dae access */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== gget == &lt;br /&gt;
generic raw file access&lt;br /&gt;
&lt;br /&gt;
it is possible at the matlab comand line to extract any variable from the rawfile by making a call to a populated [[IXTraw_file]] object.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; rawfile=IXTraw_file(&amp;#039;/path/to/my/file.raw&amp;#039;)&lt;br /&gt;
&amp;gt;&amp;gt; value=gget(rawfile,&amp;#039;FIELD&amp;#039;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== dae access ==&lt;br /&gt;
&lt;br /&gt;
it is possible to access the data in the DAE, can i add this page...h&lt;br /&gt;
&lt;br /&gt;
== head and mhead ==&lt;br /&gt;
&lt;br /&gt;
head() returns the header information for the raw file defined by the run_number, or the path to a defined raw file. Multiple run numbers can be combined together with limited practical use.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt;  head(run_number)&lt;br /&gt;
&amp;gt;&amp;gt;  head(path_to_raw_file)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;run_number&amp;lt;/tt&amp;gt; can be defined in the following ways&lt;br /&gt;
#  a numerical array of numbers &amp;lt;tt&amp;gt; [12345  45673 34436]&amp;lt;/tt&amp;gt; or a single numeric&lt;br /&gt;
# an array of strings &amp;lt;tt&amp;gt;char(&amp;#039;12345&amp;#039; &amp;#039;45673&amp;#039; &amp;#039;34436&amp;#039;)&amp;lt;/tt&amp;gt; or a single  string&lt;br /&gt;
# a cell array of strings &amp;lt;tt&amp;gt;{&amp;#039;12345&amp;#039; &amp;#039;45673&amp;#039; &amp;#039;34436&amp;#039;}&amp;lt;/tt&amp;gt;&lt;br /&gt;
# a cell array of numerics &amp;lt;tt&amp;gt;{12345  45673 34436}&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;path_to_raw_file&amp;lt;/tt&amp;gt; is defined as a string or a cell array of strings of the form &amp;lt;tt&amp;gt;&amp;#039;C:\data\myfile.raw&amp;#039;&amp;lt;/tt&amp;gt;, relative paths are also possible as well as using the [[Global IXTpath objects]] &amp;lt;tt&amp;gt;&amp;#039;inst_data:::myfile.raw&amp;#039;&amp;lt;/tt&amp;gt; provided they have been set properly in the [[Instrument setup]]&lt;br /&gt;
&lt;br /&gt;
mhead() returns the header information for each raw file defined by an &amp;#039;&amp;#039;&amp;#039;array&amp;#039;&amp;#039;&amp;#039; of run numbers, or an &amp;#039;&amp;#039;&amp;#039;array&amp;#039;&amp;#039;&amp;#039; of paths to a raw file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt;  mhead(run_numbers)&lt;br /&gt;
&amp;gt;&amp;gt;  mhead(paths_to_raw_files)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;run_numbers&amp;lt;/tt&amp;gt; can be defined in the following ways&lt;br /&gt;
#  a numerical array of numbers &amp;lt;tt&amp;gt; [12345  45673 34436]&amp;lt;/tt&amp;gt;&lt;br /&gt;
# an array of strings &amp;lt;tt&amp;gt;char(&amp;#039;12345&amp;#039; &amp;#039;45673&amp;#039; &amp;#039;34436&amp;#039;)&amp;lt;/tt&amp;gt; &lt;br /&gt;
# a cell array of strings &amp;lt;tt&amp;gt;{&amp;#039;12345&amp;#039; &amp;#039;45673&amp;#039; &amp;#039;34436&amp;#039;}&amp;lt;/tt&amp;gt;&lt;br /&gt;
# a cell array of numerics &amp;lt;tt&amp;gt;{12345  45673 34436}&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;paths_to_raw_files&amp;lt;/tt&amp;gt; is defined as a cell or string array of the form &amp;lt;tt&amp;gt;&amp;#039;C:\data\myfile.raw&amp;#039;&amp;lt;/tt&amp;gt;,  relative paths are also possible as well as using the [[Global IXTpath objects]] &amp;lt;tt&amp;gt;&amp;#039;inst_data:::myfile.raw&amp;#039;&amp;lt;/tt&amp;gt; provided they have been set properly in the [[Instrument setup]]&lt;br /&gt;
&lt;br /&gt;
== get_ei and mget_ei ==&lt;br /&gt;
get_ei() returns the energy of given a monochromatic run number, a guide energy can optionally be provided to focus the search for a monitor peak. It also optionally returns a structure containing the peak position, area and normalised area of the two monitors used to determine the energy.  Multiple run numbers may be combined.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt;  [ei,props]=get_ei(run_number,ei_guess)&lt;br /&gt;
&amp;gt;&amp;gt;  [ei,props]=get_ei(path_to_raw_file,ei_guess)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;run_number&amp;lt;/tt&amp;gt; can be defined in the following ways&lt;br /&gt;
#  a numerical array of numbers &amp;lt;tt&amp;gt; [12345  45673 34436]&amp;lt;/tt&amp;gt; or a single numeric&lt;br /&gt;
# an array of strings &amp;lt;tt&amp;gt;char(&amp;#039;12345&amp;#039; &amp;#039;45673&amp;#039; &amp;#039;34436&amp;#039;)&amp;lt;/tt&amp;gt; or a single  string&lt;br /&gt;
# a cell array of strings &amp;lt;tt&amp;gt;{&amp;#039;12345&amp;#039; &amp;#039;45673&amp;#039; &amp;#039;34436&amp;#039;}&amp;lt;/tt&amp;gt;&lt;br /&gt;
# a cell array of numerics &amp;lt;tt&amp;gt;{12345  45673 34436}&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;path_to_raw_file&amp;lt;/tt&amp;gt; is defined as a string or a cell array of strings of the form &amp;lt;tt&amp;gt;&amp;#039;C:\data\myfile.raw&amp;#039;&amp;lt;/tt&amp;gt;, relative paths are also possible as well as using the [[Global IXTpath objects]] &amp;lt;tt&amp;gt;&amp;#039;inst_data:::myfile.raw&amp;#039;&amp;lt;/tt&amp;gt; provided they have been set properly in the [[Instrument setup]]&lt;br /&gt;
* ei_guess is a single numeric value containing the starting ei for get_ei to use in its calculation&lt;br /&gt;
&lt;br /&gt;
mget_ei()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt;  [ei,props]=mget_ei(run_numbers,ei_guesses)&lt;br /&gt;
&amp;gt;&amp;gt;  [ei,props]=mget_ei(path_to_raw_file,ei_guesses)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;run_numbers&amp;lt;/tt&amp;gt; can be defined in the following ways&lt;br /&gt;
#  a numerical array of numbers &amp;lt;tt&amp;gt; [12345  45673 34436]&amp;lt;/tt&amp;gt;&lt;br /&gt;
# an array of strings &amp;lt;tt&amp;gt;char(&amp;#039;12345&amp;#039; &amp;#039;45673&amp;#039; &amp;#039;34436&amp;#039;)&amp;lt;/tt&amp;gt; &lt;br /&gt;
# a cell array of strings &amp;lt;tt&amp;gt;{&amp;#039;12345&amp;#039; &amp;#039;45673&amp;#039; &amp;#039;34436&amp;#039;}&amp;lt;/tt&amp;gt;&lt;br /&gt;
# a cell array of numerics &amp;lt;tt&amp;gt;{12345  45673 34436}&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;paths_to_raw_files&amp;lt;/tt&amp;gt; is defined as a cell or string array of the form &amp;lt;tt&amp;gt;&amp;#039;C:\data\myfile.raw&amp;#039;&amp;lt;/tt&amp;gt;,  relative paths are also possible as well as using the [[Global IXTpath objects]] &amp;lt;tt&amp;gt;&amp;#039;inst_data:::myfile.raw&amp;#039;&amp;lt;/tt&amp;gt; provided they have been set properly in the [[Instrument setup]]&lt;br /&gt;
*ei_guesses must be a numerical array equal to the number of run_numbers, containing the starting ei for mget_ei to use in the energy calculation for each run&lt;/div&gt;</summary>
		<author><name>Dickon Champion</name></author>
	</entry>
	<entry>
		<id>http://libisis.org/index.php?title=Overriding_and_setting_default_values_for_homer_processes&amp;diff=2564</id>
		<title>Overriding and setting default values for homer processes</title>
		<link rel="alternate" type="text/html" href="http://libisis.org/index.php?title=Overriding_and_setting_default_values_for_homer_processes&amp;diff=2564"/>
		<updated>2008-07-04T11:07:10Z</updated>

		<summary type="html">&lt;p&gt;Dickon Champion: /* Overriding instrument specific population */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Where are the defaults specified ==&lt;br /&gt;
&lt;br /&gt;
the homer distribution files are contained in&lt;br /&gt;
&lt;br /&gt;
on a [[Download_and_setup_LIBISIS|windows distribution]]:&lt;br /&gt;
&amp;lt;tt&amp;gt;/your_libisis_directory/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
on a linux rpm installation:&lt;br /&gt;
&amp;lt;tt&amp;gt;/usr/local/libisis/applications/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in the svn repository:&lt;br /&gt;
&amp;lt;tt&amp;gt;/libisis/applications/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
each instrument has a named directory where there are instrument specific scripts used to define default values and files which are used to set up and populate the [[IXTrunfile]] object.&lt;br /&gt;
&lt;br /&gt;
== Setting homer defaults ==&lt;br /&gt;
&lt;br /&gt;
For each instrument there can be particular default values specified for each step in the homering process. When homering using a script there are set default values for the [[Scripting_Homer_Functions#white_beam|white beam]] process (None of the following is relevant to the GUI system). For example the MARI white beam defaults are specified in the script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;MARI/setup_mari_white_beam.m&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function setup_mari_white_beam&lt;br /&gt;
&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;remove&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
% particular to white beam operation&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;ei&amp;#039;,&amp;#039;white&amp;#039;);&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;d_int&amp;#039;,[20,40]);&lt;br /&gt;
&lt;br /&gt;
% more general settings &lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;peak_scale&amp;#039;,1000000);&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;uamp_scale&amp;#039;,1000);&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;mon_scale&amp;#039;,1000);&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;det_units&amp;#039;,&amp;#039;$e&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
% default normalisation is with monitor 1&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;normalisation&amp;#039;,int32(1));&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;range&amp;#039;,[1000,2000]);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
all the values are stored in persistent matlab memory using the function &amp;lt;tt&amp;gt;ixf_global_var&amp;lt;/tt&amp;gt;, the specific values which have been set all refer to keywords which are specific to the  [[Scripting_Homer_Functions#white_beam|white beam]] process. To therefore set the default white beam integration limits to be 20 to 100 meV and for the monitor normalisation integration range to be 1000 to 5000 microseconds&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;d_int&amp;#039;,[20,100]);&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;range&amp;#039;,[1000,5000]);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is also possible to change the normalisation process entirely, if we want instead to set normalisation by microamp hours we remove the &amp;#039;range&amp;#039; and change the normalisation to be:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;normalisation&amp;#039;,&amp;#039;uamp&amp;#039;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Overriding homer defaults ==&lt;br /&gt;
&lt;br /&gt;
To override homer defaults when using the [[Scripting_Homer_Functions]] it is quite simple. The keywords are simply specified with their value eg.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; rf=white_beam(dso,run_number,&amp;#039;range&amp;#039;,[1000,5000],&amp;#039;d_int&amp;#039;,[20,100])&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Overriding instrument specific population ==&lt;br /&gt;
=== using defined nexus files ===&lt;br /&gt;
In the case where there is incorrect information in the rawfile which has been generated we can populate detector and spectra information from a nexus file. The [[Overriding_and_setting_default_values_for_homer_processes#Creating populated nexus files|creation of these files]] is defined below&lt;br /&gt;
&lt;br /&gt;
For example the specific MERLIN population information is contained in the file &lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;MERLIN/setup_merlin_data_source.m&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This script defines the nexus files which are required for population of the [[IXTrunfile]] object which in turn the .spe file is produced from. &lt;br /&gt;
&lt;br /&gt;
To define files used to populate the [[IXTdetector]] and [[IXTspectra]] objects we can add the following two lines to this file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DSO=add_item(DSO,&amp;#039;inst_nxs:::merlin_detector.nxs&amp;#039;,&amp;#039;detector&amp;#039;);&lt;br /&gt;
DSO=add_item(DSO,&amp;#039;inst_nxs:::merlin_spectra.nxs&amp;#039;,&amp;#039;spectra&amp;#039;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These files are not distributed with the libisis package as they can change. The &amp;#039;&amp;lt;tt&amp;gt;inst_nxs:::&amp;lt;/tt&amp;gt;&amp;#039; path is a standard definition which is specified in the &amp;lt;tt&amp;gt;[[Homer_Gui_setup|inst_defs.m]]&amp;lt;/tt&amp;gt; file or in the [[Instrument setup]]&lt;br /&gt;
&lt;br /&gt;
=== using a reference file built from a detector.dat information ===&lt;br /&gt;
&lt;br /&gt;
it is possible to generate detector information from the files specified to create detector.dat files, these contain extra information about the [[IXTgeometry]], [[IXTshape]], [[IXTtranslation] and [[IXTorientation]] of the detectors.&lt;br /&gt;
&lt;br /&gt;
It is first necessary to [[Building a reference detector file|build a reference detector file]]. Once you have done this it is again necessary to edit a script.&lt;br /&gt;
&lt;br /&gt;
For example for the MAPS instrument we need to edit the following script file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;MAPS/setup_maps_data_source.m&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
we add the line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DSO=add_item(DSO,&amp;#039;inst_nxs:::detref.nxs&amp;#039;,&amp;#039;detector&amp;#039;,&amp;#039;full_reference_detector&amp;#039;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating populated nexus files ==&lt;br /&gt;
Populate an [[IXTrunfile]] from a raw file containing the correct values and enough detectors to include all those used by the mapping you have chosen - ie if you have an [[IXTrunfile]] which has been populated by the &amp;#039;mon&amp;#039; command then it will not contain enough detector information.&lt;br /&gt;
then you make the matlab command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; write_nxs(your_runfile.inst.detector,&amp;#039;mydetectorfile.nxs&amp;#039;)&lt;br /&gt;
&amp;gt;&amp;gt; write_nxs(your_runfile.inst.spectra,&amp;#039;myspectrafile.nxs&amp;#039;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
these files can then be used in the lines above to populate the [[IXTrunfile]] object provided they are placed in the &amp;lt;tt&amp;gt;inst_nxs:::&amp;lt;/tt&amp;gt; path&lt;/div&gt;</summary>
		<author><name>Dickon Champion</name></author>
	</entry>
	<entry>
		<id>http://libisis.org/index.php?title=Overriding_and_setting_default_values_for_homer_processes&amp;diff=2563</id>
		<title>Overriding and setting default values for homer processes</title>
		<link rel="alternate" type="text/html" href="http://libisis.org/index.php?title=Overriding_and_setting_default_values_for_homer_processes&amp;diff=2563"/>
		<updated>2008-07-04T11:00:40Z</updated>

		<summary type="html">&lt;p&gt;Dickon Champion: /* using a reference file built from a detector.dat information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Where are the defaults specified ==&lt;br /&gt;
&lt;br /&gt;
the homer distribution files are contained in&lt;br /&gt;
&lt;br /&gt;
on a [[Download_and_setup_LIBISIS|windows distribution]]:&lt;br /&gt;
&amp;lt;tt&amp;gt;/your_libisis_directory/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
on a linux rpm installation:&lt;br /&gt;
&amp;lt;tt&amp;gt;/usr/local/libisis/applications/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in the svn repository:&lt;br /&gt;
&amp;lt;tt&amp;gt;/libisis/applications/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
each instrument has a named directory where there are instrument specific scripts used to define default values and files which are used to set up and populate the [[IXTrunfile]] object.&lt;br /&gt;
&lt;br /&gt;
== Setting homer defaults ==&lt;br /&gt;
&lt;br /&gt;
For each instrument there can be particular default values specified for each step in the homering process. When homering using a script there are set default values for the [[Scripting_Homer_Functions#white_beam|white beam]] process (None of the following is relevant to the GUI system). For example the MARI white beam defaults are specified in the script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;MARI/setup_mari_white_beam.m&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function setup_mari_white_beam&lt;br /&gt;
&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;remove&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
% particular to white beam operation&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;ei&amp;#039;,&amp;#039;white&amp;#039;);&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;d_int&amp;#039;,[20,40]);&lt;br /&gt;
&lt;br /&gt;
% more general settings &lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;peak_scale&amp;#039;,1000000);&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;uamp_scale&amp;#039;,1000);&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;mon_scale&amp;#039;,1000);&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;det_units&amp;#039;,&amp;#039;$e&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
% default normalisation is with monitor 1&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;normalisation&amp;#039;,int32(1));&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;range&amp;#039;,[1000,2000]);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
all the values are stored in persistent matlab memory using the function &amp;lt;tt&amp;gt;ixf_global_var&amp;lt;/tt&amp;gt;, the specific values which have been set all refer to keywords which are specific to the  [[Scripting_Homer_Functions#white_beam|white beam]] process. To therefore set the default white beam integration limits to be 20 to 100 meV and for the monitor normalisation integration range to be 1000 to 5000 microseconds&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;d_int&amp;#039;,[20,100]);&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;range&amp;#039;,[1000,5000]);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is also possible to change the normalisation process entirely, if we want instead to set normalisation by microamp hours we remove the &amp;#039;range&amp;#039; and change the normalisation to be:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;normalisation&amp;#039;,&amp;#039;uamp&amp;#039;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Overriding homer defaults ==&lt;br /&gt;
&lt;br /&gt;
To override homer defaults when using the [[Scripting_Homer_Functions]] it is quite simple. The keywords are simply specified with their value eg.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; rf=white_beam(dso,run_number,&amp;#039;range&amp;#039;,[1000,5000],&amp;#039;d_int&amp;#039;,[20,100])&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Overriding instrument specific population ==&lt;br /&gt;
=== using defined nexus files ===&lt;br /&gt;
In the case where there is incorrect information in the rawfile which has been generated we can populate detector and spectra information from a nexus file. The [[Overriding_and_setting_default_values_for_homer_processes#Creating populated nexus files|creation of these files]] is defined below&lt;br /&gt;
&lt;br /&gt;
For example the specific MERLIN population information is contained in the file &lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;MERLIN/setup_merlin_data_source.m&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This script defines the nexus files which are required for population of the [[IXTrunfile]] object which in turn the .spe file is produced from. &lt;br /&gt;
&lt;br /&gt;
To define files used to populate the [[IXTdetector]] and [[IXTspectra]] objects we can add the following two lines to this file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DSO=add_item(DSO,&amp;#039;inst_nxs:::merlin_detector.nxs&amp;#039;,&amp;#039;detector&amp;#039;);&lt;br /&gt;
DSO=add_item(DSO,&amp;#039;inst_nxs:::merlin_spectra.nxs&amp;#039;,&amp;#039;spectra&amp;#039;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These files are not distributed with the libisis package as they can change. The &amp;#039;&amp;lt;tt&amp;gt;inst_nxs:::&amp;lt;/tt&amp;gt;&amp;#039; path is a standard definition which is specified in the &amp;lt;tt&amp;gt;[[Homer_Gui_setup|inst_defs.m]]&amp;lt;/tt&amp;gt; file or in the [[Instrument setup]]&lt;br /&gt;
&lt;br /&gt;
=== using a reference file built from a detector.dat information ===&lt;br /&gt;
&lt;br /&gt;
it is possible to generate detector information from the files specified to create detector.dat files, these contain extra information about the [[IXTgeometry]], [[IXTshape]], [[IXTtranslation] and [[IXTorientation]] of the detectors.&lt;br /&gt;
&lt;br /&gt;
It is first necessary to [[Building a reference detector file|build a reference detector file]]. Once you have done this it is again necessary to edit a script.&lt;br /&gt;
&lt;br /&gt;
For example for the MAPS instrument we need to edit the following script file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;MAPS/setup_maps_data_source.m&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
we add  the line &lt;br /&gt;
&lt;br /&gt;
,&amp;#039;inst_nxs:::detref.nxs&amp;#039;,&amp;#039;detector&amp;#039;,&amp;#039;full_reference_detector&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== Creating populated nexus files ==&lt;br /&gt;
Populate an [[IXTrunfile]] from a raw file containing the correct values and enough detectors to include all those used by the mapping you have chosen - ie if you have an [[IXTrunfile]] which has been populated by the &amp;#039;mon&amp;#039; command then it will not contain enough detector information.&lt;br /&gt;
then you make the matlab command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; write_nxs(your_runfile.inst.detector,&amp;#039;mydetectorfile.nxs&amp;#039;)&lt;br /&gt;
&amp;gt;&amp;gt; write_nxs(your_runfile.inst.spectra,&amp;#039;myspectrafile.nxs&amp;#039;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
these files can then be used in the lines above to populate the [[IXTrunfile]] object provided they are placed in the &amp;lt;tt&amp;gt;inst_nxs:::&amp;lt;/tt&amp;gt; path&lt;/div&gt;</summary>
		<author><name>Dickon Champion</name></author>
	</entry>
	<entry>
		<id>http://libisis.org/index.php?title=Building_a_reference_detector_file&amp;diff=2562</id>
		<title>Building a reference detector file</title>
		<link rel="alternate" type="text/html" href="http://libisis.org/index.php?title=Building_a_reference_detector_file&amp;diff=2562"/>
		<updated>2008-07-04T10:57:18Z</updated>

		<summary type="html">&lt;p&gt;Dickon Champion: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;we can create a detector.dat file and also an [[IXTdetector]] object from file input&lt;/div&gt;</summary>
		<author><name>Dickon Champion</name></author>
	</entry>
	<entry>
		<id>http://libisis.org/index.php?title=Using_Homer_and_Getting_Started&amp;diff=2561</id>
		<title>Using Homer and Getting Started</title>
		<link rel="alternate" type="text/html" href="http://libisis.org/index.php?title=Using_Homer_and_Getting_Started&amp;diff=2561"/>
		<updated>2008-07-04T10:56:00Z</updated>

		<summary type="html">&lt;p&gt;Dickon Champion: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[Getting Started]] &amp;#039;&amp;#039;&amp;#039;VERY IMPORTANT&amp;#039;&amp;#039;&amp;#039; setup details defined&lt;br /&gt;
&lt;br /&gt;
* [[Homer GUI]] - mini tutorial with screenshots&lt;br /&gt;
&lt;br /&gt;
*[[Scripting Homer Functions]] are easy to use functions which call homer related functions underneath, as well as setting up the [[IXTdata_source]] object for use by homer&lt;br /&gt;
&lt;br /&gt;
* [[Overriding and setting default values for homer processes]]&lt;br /&gt;
&lt;br /&gt;
* [[Building a reference detector file]]&lt;br /&gt;
&lt;br /&gt;
*[[Homer and mgenie style functions]] Direct calls to homer and some mgenie style functions&lt;br /&gt;
&lt;br /&gt;
*[[Homer Utilities]] extra functions and utilities&lt;br /&gt;
&lt;br /&gt;
*[[IXTrunfile operations]] including algebra, elementary functions and other manipulations&lt;br /&gt;
&lt;br /&gt;
*[[diagnose]] diagnostic function for homer input&lt;br /&gt;
&lt;br /&gt;
*[[Example Scripts]]&lt;/div&gt;</summary>
		<author><name>Dickon Champion</name></author>
	</entry>
	<entry>
		<id>http://libisis.org/index.php?title=Overriding_and_setting_default_values_for_homer_processes&amp;diff=2560</id>
		<title>Overriding and setting default values for homer processes</title>
		<link rel="alternate" type="text/html" href="http://libisis.org/index.php?title=Overriding_and_setting_default_values_for_homer_processes&amp;diff=2560"/>
		<updated>2008-07-04T10:55:32Z</updated>

		<summary type="html">&lt;p&gt;Dickon Champion: /* Overriding instrument specific population */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Where are the defaults specified ==&lt;br /&gt;
&lt;br /&gt;
the homer distribution files are contained in&lt;br /&gt;
&lt;br /&gt;
on a [[Download_and_setup_LIBISIS|windows distribution]]:&lt;br /&gt;
&amp;lt;tt&amp;gt;/your_libisis_directory/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
on a linux rpm installation:&lt;br /&gt;
&amp;lt;tt&amp;gt;/usr/local/libisis/applications/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in the svn repository:&lt;br /&gt;
&amp;lt;tt&amp;gt;/libisis/applications/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
each instrument has a named directory where there are instrument specific scripts used to define default values and files which are used to set up and populate the [[IXTrunfile]] object.&lt;br /&gt;
&lt;br /&gt;
== Setting homer defaults ==&lt;br /&gt;
&lt;br /&gt;
For each instrument there can be particular default values specified for each step in the homering process. When homering using a script there are set default values for the [[Scripting_Homer_Functions#white_beam|white beam]] process (None of the following is relevant to the GUI system). For example the MARI white beam defaults are specified in the script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;MARI/setup_mari_white_beam.m&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function setup_mari_white_beam&lt;br /&gt;
&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;remove&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
% particular to white beam operation&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;ei&amp;#039;,&amp;#039;white&amp;#039;);&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;d_int&amp;#039;,[20,40]);&lt;br /&gt;
&lt;br /&gt;
% more general settings &lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;peak_scale&amp;#039;,1000000);&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;uamp_scale&amp;#039;,1000);&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;mon_scale&amp;#039;,1000);&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;det_units&amp;#039;,&amp;#039;$e&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
% default normalisation is with monitor 1&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;normalisation&amp;#039;,int32(1));&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;range&amp;#039;,[1000,2000]);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
all the values are stored in persistent matlab memory using the function &amp;lt;tt&amp;gt;ixf_global_var&amp;lt;/tt&amp;gt;, the specific values which have been set all refer to keywords which are specific to the  [[Scripting_Homer_Functions#white_beam|white beam]] process. To therefore set the default white beam integration limits to be 20 to 100 meV and for the monitor normalisation integration range to be 1000 to 5000 microseconds&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;d_int&amp;#039;,[20,100]);&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;range&amp;#039;,[1000,5000]);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is also possible to change the normalisation process entirely, if we want instead to set normalisation by microamp hours we remove the &amp;#039;range&amp;#039; and change the normalisation to be:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;normalisation&amp;#039;,&amp;#039;uamp&amp;#039;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Overriding homer defaults ==&lt;br /&gt;
&lt;br /&gt;
To override homer defaults when using the [[Scripting_Homer_Functions]] it is quite simple. The keywords are simply specified with their value eg.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; rf=white_beam(dso,run_number,&amp;#039;range&amp;#039;,[1000,5000],&amp;#039;d_int&amp;#039;,[20,100])&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Overriding instrument specific population ==&lt;br /&gt;
=== using defined nexus files ===&lt;br /&gt;
In the case where there is incorrect information in the rawfile which has been generated we can populate detector and spectra information from a nexus file. The [[Overriding_and_setting_default_values_for_homer_processes#Creating populated nexus files|creation of these files]] is defined below&lt;br /&gt;
&lt;br /&gt;
For example the specific MERLIN population information is contained in the file &lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;MERLIN/setup_merlin_data_source.m&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This script defines the nexus files which are required for population of the [[IXTrunfile]] object which in turn the .spe file is produced from. &lt;br /&gt;
&lt;br /&gt;
To define files used to populate the [[IXTdetector]] and [[IXTspectra]] objects we can add the following two lines to this file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DSO=add_item(DSO,&amp;#039;inst_nxs:::merlin_detector.nxs&amp;#039;,&amp;#039;detector&amp;#039;);&lt;br /&gt;
DSO=add_item(DSO,&amp;#039;inst_nxs:::merlin_spectra.nxs&amp;#039;,&amp;#039;spectra&amp;#039;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These files are not distributed with the libisis package as they can change. The &amp;#039;&amp;lt;tt&amp;gt;inst_nxs:::&amp;lt;/tt&amp;gt;&amp;#039; path is a standard definition which is specified in the &amp;lt;tt&amp;gt;[[Homer_Gui_setup|inst_defs.m]]&amp;lt;/tt&amp;gt; file or in the [[Instrument setup]]&lt;br /&gt;
&lt;br /&gt;
=== using a reference file built from a detector.dat information ===&lt;br /&gt;
&lt;br /&gt;
it is possible to generate detector information from the files specified to create detector.dat files, these contain extra information about the [[IXTgeometry]], [[IXTshape]], [[IXTtranslation] and [[IXTorientation]] of the detectors.&lt;br /&gt;
&lt;br /&gt;
It is first necessary to [[Building a reference detector file|build a reference detector file]]&lt;br /&gt;
&lt;br /&gt;
== Creating populated nexus files ==&lt;br /&gt;
Populate an [[IXTrunfile]] from a raw file containing the correct values and enough detectors to include all those used by the mapping you have chosen - ie if you have an [[IXTrunfile]] which has been populated by the &amp;#039;mon&amp;#039; command then it will not contain enough detector information.&lt;br /&gt;
then you make the matlab command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; write_nxs(your_runfile.inst.detector,&amp;#039;mydetectorfile.nxs&amp;#039;)&lt;br /&gt;
&amp;gt;&amp;gt; write_nxs(your_runfile.inst.spectra,&amp;#039;myspectrafile.nxs&amp;#039;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
these files can then be used in the lines above to populate the [[IXTrunfile]] object provided they are placed in the &amp;lt;tt&amp;gt;inst_nxs:::&amp;lt;/tt&amp;gt; path&lt;/div&gt;</summary>
		<author><name>Dickon Champion</name></author>
	</entry>
	<entry>
		<id>http://libisis.org/index.php?title=Overriding_and_setting_default_values_for_homer_processes&amp;diff=2559</id>
		<title>Overriding and setting default values for homer processes</title>
		<link rel="alternate" type="text/html" href="http://libisis.org/index.php?title=Overriding_and_setting_default_values_for_homer_processes&amp;diff=2559"/>
		<updated>2008-07-04T10:45:47Z</updated>

		<summary type="html">&lt;p&gt;Dickon Champion: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Where are the defaults specified ==&lt;br /&gt;
&lt;br /&gt;
the homer distribution files are contained in&lt;br /&gt;
&lt;br /&gt;
on a [[Download_and_setup_LIBISIS|windows distribution]]:&lt;br /&gt;
&amp;lt;tt&amp;gt;/your_libisis_directory/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
on a linux rpm installation:&lt;br /&gt;
&amp;lt;tt&amp;gt;/usr/local/libisis/applications/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in the svn repository:&lt;br /&gt;
&amp;lt;tt&amp;gt;/libisis/applications/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
each instrument has a named directory where there are instrument specific scripts used to define default values and files which are used to set up and populate the [[IXTrunfile]] object.&lt;br /&gt;
&lt;br /&gt;
== Setting homer defaults ==&lt;br /&gt;
&lt;br /&gt;
For each instrument there can be particular default values specified for each step in the homering process. When homering using a script there are set default values for the [[Scripting_Homer_Functions#white_beam|white beam]] process (None of the following is relevant to the GUI system). For example the MARI white beam defaults are specified in the script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;MARI/setup_mari_white_beam.m&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function setup_mari_white_beam&lt;br /&gt;
&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;remove&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
% particular to white beam operation&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;ei&amp;#039;,&amp;#039;white&amp;#039;);&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;d_int&amp;#039;,[20,40]);&lt;br /&gt;
&lt;br /&gt;
% more general settings &lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;peak_scale&amp;#039;,1000000);&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;uamp_scale&amp;#039;,1000);&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;mon_scale&amp;#039;,1000);&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;det_units&amp;#039;,&amp;#039;$e&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
% default normalisation is with monitor 1&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;normalisation&amp;#039;,int32(1));&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;range&amp;#039;,[1000,2000]);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
all the values are stored in persistent matlab memory using the function &amp;lt;tt&amp;gt;ixf_global_var&amp;lt;/tt&amp;gt;, the specific values which have been set all refer to keywords which are specific to the  [[Scripting_Homer_Functions#white_beam|white beam]] process. To therefore set the default white beam integration limits to be 20 to 100 meV and for the monitor normalisation integration range to be 1000 to 5000 microseconds&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;d_int&amp;#039;,[20,100]);&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;range&amp;#039;,[1000,5000]);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is also possible to change the normalisation process entirely, if we want instead to set normalisation by microamp hours we remove the &amp;#039;range&amp;#039; and change the normalisation to be:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;normalisation&amp;#039;,&amp;#039;uamp&amp;#039;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Overriding homer defaults ==&lt;br /&gt;
&lt;br /&gt;
To override homer defaults when using the [[Scripting_Homer_Functions]] it is quite simple. The keywords are simply specified with their value eg.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; rf=white_beam(dso,run_number,&amp;#039;range&amp;#039;,[1000,5000],&amp;#039;d_int&amp;#039;,[20,100])&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Overriding instrument specific population ==&lt;br /&gt;
&lt;br /&gt;
In the case where there is incorrect information in the rawfile which has been generated we can populate detector and spectra information from a nexus file. The [[Overriding_and_setting_default_values_for_homer_processes#Creating populated nexus files|creation of these files]] is defined below&lt;br /&gt;
&lt;br /&gt;
For example the specific MERLIN population information is contained in the file &lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;MERLIN/setup_merlin_data_source.m&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This script defines the nexus files which are required for population of the [[IXTrunfile]] object which in turn the .spe file is produced from. &lt;br /&gt;
&lt;br /&gt;
To define files used to populate the [[IXTdetector]] and [[IXTspectra]] objects we can add the following two lines to this file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DSO=add_item(DSO,&amp;#039;inst_nxs:::merlin_detector.nxs&amp;#039;,&amp;#039;detector&amp;#039;);&lt;br /&gt;
DSO=add_item(DSO,&amp;#039;inst_nxs:::merlin_spectra.nxs&amp;#039;,&amp;#039;spectra&amp;#039;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These files are not distributed with the libisis package as they can change. The &amp;#039;&amp;lt;tt&amp;gt;inst_nxs:::&amp;lt;/tt&amp;gt;&amp;#039; path is a standard definition which is specified in the &amp;lt;tt&amp;gt;[[Homer_Gui_setup|inst_defs.m]]&amp;lt;/tt&amp;gt; file or in the [[Instrument setup]]&lt;br /&gt;
&lt;br /&gt;
== Creating populated nexus files ==&lt;br /&gt;
Populate an [[IXTrunfile]] from a raw file containing the correct values and enough detectors to include all those used by the mapping you have chosen - ie if you have an [[IXTrunfile]] which has been populated by the &amp;#039;mon&amp;#039; command then it will not contain enough detector information.&lt;br /&gt;
then you make the matlab command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; write_nxs(your_runfile.inst.detector,&amp;#039;mydetectorfile.nxs&amp;#039;)&lt;br /&gt;
&amp;gt;&amp;gt; write_nxs(your_runfile.inst.spectra,&amp;#039;myspectrafile.nxs&amp;#039;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
these files can then be used in the lines above to populate the [[IXTrunfile]] object provided they are placed in the &amp;lt;tt&amp;gt;inst_nxs:::&amp;lt;/tt&amp;gt; path&lt;/div&gt;</summary>
		<author><name>Dickon Champion</name></author>
	</entry>
	<entry>
		<id>http://libisis.org/index.php?title=Overriding_and_setting_default_values_for_homer_processes&amp;diff=2558</id>
		<title>Overriding and setting default values for homer processes</title>
		<link rel="alternate" type="text/html" href="http://libisis.org/index.php?title=Overriding_and_setting_default_values_for_homer_processes&amp;diff=2558"/>
		<updated>2008-07-04T10:41:48Z</updated>

		<summary type="html">&lt;p&gt;Dickon Champion: /* Setting homer defaults */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Where are the defaults specified ==&lt;br /&gt;
&lt;br /&gt;
the homer distribution files are contained in&lt;br /&gt;
&lt;br /&gt;
on a [[Download_and_setup_LIBISIS|windows distribution]]:&lt;br /&gt;
&amp;lt;tt&amp;gt;/your_libisis_directory/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
on a linux rpm installation:&lt;br /&gt;
&amp;lt;tt&amp;gt;/usr/local/libisis/applications/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in the svn repository:&lt;br /&gt;
&amp;lt;tt&amp;gt;/libisis/applications/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
each instrument has a named directory where there are instrument specific scripts used to define default values and files which are used to set up and populate the [[IXTrunfile]] object.&lt;br /&gt;
&lt;br /&gt;
== Setting homer defaults ==&lt;br /&gt;
&lt;br /&gt;
For each instrument there can be particular default values specified for each step in the homering process. When homering using a script there are set default values for the [[Scripting_Homer_Functions#white_beam|white beam]] process (None of the following is relevant to the GUI system). For example the MARI white beam defaults are specified in the script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;MARI/setup_mari_white_beam.m&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function setup_mari_white_beam&lt;br /&gt;
&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;remove&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
% particular to white beam operation&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;ei&amp;#039;,&amp;#039;white&amp;#039;);&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;d_int&amp;#039;,[20,40]);&lt;br /&gt;
&lt;br /&gt;
% more general settings &lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;peak_scale&amp;#039;,1000000);&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;uamp_scale&amp;#039;,1000);&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;mon_scale&amp;#039;,1000);&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;det_units&amp;#039;,&amp;#039;$e&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
% default normalisation is with monitor 1&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;normalisation&amp;#039;,int32(1));&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;range&amp;#039;,[1000,2000]);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
all the values are stored in persistent matlab memory using the function &amp;lt;tt&amp;gt;ixf_global_var&amp;lt;/tt&amp;gt;, the specific values which have been set all refer to keywords which are specific to the  [[Scripting_Homer_Functions#white_beam|white beam]] process. To therefore set the default white beam integration limits to be 20 to 100 meV and for the monitor normalisation integration range to be 1000 to 5000 microseconds&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;d_int&amp;#039;,[20,100]);&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;range&amp;#039;,[1000,5000]);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is also possible to change the normalisation process entirely, if we want instead to set normalisation by microamp hours we remove the &amp;#039;range&amp;#039; and change the normalisation to be:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;normalisation&amp;#039;,&amp;#039;uamp&amp;#039;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Overriding instrument specific population ==&lt;br /&gt;
&lt;br /&gt;
In the case where there is incorrect information in the rawfile which has been generated we can populate detector and spectra information from a nexus file. The [[Overriding_and_setting_default_values_for_homer_processes#Creating populated nexus files|creation of these files]] is defined below&lt;br /&gt;
&lt;br /&gt;
For example the specific MERLIN population information is contained in the file &lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;MERLIN/setup_merlin_data_source.m&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This script defines the nexus files which are required for population of the [[IXTrunfile]] object which in turn the .spe file is produced from. &lt;br /&gt;
&lt;br /&gt;
To define files used to populate the [[IXTdetector]] and [[IXTspectra]] objects we can add the following two lines to this file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DSO=add_item(DSO,&amp;#039;inst_nxs:::merlin_detector.nxs&amp;#039;,&amp;#039;detector&amp;#039;);&lt;br /&gt;
DSO=add_item(DSO,&amp;#039;inst_nxs:::merlin_spectra.nxs&amp;#039;,&amp;#039;spectra&amp;#039;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These files are not distributed with the libisis package as they can change. The &amp;#039;&amp;lt;tt&amp;gt;inst_nxs:::&amp;lt;/tt&amp;gt;&amp;#039; path is a standard definition which is specified in the &amp;lt;tt&amp;gt;[[Homer_Gui_setup|inst_defs.m]]&amp;lt;/tt&amp;gt; file or in the [[Instrument setup]]&lt;br /&gt;
&lt;br /&gt;
== Creating populated nexus files ==&lt;br /&gt;
Populate an [[IXTrunfile]] from a raw file containing the correct values and enough detectors to include all those used by the mapping you have chosen - ie if you have an [[IXTrunfile]] which has been populated by the &amp;#039;mon&amp;#039; command then it will not contain enough detector information.&lt;br /&gt;
then you make the matlab command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; write_nxs(your_runfile.inst.detector,&amp;#039;mydetectorfile.nxs&amp;#039;)&lt;br /&gt;
&amp;gt;&amp;gt; write_nxs(your_runfile.inst.spectra,&amp;#039;myspectrafile.nxs&amp;#039;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
these files can then be used in the lines above to populate the [[IXTrunfile]] object provided they are placed in the &amp;lt;tt&amp;gt;inst_nxs:::&amp;lt;/tt&amp;gt; path&lt;/div&gt;</summary>
		<author><name>Dickon Champion</name></author>
	</entry>
	<entry>
		<id>http://libisis.org/index.php?title=Overriding_and_setting_default_values_for_homer_processes&amp;diff=2557</id>
		<title>Overriding and setting default values for homer processes</title>
		<link rel="alternate" type="text/html" href="http://libisis.org/index.php?title=Overriding_and_setting_default_values_for_homer_processes&amp;diff=2557"/>
		<updated>2008-07-04T10:41:25Z</updated>

		<summary type="html">&lt;p&gt;Dickon Champion: /* Setting homer defaults */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Where are the defaults specified ==&lt;br /&gt;
&lt;br /&gt;
the homer distribution files are contained in&lt;br /&gt;
&lt;br /&gt;
on a [[Download_and_setup_LIBISIS|windows distribution]]:&lt;br /&gt;
&amp;lt;tt&amp;gt;/your_libisis_directory/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
on a linux rpm installation:&lt;br /&gt;
&amp;lt;tt&amp;gt;/usr/local/libisis/applications/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in the svn repository:&lt;br /&gt;
&amp;lt;tt&amp;gt;/libisis/applications/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
each instrument has a named directory where there are instrument specific scripts used to define default values and files which are used to set up and populate the [[IXTrunfile]] object.&lt;br /&gt;
&lt;br /&gt;
== Setting homer defaults ==&lt;br /&gt;
&lt;br /&gt;
For each instrument there can be particular default values specified for each step in the homering process. When homering using a script there are set default values for the [[Scripting_Homer_Functions#white_beam|white beam]] process (None of the following is relevant to the GUI system). For example the MARI white beam defaults are specified in the script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;MARI/setup_mari_white_beam.m&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function setup_mari_white_beam&lt;br /&gt;
&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;remove&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
% particular to white beam operation&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;ei&amp;#039;,&amp;#039;white&amp;#039;);&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;d_int&amp;#039;,[20,40]);&lt;br /&gt;
&lt;br /&gt;
% more general settings &lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;peak_scale&amp;#039;,1000000);&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;uamp_scale&amp;#039;,1000);&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;mon_scale&amp;#039;,1000);&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;det_units&amp;#039;,&amp;#039;$e&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
% default normalisation is with monitor 1&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;normalisation&amp;#039;,int32(1));&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;range&amp;#039;,[1000,2000]);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
all the values are stored in persistent matlab memory using the function &amp;lt;tt&amp;gt;ixf_global_var&amp;lt;/tt&amp;gt;, the specific values which have been set all refer to keywords which are specific to the  [[Scripting_Homer_Functions#white_beam|white beam]] process. To therefore set the default white beam integration limits to be 20 to 100 meV and for the monitor normalisation integration range to be 1000 to 5000 microseconds&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;d_int&amp;#039;,[20,100]);&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;range&amp;#039;,[1000,2000]);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is also possible to change the normalisation process entirely, if we want instead to set normalisation by microamp hours we remove the &amp;#039;range&amp;#039; and change the normalisation to be:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ixf_global_var(&amp;#039;homer_white_beam&amp;#039;,&amp;#039;set&amp;#039;,&amp;#039;normalisation&amp;#039;,&amp;#039;uamp&amp;#039;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Overriding instrument specific population ==&lt;br /&gt;
&lt;br /&gt;
In the case where there is incorrect information in the rawfile which has been generated we can populate detector and spectra information from a nexus file. The [[Overriding_and_setting_default_values_for_homer_processes#Creating populated nexus files|creation of these files]] is defined below&lt;br /&gt;
&lt;br /&gt;
For example the specific MERLIN population information is contained in the file &lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;MERLIN/setup_merlin_data_source.m&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This script defines the nexus files which are required for population of the [[IXTrunfile]] object which in turn the .spe file is produced from. &lt;br /&gt;
&lt;br /&gt;
To define files used to populate the [[IXTdetector]] and [[IXTspectra]] objects we can add the following two lines to this file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DSO=add_item(DSO,&amp;#039;inst_nxs:::merlin_detector.nxs&amp;#039;,&amp;#039;detector&amp;#039;);&lt;br /&gt;
DSO=add_item(DSO,&amp;#039;inst_nxs:::merlin_spectra.nxs&amp;#039;,&amp;#039;spectra&amp;#039;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These files are not distributed with the libisis package as they can change. The &amp;#039;&amp;lt;tt&amp;gt;inst_nxs:::&amp;lt;/tt&amp;gt;&amp;#039; path is a standard definition which is specified in the &amp;lt;tt&amp;gt;[[Homer_Gui_setup|inst_defs.m]]&amp;lt;/tt&amp;gt; file or in the [[Instrument setup]]&lt;br /&gt;
&lt;br /&gt;
== Creating populated nexus files ==&lt;br /&gt;
Populate an [[IXTrunfile]] from a raw file containing the correct values and enough detectors to include all those used by the mapping you have chosen - ie if you have an [[IXTrunfile]] which has been populated by the &amp;#039;mon&amp;#039; command then it will not contain enough detector information.&lt;br /&gt;
then you make the matlab command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; write_nxs(your_runfile.inst.detector,&amp;#039;mydetectorfile.nxs&amp;#039;)&lt;br /&gt;
&amp;gt;&amp;gt; write_nxs(your_runfile.inst.spectra,&amp;#039;myspectrafile.nxs&amp;#039;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
these files can then be used in the lines above to populate the [[IXTrunfile]] object provided they are placed in the &amp;lt;tt&amp;gt;inst_nxs:::&amp;lt;/tt&amp;gt; path&lt;/div&gt;</summary>
		<author><name>Dickon Champion</name></author>
	</entry>
	<entry>
		<id>http://libisis.org/index.php?title=Overriding_and_setting_default_values_for_homer_processes&amp;diff=2556</id>
		<title>Overriding and setting default values for homer processes</title>
		<link rel="alternate" type="text/html" href="http://libisis.org/index.php?title=Overriding_and_setting_default_values_for_homer_processes&amp;diff=2556"/>
		<updated>2008-07-04T10:29:29Z</updated>

		<summary type="html">&lt;p&gt;Dickon Champion: /* Setting homer defaults */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Where are the defaults specified ==&lt;br /&gt;
&lt;br /&gt;
the homer distribution files are contained in&lt;br /&gt;
&lt;br /&gt;
on a [[Download_and_setup_LIBISIS|windows distribution]]:&lt;br /&gt;
&amp;lt;tt&amp;gt;/your_libisis_directory/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
on a linux rpm installation:&lt;br /&gt;
&amp;lt;tt&amp;gt;/usr/local/libisis/applications/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in the svn repository:&lt;br /&gt;
&amp;lt;tt&amp;gt;/libisis/applications/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
each instrument has a named directory where there are instrument specific scripts used to define default values and files which are used to set up and populate the [[IXTrunfile]] object.&lt;br /&gt;
&lt;br /&gt;
== Setting homer defaults ==&lt;br /&gt;
&lt;br /&gt;
For each instrument there can be particular default values specified for each step in the homering process. When homering using a script there are set default values for the [[Scripting_Homer_Functions#white_beam|white beam]] process. For example the MARI white beam defaults are specified in:&lt;br /&gt;
&lt;br /&gt;
== Overriding instrument specific population ==&lt;br /&gt;
&lt;br /&gt;
In the case where there is incorrect information in the rawfile which has been generated we can populate detector and spectra information from a nexus file. The [[Overriding_and_setting_default_values_for_homer_processes#Creating populated nexus files|creation of these files]] is defined below&lt;br /&gt;
&lt;br /&gt;
For example the specific MERLIN population information is contained in the file &lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;MERLIN/setup_merlin_data_source.m&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This script defines the nexus files which are required for population of the [[IXTrunfile]] object which in turn the .spe file is produced from. &lt;br /&gt;
&lt;br /&gt;
To define files used to populate the [[IXTdetector]] and [[IXTspectra]] objects we can add the following two lines to this file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DSO=add_item(DSO,&amp;#039;inst_nxs:::merlin_detector.nxs&amp;#039;,&amp;#039;detector&amp;#039;);&lt;br /&gt;
DSO=add_item(DSO,&amp;#039;inst_nxs:::merlin_spectra.nxs&amp;#039;,&amp;#039;spectra&amp;#039;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These files are not distributed with the libisis package as they can change. The &amp;#039;&amp;lt;tt&amp;gt;inst_nxs:::&amp;lt;/tt&amp;gt;&amp;#039; path is a standard definition which is specified in the &amp;lt;tt&amp;gt;[[Homer_Gui_setup|inst_defs.m]]&amp;lt;/tt&amp;gt; file or in the [[Instrument setup]]&lt;br /&gt;
&lt;br /&gt;
== Creating populated nexus files ==&lt;br /&gt;
Populate an [[IXTrunfile]] from a raw file containing the correct values and enough detectors to include all those used by the mapping you have chosen - ie if you have an [[IXTrunfile]] which has been populated by the &amp;#039;mon&amp;#039; command then it will not contain enough detector information.&lt;br /&gt;
then you make the matlab command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; write_nxs(your_runfile.inst.detector,&amp;#039;mydetectorfile.nxs&amp;#039;)&lt;br /&gt;
&amp;gt;&amp;gt; write_nxs(your_runfile.inst.spectra,&amp;#039;myspectrafile.nxs&amp;#039;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
these files can then be used in the lines above to populate the [[IXTrunfile]] object provided they are placed in the &amp;lt;tt&amp;gt;inst_nxs:::&amp;lt;/tt&amp;gt; path&lt;/div&gt;</summary>
		<author><name>Dickon Champion</name></author>
	</entry>
	<entry>
		<id>http://libisis.org/index.php?title=Overriding_and_setting_default_values_for_homer_processes&amp;diff=2555</id>
		<title>Overriding and setting default values for homer processes</title>
		<link rel="alternate" type="text/html" href="http://libisis.org/index.php?title=Overriding_and_setting_default_values_for_homer_processes&amp;diff=2555"/>
		<updated>2008-07-04T10:27:27Z</updated>

		<summary type="html">&lt;p&gt;Dickon Champion: /* Setting homer defaults */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Where are the defaults specified ==&lt;br /&gt;
&lt;br /&gt;
the homer distribution files are contained in&lt;br /&gt;
&lt;br /&gt;
on a [[Download_and_setup_LIBISIS|windows distribution]]:&lt;br /&gt;
&amp;lt;tt&amp;gt;/your_libisis_directory/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
on a linux rpm installation:&lt;br /&gt;
&amp;lt;tt&amp;gt;/usr/local/libisis/applications/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in the svn repository:&lt;br /&gt;
&amp;lt;tt&amp;gt;/libisis/applications/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
each instrument has a named directory where there are instrument specific scripts used to define default values and files which are used to set up and populate the [[IXTrunfile]] object.&lt;br /&gt;
&lt;br /&gt;
== Setting homer defaults ==&lt;br /&gt;
&lt;br /&gt;
For each instrument there can be particular default values specified for each step in the homering process. For example the MARI [[Scripting_Homer_Functions#white_beam|white beam]]&lt;br /&gt;
&lt;br /&gt;
== Overriding instrument specific population ==&lt;br /&gt;
&lt;br /&gt;
In the case where there is incorrect information in the rawfile which has been generated we can populate detector and spectra information from a nexus file. The [[Overriding_and_setting_default_values_for_homer_processes#Creating populated nexus files|creation of these files]] is defined below&lt;br /&gt;
&lt;br /&gt;
For example the specific MERLIN population information is contained in the file &lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;MERLIN/setup_merlin_data_source.m&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This script defines the nexus files which are required for population of the [[IXTrunfile]] object which in turn the .spe file is produced from. &lt;br /&gt;
&lt;br /&gt;
To define files used to populate the [[IXTdetector]] and [[IXTspectra]] objects we can add the following two lines to this file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DSO=add_item(DSO,&amp;#039;inst_nxs:::merlin_detector.nxs&amp;#039;,&amp;#039;detector&amp;#039;);&lt;br /&gt;
DSO=add_item(DSO,&amp;#039;inst_nxs:::merlin_spectra.nxs&amp;#039;,&amp;#039;spectra&amp;#039;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These files are not distributed with the libisis package as they can change. The &amp;#039;&amp;lt;tt&amp;gt;inst_nxs:::&amp;lt;/tt&amp;gt;&amp;#039; path is a standard definition which is specified in the &amp;lt;tt&amp;gt;[[Homer_Gui_setup|inst_defs.m]]&amp;lt;/tt&amp;gt; file or in the [[Instrument setup]]&lt;br /&gt;
&lt;br /&gt;
== Creating populated nexus files ==&lt;br /&gt;
Populate an [[IXTrunfile]] from a raw file containing the correct values and enough detectors to include all those used by the mapping you have chosen - ie if you have an [[IXTrunfile]] which has been populated by the &amp;#039;mon&amp;#039; command then it will not contain enough detector information.&lt;br /&gt;
then you make the matlab command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; write_nxs(your_runfile.inst.detector,&amp;#039;mydetectorfile.nxs&amp;#039;)&lt;br /&gt;
&amp;gt;&amp;gt; write_nxs(your_runfile.inst.spectra,&amp;#039;myspectrafile.nxs&amp;#039;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
these files can then be used in the lines above to populate the [[IXTrunfile]] object provided they are placed in the &amp;lt;tt&amp;gt;inst_nxs:::&amp;lt;/tt&amp;gt; path&lt;/div&gt;</summary>
		<author><name>Dickon Champion</name></author>
	</entry>
	<entry>
		<id>http://libisis.org/index.php?title=Overriding_and_setting_default_values_for_homer_processes&amp;diff=2554</id>
		<title>Overriding and setting default values for homer processes</title>
		<link rel="alternate" type="text/html" href="http://libisis.org/index.php?title=Overriding_and_setting_default_values_for_homer_processes&amp;diff=2554"/>
		<updated>2008-07-04T10:26:06Z</updated>

		<summary type="html">&lt;p&gt;Dickon Champion: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Where are the defaults specified ==&lt;br /&gt;
&lt;br /&gt;
the homer distribution files are contained in&lt;br /&gt;
&lt;br /&gt;
on a [[Download_and_setup_LIBISIS|windows distribution]]:&lt;br /&gt;
&amp;lt;tt&amp;gt;/your_libisis_directory/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
on a linux rpm installation:&lt;br /&gt;
&amp;lt;tt&amp;gt;/usr/local/libisis/applications/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in the svn repository:&lt;br /&gt;
&amp;lt;tt&amp;gt;/libisis/applications/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
each instrument has a named directory where there are instrument specific scripts used to define default values and files which are used to set up and populate the [[IXTrunfile]] object.&lt;br /&gt;
&lt;br /&gt;
== Setting homer defaults ==&lt;br /&gt;
&lt;br /&gt;
For each instrument there can be particular default values specified for each step in the homering process. For example the MARI [[white beam]]&lt;br /&gt;
&lt;br /&gt;
== Overriding instrument specific population ==&lt;br /&gt;
&lt;br /&gt;
In the case where there is incorrect information in the rawfile which has been generated we can populate detector and spectra information from a nexus file. The [[Overriding_and_setting_default_values_for_homer_processes#Creating populated nexus files|creation of these files]] is defined below&lt;br /&gt;
&lt;br /&gt;
For example the specific MERLIN population information is contained in the file &lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;MERLIN/setup_merlin_data_source.m&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This script defines the nexus files which are required for population of the [[IXTrunfile]] object which in turn the .spe file is produced from. &lt;br /&gt;
&lt;br /&gt;
To define files used to populate the [[IXTdetector]] and [[IXTspectra]] objects we can add the following two lines to this file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DSO=add_item(DSO,&amp;#039;inst_nxs:::merlin_detector.nxs&amp;#039;,&amp;#039;detector&amp;#039;);&lt;br /&gt;
DSO=add_item(DSO,&amp;#039;inst_nxs:::merlin_spectra.nxs&amp;#039;,&amp;#039;spectra&amp;#039;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These files are not distributed with the libisis package as they can change. The &amp;#039;&amp;lt;tt&amp;gt;inst_nxs:::&amp;lt;/tt&amp;gt;&amp;#039; path is a standard definition which is specified in the &amp;lt;tt&amp;gt;[[Homer_Gui_setup|inst_defs.m]]&amp;lt;/tt&amp;gt; file or in the [[Instrument setup]]&lt;br /&gt;
&lt;br /&gt;
== Creating populated nexus files ==&lt;br /&gt;
Populate an [[IXTrunfile]] from a raw file containing the correct values and enough detectors to include all those used by the mapping you have chosen - ie if you have an [[IXTrunfile]] which has been populated by the &amp;#039;mon&amp;#039; command then it will not contain enough detector information.&lt;br /&gt;
then you make the matlab command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; write_nxs(your_runfile.inst.detector,&amp;#039;mydetectorfile.nxs&amp;#039;)&lt;br /&gt;
&amp;gt;&amp;gt; write_nxs(your_runfile.inst.spectra,&amp;#039;myspectrafile.nxs&amp;#039;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
these files can then be used in the lines above to populate the [[IXTrunfile]] object provided they are placed in the &amp;lt;tt&amp;gt;inst_nxs:::&amp;lt;/tt&amp;gt; path&lt;/div&gt;</summary>
		<author><name>Dickon Champion</name></author>
	</entry>
	<entry>
		<id>http://libisis.org/index.php?title=Overriding_and_setting_default_values_for_homer_processes&amp;diff=2553</id>
		<title>Overriding and setting default values for homer processes</title>
		<link rel="alternate" type="text/html" href="http://libisis.org/index.php?title=Overriding_and_setting_default_values_for_homer_processes&amp;diff=2553"/>
		<updated>2008-07-04T10:21:49Z</updated>

		<summary type="html">&lt;p&gt;Dickon Champion: /* Overriding instrument specific population */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Where are the defaults specified ==&lt;br /&gt;
&lt;br /&gt;
the homer distribution files are contained in&lt;br /&gt;
&lt;br /&gt;
on a [[Download_and_setup_LIBISIS|windows distribution]]:&lt;br /&gt;
&amp;lt;tt&amp;gt;/your_libisis_directory/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
on a linux rpm installation:&lt;br /&gt;
&amp;lt;tt&amp;gt;/usr/local/libisis/applications/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in the svn repository:&lt;br /&gt;
&amp;lt;tt&amp;gt;/libisis/applications/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
each instrument has a named directory where there are instrument specific scripts used to define default values and files which are used to set up and populate the [[IXTrunfile]] object.&lt;br /&gt;
&lt;br /&gt;
== Overriding instrument specific population ==&lt;br /&gt;
&lt;br /&gt;
In the case where there is incorrect information in the rawfile which has been generated we can populate detector and spectra information from a nexus file. The [[Overriding_and_setting_default_values_for_homer_processes#Creating populated nexus files|creation of these files]] is defined below&lt;br /&gt;
&lt;br /&gt;
For example the specific MERLIN population information is contained in the file &lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;MERLIN/setup_merlin_data_source.m&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This script defines the nexus files which are required for population of the [[IXTrunfile]] object which in turn the .spe file is produced from. &lt;br /&gt;
&lt;br /&gt;
To define files used to populate the [[IXTdetector]] and [[IXTspectra]] objects we can add the following two lines to this file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DSO=add_item(DSO,&amp;#039;inst_nxs:::merlin_detector.nxs&amp;#039;,&amp;#039;detector&amp;#039;);&lt;br /&gt;
DSO=add_item(DSO,&amp;#039;inst_nxs:::merlin_spectra.nxs&amp;#039;,&amp;#039;spectra&amp;#039;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These files are not distributed with the libisis package as they can change. The &amp;#039;&amp;lt;tt&amp;gt;inst_nxs:::&amp;lt;/tt&amp;gt;&amp;#039; path is a standard definition which is specified in the &amp;lt;tt&amp;gt;[[Homer_Gui_setup|inst_defs.m]]&amp;lt;/tt&amp;gt; file or in the [[Instrument setup]]&lt;br /&gt;
&lt;br /&gt;
== Creating populated nexus files ==&lt;br /&gt;
Populate an [[IXTrunfile]] from a raw file containing the correct values and enough detectors to include all those used by the mapping you have chosen - ie if you have an [[IXTrunfile]] which has been populated by the &amp;#039;mon&amp;#039; command then it will not contain enough detector information.&lt;br /&gt;
then you make the matlab command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; write_nxs(your_runfile.inst.detector,&amp;#039;mydetectorfile.nxs&amp;#039;)&lt;br /&gt;
&amp;gt;&amp;gt; write_nxs(your_runfile.inst.spectra,&amp;#039;myspectrafile.nxs&amp;#039;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
these files can then be used in the lines above to populate the [[IXTrunfile]] object provided they are placed in the &amp;lt;tt&amp;gt;inst_nxs:::&amp;lt;/tt&amp;gt; path&lt;/div&gt;</summary>
		<author><name>Dickon Champion</name></author>
	</entry>
	<entry>
		<id>http://libisis.org/index.php?title=Overriding_and_setting_default_values_for_homer_processes&amp;diff=2552</id>
		<title>Overriding and setting default values for homer processes</title>
		<link rel="alternate" type="text/html" href="http://libisis.org/index.php?title=Overriding_and_setting_default_values_for_homer_processes&amp;diff=2552"/>
		<updated>2008-07-04T10:16:38Z</updated>

		<summary type="html">&lt;p&gt;Dickon Champion: /* Creating populated nexus files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Where are the defaults specified ==&lt;br /&gt;
&lt;br /&gt;
the homer distribution files are contained in&lt;br /&gt;
&lt;br /&gt;
on a [[Download_and_setup_LIBISIS|windows distribution]]:&lt;br /&gt;
&amp;lt;tt&amp;gt;/your_libisis_directory/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
on a linux rpm installation:&lt;br /&gt;
&amp;lt;tt&amp;gt;/usr/local/libisis/applications/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in the svn repository:&lt;br /&gt;
&amp;lt;tt&amp;gt;/libisis/applications/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
each instrument has a named directory where there are instrument specific scripts used to define default values and files which are used to set up and populate the [[IXTrunfile]] object.&lt;br /&gt;
&lt;br /&gt;
== Overriding instrument specific population ==&lt;br /&gt;
&lt;br /&gt;
In the case where there is incorrect information in the rawfile which has been generated we can populate detector and spectra information from a nexus file. [[Overriding_and_setting_default_values_for_homer_processes#Creating populated nexus files|Creating populated nexus files]]&lt;br /&gt;
&lt;br /&gt;
For example the specific MERLIN population information is contained in the file &lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;MERLIN/setup_merlin_data_source.m&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This script defines the nexus files which are required for population of the [[IXTrunfile]] object which in turn the .spe file is produced from. &lt;br /&gt;
&lt;br /&gt;
To define files used to populate the [[IXTdetector]] and [[IXTspectra]] objects we can add the following two lines to this file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DSO=add_item(DSO,&amp;#039;inst_nxs:::merlin_detector.nxs&amp;#039;,&amp;#039;detector&amp;#039;);&lt;br /&gt;
DSO=add_item(DSO,&amp;#039;inst_nxs:::merlin_spectra.nxs&amp;#039;,&amp;#039;spectra&amp;#039;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These files are not distributed with libisis package as they can change. the &amp;#039;&amp;lt;tt&amp;gt;inst_nxs:::&amp;lt;/tt&amp;gt;&amp;#039; path is a standard definition which is specified in the &amp;lt;tt&amp;gt;[[Homer_Gui_setup|inst_defs.m]]&amp;lt;/tt&amp;gt; file or in the [[Instrument setup]]&lt;br /&gt;
&lt;br /&gt;
== Creating populated nexus files ==&lt;br /&gt;
Populate an [[IXTrunfile]] from a raw file containing the correct values and enough detectors to include all those used by the mapping you have chosen - ie if you have an [[IXTrunfile]] which has been populated by the &amp;#039;mon&amp;#039; command then it will not contain enough detector information.&lt;br /&gt;
then you make the matlab command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; write_nxs(your_runfile.inst.detector,&amp;#039;mydetectorfile.nxs&amp;#039;)&lt;br /&gt;
&amp;gt;&amp;gt; write_nxs(your_runfile.inst.spectra,&amp;#039;myspectrafile.nxs&amp;#039;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
these files can then be used in the lines above to populate the [[IXTrunfile]] object provided they are placed in the &amp;lt;tt&amp;gt;inst_nxs:::&amp;lt;/tt&amp;gt; path&lt;/div&gt;</summary>
		<author><name>Dickon Champion</name></author>
	</entry>
	<entry>
		<id>http://libisis.org/index.php?title=Overriding_and_setting_default_values_for_homer_processes&amp;diff=2551</id>
		<title>Overriding and setting default values for homer processes</title>
		<link rel="alternate" type="text/html" href="http://libisis.org/index.php?title=Overriding_and_setting_default_values_for_homer_processes&amp;diff=2551"/>
		<updated>2008-07-04T10:15:23Z</updated>

		<summary type="html">&lt;p&gt;Dickon Champion: /* Overriding instrument specific population */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Where are the defaults specified ==&lt;br /&gt;
&lt;br /&gt;
the homer distribution files are contained in&lt;br /&gt;
&lt;br /&gt;
on a [[Download_and_setup_LIBISIS|windows distribution]]:&lt;br /&gt;
&amp;lt;tt&amp;gt;/your_libisis_directory/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
on a linux rpm installation:&lt;br /&gt;
&amp;lt;tt&amp;gt;/usr/local/libisis/applications/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in the svn repository:&lt;br /&gt;
&amp;lt;tt&amp;gt;/libisis/applications/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
each instrument has a named directory where there are instrument specific scripts used to define default values and files which are used to set up and populate the [[IXTrunfile]] object.&lt;br /&gt;
&lt;br /&gt;
== Overriding instrument specific population ==&lt;br /&gt;
&lt;br /&gt;
In the case where there is incorrect information in the rawfile which has been generated we can populate detector and spectra information from a nexus file. [[Overriding_and_setting_default_values_for_homer_processes#Creating populated nexus files|Creating populated nexus files]]&lt;br /&gt;
&lt;br /&gt;
For example the specific MERLIN population information is contained in the file &lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;MERLIN/setup_merlin_data_source.m&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This script defines the nexus files which are required for population of the [[IXTrunfile]] object which in turn the .spe file is produced from. &lt;br /&gt;
&lt;br /&gt;
To define files used to populate the [[IXTdetector]] and [[IXTspectra]] objects we can add the following two lines to this file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DSO=add_item(DSO,&amp;#039;inst_nxs:::merlin_detector.nxs&amp;#039;,&amp;#039;detector&amp;#039;);&lt;br /&gt;
DSO=add_item(DSO,&amp;#039;inst_nxs:::merlin_spectra.nxs&amp;#039;,&amp;#039;spectra&amp;#039;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These files are not distributed with libisis package as they can change. the &amp;#039;&amp;lt;tt&amp;gt;inst_nxs:::&amp;lt;/tt&amp;gt;&amp;#039; path is a standard definition which is specified in the &amp;lt;tt&amp;gt;[[Homer_Gui_setup|inst_defs.m]]&amp;lt;/tt&amp;gt; file or in the [[Instrument setup]]&lt;br /&gt;
&lt;br /&gt;
== Creating populated nexus files ==&lt;br /&gt;
populate an IXTrunfile from a rawfile containing the correct values and enough detectors to include all those used by the mapping you have chosen - ie if you have an [[IXTrunfile]] which has been populated by the &amp;#039;mon&amp;#039; command then it will not contain enough detector information.&lt;br /&gt;
then you make the matlab command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; write_nxs(your_runfile.inst.detector,&amp;#039;mydetectorfile.nxs&amp;#039;)&lt;br /&gt;
&amp;gt;&amp;gt; write_nxs(your_runfile.inst.spectra,&amp;#039;myspectrafile.nxs&amp;#039;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
these files can then be used in the lines above to populate the [[IXTrunfile]] object provided thety are placed in the inst_nxs::: path&lt;/div&gt;</summary>
		<author><name>Dickon Champion</name></author>
	</entry>
	<entry>
		<id>http://libisis.org/index.php?title=Overriding_and_setting_default_values_for_homer_processes&amp;diff=2550</id>
		<title>Overriding and setting default values for homer processes</title>
		<link rel="alternate" type="text/html" href="http://libisis.org/index.php?title=Overriding_and_setting_default_values_for_homer_processes&amp;diff=2550"/>
		<updated>2008-07-04T10:14:24Z</updated>

		<summary type="html">&lt;p&gt;Dickon Champion: /* Overriding instrument specific population */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Where are the defaults specified ==&lt;br /&gt;
&lt;br /&gt;
the homer distribution files are contained in&lt;br /&gt;
&lt;br /&gt;
on a [[Download_and_setup_LIBISIS|windows distribution]]:&lt;br /&gt;
&amp;lt;tt&amp;gt;/your_libisis_directory/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
on a linux rpm installation:&lt;br /&gt;
&amp;lt;tt&amp;gt;/usr/local/libisis/applications/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in the svn repository:&lt;br /&gt;
&amp;lt;tt&amp;gt;/libisis/applications/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
each instrument has a named directory where there are instrument specific scripts used to define default values and files which are used to set up and populate the [[IXTrunfile]] object.&lt;br /&gt;
&lt;br /&gt;
== Overriding instrument specific population ==&lt;br /&gt;
&lt;br /&gt;
In the case where there is incorrect information in the rawfile which has been generated we can populate detector and spectra information from a nexus file. [[Overriding_and_setting_default_values_for_homer_processes#Creating populated nexus files|Creating populated nexus files]]&lt;br /&gt;
&lt;br /&gt;
For example the specific MERLIN population information is contained in the file &lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;MERLIN/setup_merlin_data_source.m&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This script defines the nexus files which are required for population of the [[IXTrunfile]] object which in turn the .spe file is produced from. &lt;br /&gt;
&lt;br /&gt;
To define files used to populate the [[IXTdetector]] and [[IXTspectra]] objects we can add the following two lines to this file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DSO=add_item(DSO,&amp;#039;inst_nxs:::merlin_detector.nxs&amp;#039;,&amp;#039;detector&amp;#039;);&lt;br /&gt;
DSO=add_item(DSO,&amp;#039;inst_nxs:::merlin_spectra.nxs&amp;#039;,&amp;#039;spectra&amp;#039;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These files are not distributed with libisis package as they can change. the &amp;#039;&amp;lt;tt&amp;gt;inst_nxs:::&amp;lt;/tt&amp;gt;&amp;#039; path is a standard definition which is specified in the &amp;lt;tt&amp;gt;inst_defs.m&amp;lt;/tt&amp;gt; file or in the [[Instrument setup]]&lt;br /&gt;
&lt;br /&gt;
== Creating populated nexus files ==&lt;br /&gt;
populate an IXTrunfile from a rawfile containing the correct values and enough detectors to include all those used by the mapping you have chosen - ie if you have an [[IXTrunfile]] which has been populated by the &amp;#039;mon&amp;#039; command then it will not contain enough detector information.&lt;br /&gt;
then you make the matlab command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; write_nxs(your_runfile.inst.detector,&amp;#039;mydetectorfile.nxs&amp;#039;)&lt;br /&gt;
&amp;gt;&amp;gt; write_nxs(your_runfile.inst.spectra,&amp;#039;myspectrafile.nxs&amp;#039;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
these files can then be used in the lines above to populate the [[IXTrunfile]] object provided thety are placed in the inst_nxs::: path&lt;/div&gt;</summary>
		<author><name>Dickon Champion</name></author>
	</entry>
	<entry>
		<id>http://libisis.org/index.php?title=Overriding_and_setting_default_values_for_homer_processes&amp;diff=2549</id>
		<title>Overriding and setting default values for homer processes</title>
		<link rel="alternate" type="text/html" href="http://libisis.org/index.php?title=Overriding_and_setting_default_values_for_homer_processes&amp;diff=2549"/>
		<updated>2008-07-04T10:12:53Z</updated>

		<summary type="html">&lt;p&gt;Dickon Champion: /* Overriding instrument specific population */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Where are the defaults specified ==&lt;br /&gt;
&lt;br /&gt;
the homer distribution files are contained in&lt;br /&gt;
&lt;br /&gt;
on a [[Download_and_setup_LIBISIS|windows distribution]]:&lt;br /&gt;
&amp;lt;tt&amp;gt;/your_libisis_directory/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
on a linux rpm installation:&lt;br /&gt;
&amp;lt;tt&amp;gt;/usr/local/libisis/applications/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in the svn repository:&lt;br /&gt;
&amp;lt;tt&amp;gt;/libisis/applications/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
each instrument has a named directory where there are instrument specific scripts used to define default values and files which are used to set up and populate the [[IXTrunfile]] object.&lt;br /&gt;
&lt;br /&gt;
== Overriding instrument specific population ==&lt;br /&gt;
&lt;br /&gt;
In the case where there is incorrect information in the rawfile which has been generated we can populate detector and spectra information from a nexus file. [[Overriding_and_setting_default_values_for_homer_processes#Creating populated nexus files|Creating populated nexus files]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example the specific MERLIN population information is contained in the file &lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;setup_merlin_data_source.m&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This file defines the nexus files which are required for population of the [[IXTrunfile]] object which in turn the .spe file is produced from. &lt;br /&gt;
&lt;br /&gt;
To define files used to populate the [[IXTdetector]] and [[IXTspectra]] objects from the we can add the following two lines to this file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DSO=add_item(DSO,&amp;#039;inst_nxs:::merlin_detector.nxs&amp;#039;,&amp;#039;detector&amp;#039;);&lt;br /&gt;
DSO=add_item(DSO,&amp;#039;inst_nxs:::merlin_spectra.nxs&amp;#039;,&amp;#039;spectra&amp;#039;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These files are not distributed with libisis package as they can change. the &amp;#039;&amp;lt;tt&amp;gt;inst_nxs:::&amp;lt;/tt&amp;gt;&amp;#039; path is a standard definition which is specified in the &amp;lt;tt&amp;gt;inst_defs.m&amp;lt;/tt&amp;gt; file or in the [[Instrument setup]]&lt;br /&gt;
&lt;br /&gt;
== Creating populated nexus files ==&lt;br /&gt;
populate an IXTrunfile from a rawfile containing the correct values and enough detectors to include all those used by the mapping you have chosen - ie if you have an [[IXTrunfile]] which has been populated by the &amp;#039;mon&amp;#039; command then it will not contain enough detector information.&lt;br /&gt;
then you make the matlab command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; write_nxs(your_runfile.inst.detector,&amp;#039;mydetectorfile.nxs&amp;#039;)&lt;br /&gt;
&amp;gt;&amp;gt; write_nxs(your_runfile.inst.spectra,&amp;#039;myspectrafile.nxs&amp;#039;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
these files can then be used in the lines above to populate the [[IXTrunfile]] object provided thety are placed in the inst_nxs::: path&lt;/div&gt;</summary>
		<author><name>Dickon Champion</name></author>
	</entry>
	<entry>
		<id>http://libisis.org/index.php?title=Overriding_and_setting_default_values_for_homer_processes&amp;diff=2548</id>
		<title>Overriding and setting default values for homer processes</title>
		<link rel="alternate" type="text/html" href="http://libisis.org/index.php?title=Overriding_and_setting_default_values_for_homer_processes&amp;diff=2548"/>
		<updated>2008-07-04T10:12:00Z</updated>

		<summary type="html">&lt;p&gt;Dickon Champion: /* Where are the defaults specified */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Where are the defaults specified ==&lt;br /&gt;
&lt;br /&gt;
the homer distribution files are contained in&lt;br /&gt;
&lt;br /&gt;
on a [[Download_and_setup_LIBISIS|windows distribution]]:&lt;br /&gt;
&amp;lt;tt&amp;gt;/your_libisis_directory/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
on a linux rpm installation:&lt;br /&gt;
&amp;lt;tt&amp;gt;/usr/local/libisis/applications/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in the svn repository:&lt;br /&gt;
&amp;lt;tt&amp;gt;/libisis/applications/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
each instrument has a named directory where there are instrument specific scripts used to define default values and files which are used to set up and populate the [[IXTrunfile]] object.&lt;br /&gt;
&lt;br /&gt;
== Overriding instrument specific population ==&lt;br /&gt;
&lt;br /&gt;
In the case where there is incorrect information in the rawfile which has been generated we can populate detector and spectra information from a nexus file. [[Overriding_and_setting_default_values_for_homer_processes#Creating populated nexus files|Creating populated nexus files]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example the specific MERLIN population information is contained in the file &lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;setup_merlin_data_source.m&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This file defines the nexus files which are required for population of the [[IXTrunfile]] object which in turn the .spe file is produced from. &lt;br /&gt;
&lt;br /&gt;
To define files used to populate the [[IXTdetector]] and [[IXTspectra]] objects from the we can add the following two lines to this file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DSO=add_item(DSO,&amp;#039;inst_nxs:::merlin_detector.nxs&amp;#039;,&amp;#039;detector&amp;#039;);&lt;br /&gt;
DSO=add_item(DSO,&amp;#039;inst_nxs:::merlin_spectra.nxs&amp;#039;,&amp;#039;spectra&amp;#039;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These files are not distributed with libisis package as they can change. the &amp;#039;&amp;lt;tt&amp;gt;inst_nxs:::/tt&amp;gt;&amp;#039; path is a standard definition which is specified in the &amp;lt;tt&amp;gt;inst_defs.m&amp;lt;/tt&amp;gt; file or in the [[Instrument setup]]&lt;br /&gt;
&lt;br /&gt;
== Creating populated nexus files ==&lt;br /&gt;
populate an IXTrunfile from a rawfile containing the correct values and enough detectors to include all those used by the mapping you have chosen - ie if you have an [[IXTrunfile]] which has been populated by the &amp;#039;mon&amp;#039; command then it will not contain enough detector information.&lt;br /&gt;
then you make the matlab command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; write_nxs(your_runfile.inst.detector,&amp;#039;mydetectorfile.nxs&amp;#039;)&lt;br /&gt;
&amp;gt;&amp;gt; write_nxs(your_runfile.inst.spectra,&amp;#039;myspectrafile.nxs&amp;#039;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
these files can then be used in the lines above to populate the [[IXTrunfile]] object provided thety are placed in the inst_nxs::: path&lt;/div&gt;</summary>
		<author><name>Dickon Champion</name></author>
	</entry>
	<entry>
		<id>http://libisis.org/index.php?title=Overriding_and_setting_default_values_for_homer_processes&amp;diff=2547</id>
		<title>Overriding and setting default values for homer processes</title>
		<link rel="alternate" type="text/html" href="http://libisis.org/index.php?title=Overriding_and_setting_default_values_for_homer_processes&amp;diff=2547"/>
		<updated>2008-07-04T10:11:22Z</updated>

		<summary type="html">&lt;p&gt;Dickon Champion: /* Where are the defaults specified */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Where are the defaults specified ==&lt;br /&gt;
&lt;br /&gt;
the homer distribution files are contained in&lt;br /&gt;
&lt;br /&gt;
on a [[Download_and_setup_LIBISIS|windows distribution]]:&lt;br /&gt;
&amp;lt;tt&amp;gt;/your_libisis_directory/matlab&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
on a linux rpm installation:&lt;br /&gt;
&amp;lt;tt&amp;gt;/usr/local/libisis/applications/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in the svn repository:&lt;br /&gt;
&amp;lt;tt&amp;gt;/libisis/applications/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
each instrument has a named directory where there are instrument specific scripts used to define default values and files which are used to set up and populate the [[IXTrunfile]] object.&lt;br /&gt;
&lt;br /&gt;
== Overriding instrument specific population ==&lt;br /&gt;
&lt;br /&gt;
In the case where there is incorrect information in the rawfile which has been generated we can populate detector and spectra information from a nexus file. [[Overriding_and_setting_default_values_for_homer_processes#Creating populated nexus files|Creating populated nexus files]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example the specific MERLIN population information is contained in the file &lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;setup_merlin_data_source.m&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This file defines the nexus files which are required for population of the [[IXTrunfile]] object which in turn the .spe file is produced from. &lt;br /&gt;
&lt;br /&gt;
To define files used to populate the [[IXTdetector]] and [[IXTspectra]] objects from the we can add the following two lines to this file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DSO=add_item(DSO,&amp;#039;inst_nxs:::merlin_detector.nxs&amp;#039;,&amp;#039;detector&amp;#039;);&lt;br /&gt;
DSO=add_item(DSO,&amp;#039;inst_nxs:::merlin_spectra.nxs&amp;#039;,&amp;#039;spectra&amp;#039;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These files are not distributed with libisis package as they can change. the &amp;#039;&amp;lt;tt&amp;gt;inst_nxs:::/tt&amp;gt;&amp;#039; path is a standard definition which is specified in the &amp;lt;tt&amp;gt;inst_defs.m&amp;lt;/tt&amp;gt; file or in the [[Instrument setup]]&lt;br /&gt;
&lt;br /&gt;
== Creating populated nexus files ==&lt;br /&gt;
populate an IXTrunfile from a rawfile containing the correct values and enough detectors to include all those used by the mapping you have chosen - ie if you have an [[IXTrunfile]] which has been populated by the &amp;#039;mon&amp;#039; command then it will not contain enough detector information.&lt;br /&gt;
then you make the matlab command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; write_nxs(your_runfile.inst.detector,&amp;#039;mydetectorfile.nxs&amp;#039;)&lt;br /&gt;
&amp;gt;&amp;gt; write_nxs(your_runfile.inst.spectra,&amp;#039;myspectrafile.nxs&amp;#039;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
these files can then be used in the lines above to populate the [[IXTrunfile]] object provided thety are placed in the inst_nxs::: path&lt;/div&gt;</summary>
		<author><name>Dickon Champion</name></author>
	</entry>
	<entry>
		<id>http://libisis.org/index.php?title=Overriding_and_setting_default_values_for_homer_processes&amp;diff=2546</id>
		<title>Overriding and setting default values for homer processes</title>
		<link rel="alternate" type="text/html" href="http://libisis.org/index.php?title=Overriding_and_setting_default_values_for_homer_processes&amp;diff=2546"/>
		<updated>2008-07-04T10:10:59Z</updated>

		<summary type="html">&lt;p&gt;Dickon Champion: /* Where are the defaults specified */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Where are the defaults specified ==&lt;br /&gt;
&lt;br /&gt;
the homer distribution files are contained in&lt;br /&gt;
&lt;br /&gt;
on a [[Download_and_setup_LIBISIS|windows distribution]]&lt;br /&gt;
&amp;lt;tt&amp;gt;/your_libisis_directory/matlab&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
on a linux rpm installation:&lt;br /&gt;
&amp;lt;tt&amp;gt;/usr/local/libisis/applications/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
in the svn repository:&lt;br /&gt;
&amp;lt;tt&amp;gt;/libisis/applications/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
each instrument has a named directory where there are instrument specific scripts used to define default values and files which are used to set up and populate the [[IXTrunfile]] object.&lt;br /&gt;
&lt;br /&gt;
== Overriding instrument specific population ==&lt;br /&gt;
&lt;br /&gt;
In the case where there is incorrect information in the rawfile which has been generated we can populate detector and spectra information from a nexus file. [[Overriding_and_setting_default_values_for_homer_processes#Creating populated nexus files|Creating populated nexus files]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example the specific MERLIN population information is contained in the file &lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;setup_merlin_data_source.m&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This file defines the nexus files which are required for population of the [[IXTrunfile]] object which in turn the .spe file is produced from. &lt;br /&gt;
&lt;br /&gt;
To define files used to populate the [[IXTdetector]] and [[IXTspectra]] objects from the we can add the following two lines to this file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DSO=add_item(DSO,&amp;#039;inst_nxs:::merlin_detector.nxs&amp;#039;,&amp;#039;detector&amp;#039;);&lt;br /&gt;
DSO=add_item(DSO,&amp;#039;inst_nxs:::merlin_spectra.nxs&amp;#039;,&amp;#039;spectra&amp;#039;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These files are not distributed with libisis package as they can change. the &amp;#039;&amp;lt;tt&amp;gt;inst_nxs:::/tt&amp;gt;&amp;#039; path is a standard definition which is specified in the &amp;lt;tt&amp;gt;inst_defs.m&amp;lt;/tt&amp;gt; file or in the [[Instrument setup]]&lt;br /&gt;
&lt;br /&gt;
== Creating populated nexus files ==&lt;br /&gt;
populate an IXTrunfile from a rawfile containing the correct values and enough detectors to include all those used by the mapping you have chosen - ie if you have an [[IXTrunfile]] which has been populated by the &amp;#039;mon&amp;#039; command then it will not contain enough detector information.&lt;br /&gt;
then you make the matlab command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; write_nxs(your_runfile.inst.detector,&amp;#039;mydetectorfile.nxs&amp;#039;)&lt;br /&gt;
&amp;gt;&amp;gt; write_nxs(your_runfile.inst.spectra,&amp;#039;myspectrafile.nxs&amp;#039;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
these files can then be used in the lines above to populate the [[IXTrunfile]] object provided thety are placed in the inst_nxs::: path&lt;/div&gt;</summary>
		<author><name>Dickon Champion</name></author>
	</entry>
	<entry>
		<id>http://libisis.org/index.php?title=Overriding_and_setting_default_values_for_homer_processes&amp;diff=2545</id>
		<title>Overriding and setting default values for homer processes</title>
		<link rel="alternate" type="text/html" href="http://libisis.org/index.php?title=Overriding_and_setting_default_values_for_homer_processes&amp;diff=2545"/>
		<updated>2008-07-04T10:10:48Z</updated>

		<summary type="html">&lt;p&gt;Dickon Champion: /* Overriding instrument specific population */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Where are the defaults specified ==&lt;br /&gt;
&lt;br /&gt;
the homer distribution files are contained in&lt;br /&gt;
&lt;br /&gt;
on a [[Download_and_setup_LIBISIS|windows distribution]]&lt;br /&gt;
&amp;lt;tt&amp;gt;/your_libisis_directory/matlab&amp;lt;tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
on a linux rpm installation:&lt;br /&gt;
&amp;lt;tt&amp;gt;/usr/local/libisis/applications/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
in the svn repository:&lt;br /&gt;
&amp;lt;tt&amp;gt;/libisis/applications/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
each instrument has a named directory where there are instrument specific scripts used to define default values and files which are used to set up and populate the [[IXTrunfile]] object.&lt;br /&gt;
&lt;br /&gt;
== Overriding instrument specific population ==&lt;br /&gt;
&lt;br /&gt;
In the case where there is incorrect information in the rawfile which has been generated we can populate detector and spectra information from a nexus file. [[Overriding_and_setting_default_values_for_homer_processes#Creating populated nexus files|Creating populated nexus files]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example the specific MERLIN population information is contained in the file &lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;setup_merlin_data_source.m&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This file defines the nexus files which are required for population of the [[IXTrunfile]] object which in turn the .spe file is produced from. &lt;br /&gt;
&lt;br /&gt;
To define files used to populate the [[IXTdetector]] and [[IXTspectra]] objects from the we can add the following two lines to this file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DSO=add_item(DSO,&amp;#039;inst_nxs:::merlin_detector.nxs&amp;#039;,&amp;#039;detector&amp;#039;);&lt;br /&gt;
DSO=add_item(DSO,&amp;#039;inst_nxs:::merlin_spectra.nxs&amp;#039;,&amp;#039;spectra&amp;#039;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These files are not distributed with libisis package as they can change. the &amp;#039;&amp;lt;tt&amp;gt;inst_nxs:::/tt&amp;gt;&amp;#039; path is a standard definition which is specified in the &amp;lt;tt&amp;gt;inst_defs.m&amp;lt;/tt&amp;gt; file or in the [[Instrument setup]]&lt;br /&gt;
&lt;br /&gt;
== Creating populated nexus files ==&lt;br /&gt;
populate an IXTrunfile from a rawfile containing the correct values and enough detectors to include all those used by the mapping you have chosen - ie if you have an [[IXTrunfile]] which has been populated by the &amp;#039;mon&amp;#039; command then it will not contain enough detector information.&lt;br /&gt;
then you make the matlab command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; write_nxs(your_runfile.inst.detector,&amp;#039;mydetectorfile.nxs&amp;#039;)&lt;br /&gt;
&amp;gt;&amp;gt; write_nxs(your_runfile.inst.spectra,&amp;#039;myspectrafile.nxs&amp;#039;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
these files can then be used in the lines above to populate the [[IXTrunfile]] object provided thety are placed in the inst_nxs::: path&lt;/div&gt;</summary>
		<author><name>Dickon Champion</name></author>
	</entry>
	<entry>
		<id>http://libisis.org/index.php?title=Overriding_and_setting_default_values_for_homer_processes&amp;diff=2544</id>
		<title>Overriding and setting default values for homer processes</title>
		<link rel="alternate" type="text/html" href="http://libisis.org/index.php?title=Overriding_and_setting_default_values_for_homer_processes&amp;diff=2544"/>
		<updated>2008-07-04T10:09:30Z</updated>

		<summary type="html">&lt;p&gt;Dickon Champion: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Where are the defaults specified ==&lt;br /&gt;
&lt;br /&gt;
the homer distribution files are contained in&lt;br /&gt;
&lt;br /&gt;
on a [[Download_and_setup_LIBISIS|windows distribution]]&lt;br /&gt;
&amp;lt;tt&amp;gt;/your_libisis_directory/matlab&amp;lt;tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
on a linux rpm installation:&lt;br /&gt;
&amp;lt;tt&amp;gt;/usr/local/libisis/applications/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
in the svn repository:&lt;br /&gt;
&amp;lt;tt&amp;gt;/libisis/applications/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
each instrument has a named directory where there are instrument specific scripts used to define default values and files which are used to set up and populate the [[IXTrunfile]] object.&lt;br /&gt;
&lt;br /&gt;
== Overriding instrument specific population ==&lt;br /&gt;
&lt;br /&gt;
In the case where there is incorrect information in the rawfile which has been generated we can populate detector and spectra information from a nexus file. [[Overriding_and_setting_default_values_for_homer_processes#Creating populated nexus files|Creating populated nexus files]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example the specific MERLIN population information is contained in the file &lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;setup_merlin_data_source.m&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This file defines the nexus files which are required for population of the [[IXTrunfile]] object which in turn the .spe file is produced from. &lt;br /&gt;
&lt;br /&gt;
To define files used to populate the [[IXTdetector]] and [[IXTspectra]] objects from the we can add the following two lines to this file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DSO=add_item(DSO,&amp;#039;inst_nxs:::merlin_detector.nxs&amp;#039;,&amp;#039;detector&amp;#039;);&lt;br /&gt;
DSO=add_item(DSO,&amp;#039;inst_nxs:::merlin_spectra.nxs&amp;#039;,&amp;#039;spectra&amp;#039;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These files are not distributed with libisis package as they can change. the &amp;#039;inst_nxs:::&amp;#039; path is a standard definition which is specified in the &amp;lt;tt&amp;gt;inst_defs.m&amp;lt;/tt&amp;gt; file or &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Creating populated nexus files ==&lt;br /&gt;
populate an IXTrunfile from a rawfile containing the correct values and enough detectors to include all those used by the mapping you have chosen - ie if you have an [[IXTrunfile]] which has been populated by the &amp;#039;mon&amp;#039; command then it will not contain enough detector information.&lt;br /&gt;
then you make the matlab command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; write_nxs(your_runfile.inst.detector,&amp;#039;mydetectorfile.nxs&amp;#039;)&lt;br /&gt;
&amp;gt;&amp;gt; write_nxs(your_runfile.inst.spectra,&amp;#039;myspectrafile.nxs&amp;#039;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
these files can then be used in the lines above to populate the [[IXTrunfile]] object provided thety are placed in the inst_nxs::: path&lt;/div&gt;</summary>
		<author><name>Dickon Champion</name></author>
	</entry>
	<entry>
		<id>http://libisis.org/index.php?title=Overriding_and_setting_default_values_for_homer_processes&amp;diff=2543</id>
		<title>Overriding and setting default values for homer processes</title>
		<link rel="alternate" type="text/html" href="http://libisis.org/index.php?title=Overriding_and_setting_default_values_for_homer_processes&amp;diff=2543"/>
		<updated>2008-07-04T10:03:00Z</updated>

		<summary type="html">&lt;p&gt;Dickon Champion: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Where are the defaults specified ==&lt;br /&gt;
&lt;br /&gt;
the homer distribution files are contained in&lt;br /&gt;
&lt;br /&gt;
on a [[Download_and_setup_LIBISIS|windows distribution]]&lt;br /&gt;
&amp;lt;tt&amp;gt;/your_libisis_directory/matlab&amp;lt;tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
on a linux rpm installation:&lt;br /&gt;
&amp;lt;tt&amp;gt;/usr/local/libisis/applications/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
in the svn repository:&lt;br /&gt;
&amp;lt;tt&amp;gt;/libisis/applications/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
each instrument has a directory where there are instrument specific scripts used to define default values and files which are used to set up and populate the [[IXTrunfile]] object.&lt;br /&gt;
&lt;br /&gt;
== overriding instrument specific population ==&lt;br /&gt;
&lt;br /&gt;
in the case where there is incorrect information in the rawfile which has been generated we can populate detector and spectra information from a nexus file. [[Overriding_and_setting_default_values_for_homer_processes#Creating populated nexus files]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
the specific MERLIN population information is contained in the file &lt;br /&gt;
&lt;br /&gt;
setup_merlin_data_source.m&lt;br /&gt;
&lt;br /&gt;
this defines the nexus files which are required for population of the IXTrunfile object which in turn the .spe file is produced from. i added the following two lines to this file, with these lines present the libisis system will try and load the IXTdetector and IXTspectra object from these files. &lt;br /&gt;
&lt;br /&gt;
DSO=add_item(DSO,&amp;#039;inst_nxs:::merlin_detector.nxs&amp;#039;,&amp;#039;detector&amp;#039;);&lt;br /&gt;
DSO=add_item(DSO,&amp;#039;inst_nxs:::merlin_spectra.nxs&amp;#039;,&amp;#039;spectra&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
these files are not distributed with libisis package as they can change. the &amp;#039;inst_nxs:::&amp;#039; path is a standard definition which is specified in the inst_defs.m file&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Creating populated nexus files ==&lt;/div&gt;</summary>
		<author><name>Dickon Champion</name></author>
	</entry>
	<entry>
		<id>http://libisis.org/index.php?title=Overriding_and_setting_default_values_for_homer_processes&amp;diff=2542</id>
		<title>Overriding and setting default values for homer processes</title>
		<link rel="alternate" type="text/html" href="http://libisis.org/index.php?title=Overriding_and_setting_default_values_for_homer_processes&amp;diff=2542"/>
		<updated>2008-07-04T09:55:47Z</updated>

		<summary type="html">&lt;p&gt;Dickon Champion: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== overriding instrument specific population ==&lt;br /&gt;
&lt;br /&gt;
the homer distribution files are contained in&lt;br /&gt;
&lt;br /&gt;
on a [[Download_and_setup_LIBISIS|windows distribution]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
on a linux system:&lt;br /&gt;
&amp;lt;tt&amp;gt;/my_libisis_directory/applications/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
in the svn repository:&lt;br /&gt;
&amp;lt;tt&amp;gt;/libisis/applications/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
there are instrument specific files used to set up  &lt;br /&gt;
&lt;br /&gt;
in the case where there is incorrect information in the rawfile which has been generated we can populate detector and spectra information from a nexus file. Of course creation of this file is another issue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
the specific MERLIN population information is contained in the file &lt;br /&gt;
&lt;br /&gt;
setup_merlin_data_source.m&lt;br /&gt;
&lt;br /&gt;
this defines the nexus files which are required for population of the IXTrunfile object which in turn the .spe file is produced from. i added the following two lines to this file, with these lines present the libisis system will try and load the IXTdetector and IXTspectra object from these files. &lt;br /&gt;
&lt;br /&gt;
DSO=add_item(DSO,&amp;#039;inst_nxs:::merlin_detector.nxs&amp;#039;,&amp;#039;detector&amp;#039;);&lt;br /&gt;
DSO=add_item(DSO,&amp;#039;inst_nxs:::merlin_spectra.nxs&amp;#039;,&amp;#039;spectra&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
these files are not distributed with libisis package as they can change. the &amp;#039;inst_nxs:::&amp;#039; path is a standard definition which is specified in the inst_defs.m file&lt;/div&gt;</summary>
		<author><name>Dickon Champion</name></author>
	</entry>
	<entry>
		<id>http://libisis.org/index.php?title=Overriding_and_setting_default_values_for_homer_processes&amp;diff=2541</id>
		<title>Overriding and setting default values for homer processes</title>
		<link rel="alternate" type="text/html" href="http://libisis.org/index.php?title=Overriding_and_setting_default_values_for_homer_processes&amp;diff=2541"/>
		<updated>2008-07-04T09:54:40Z</updated>

		<summary type="html">&lt;p&gt;Dickon Champion: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== overriding instrument specific population ==&lt;br /&gt;
&lt;br /&gt;
the homer distribution files are contained in&lt;br /&gt;
&lt;br /&gt;
on a windows distribution&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
on a linux system:&lt;br /&gt;
&amp;lt;tt&amp;gt;/my_libisis_directory/applications/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
in the svn repository:&lt;br /&gt;
&amp;lt;tt&amp;gt;/libisis/applications/matlab/&lt;br /&gt;
&lt;br /&gt;
there are instrument specific files used to set up  &lt;br /&gt;
&lt;br /&gt;
in the case where there is incorrect information in the rawfile which has been generated we can populate detector and spectra information from a nexus file. Of course creation of this file is another issue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
the specific MERLIN population information is contained in the file &lt;br /&gt;
&lt;br /&gt;
setup_merlin_data_source.m&lt;br /&gt;
&lt;br /&gt;
this defines the nexus files which are required for population of the IXTrunfile object which in turn the .spe file is produced from. i added the following two lines to this file, with these lines present the libisis system will try and load the IXTdetector and IXTspectra object from these files. &lt;br /&gt;
&lt;br /&gt;
DSO=add_item(DSO,&amp;#039;inst_nxs:::merlin_detector.nxs&amp;#039;,&amp;#039;detector&amp;#039;);&lt;br /&gt;
DSO=add_item(DSO,&amp;#039;inst_nxs:::merlin_spectra.nxs&amp;#039;,&amp;#039;spectra&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
these files are not distributed with libisis package as they can change. the &amp;#039;inst_nxs:::&amp;#039; path is a standard definition which is specified in the inst_defs.m file&lt;/div&gt;</summary>
		<author><name>Dickon Champion</name></author>
	</entry>
	<entry>
		<id>http://libisis.org/index.php?title=Overriding_and_setting_default_values_for_homer_processes&amp;diff=2540</id>
		<title>Overriding and setting default values for homer processes</title>
		<link rel="alternate" type="text/html" href="http://libisis.org/index.php?title=Overriding_and_setting_default_values_for_homer_processes&amp;diff=2540"/>
		<updated>2008-07-04T09:49:17Z</updated>

		<summary type="html">&lt;p&gt;Dickon Champion: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== overriding instrument specific population ==&lt;br /&gt;
&lt;br /&gt;
the homer distribution files are contained in&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;/usr/local/libisis/applications/matlab/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
there are specific files used to set up the MERLIN instrument in the MERLIN directory &lt;br /&gt;
&lt;br /&gt;
in the case where there is incorrect information in the rawfile which has been generated we can populate detector and spectra information from a nexus file. Of course creation of this file is another issue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
the specific MERLIN population information is contained in the file &lt;br /&gt;
&lt;br /&gt;
setup_merlin_data_source.m&lt;br /&gt;
&lt;br /&gt;
this defines the nexus files which are required for population of the IXTrunfile object which in turn the .spe file is produced from. i added the following two lines to this file, with these lines present the libisis system will try and load the IXTdetector and IXTspectra object from these files. &lt;br /&gt;
&lt;br /&gt;
DSO=add_item(DSO,&amp;#039;inst_nxs:::merlin_detector.nxs&amp;#039;,&amp;#039;detector&amp;#039;);&lt;br /&gt;
DSO=add_item(DSO,&amp;#039;inst_nxs:::merlin_spectra.nxs&amp;#039;,&amp;#039;spectra&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
these files are not distributed with libisis package as they can change. the &amp;#039;inst_nxs:::&amp;#039; path is a standard definition which is specified in the inst_defs.m file&lt;/div&gt;</summary>
		<author><name>Dickon Champion</name></author>
	</entry>
	<entry>
		<id>http://libisis.org/index.php?title=Overriding_and_setting_default_values_for_homer_processes&amp;diff=2539</id>
		<title>Overriding and setting default values for homer processes</title>
		<link rel="alternate" type="text/html" href="http://libisis.org/index.php?title=Overriding_and_setting_default_values_for_homer_processes&amp;diff=2539"/>
		<updated>2008-07-04T09:11:33Z</updated>

		<summary type="html">&lt;p&gt;Dickon Champion: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;last cycle when you started creating files with the wrong monitor distances i put a fix in the mordred homer files&lt;br /&gt;
&lt;br /&gt;
the homer distribution files are contained in&lt;br /&gt;
&lt;br /&gt;
/usr/local/libisis/applications/matlab/&lt;br /&gt;
&lt;br /&gt;
there are specific files used to set up the MERLIN instrument in the MERLIN directory &lt;br /&gt;
&lt;br /&gt;
in the case where there is incorrect information in the rawfile which has been generated we can populate detector and spectra information from a nexus file. Of course creation of this file is another issue.&lt;/div&gt;</summary>
		<author><name>Dickon Champion</name></author>
	</entry>
	<entry>
		<id>http://libisis.org/index.php?title=Using_Homer_and_Getting_Started&amp;diff=2538</id>
		<title>Using Homer and Getting Started</title>
		<link rel="alternate" type="text/html" href="http://libisis.org/index.php?title=Using_Homer_and_Getting_Started&amp;diff=2538"/>
		<updated>2008-07-04T09:11:17Z</updated>

		<summary type="html">&lt;p&gt;Dickon Champion: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[Getting Started]] &amp;#039;&amp;#039;&amp;#039;VERY IMPORTANT&amp;#039;&amp;#039;&amp;#039; setup details defined&lt;br /&gt;
&lt;br /&gt;
* [[Homer GUI]] - mini tutorial with screenshots&lt;br /&gt;
&lt;br /&gt;
*[[Scripting Homer Functions]] are easy to use functions which call homer related functions underneath, as well as setting up the [[IXTdata_source]] object for use by homer&lt;br /&gt;
&lt;br /&gt;
* [[Overriding and setting default values for homer processes]]&lt;br /&gt;
&lt;br /&gt;
*[[Homer and mgenie style functions]] Direct calls to homer and some mgenie style functions&lt;br /&gt;
&lt;br /&gt;
*[[Homer Utilities]] extra functions and utilities&lt;br /&gt;
&lt;br /&gt;
*[[IXTrunfile operations]] including algebra, elementary functions and other manipulations&lt;br /&gt;
&lt;br /&gt;
*[[diagnose]] diagnostic function for homer input&lt;br /&gt;
&lt;br /&gt;
*[[Example Scripts]]&lt;/div&gt;</summary>
		<author><name>Dickon Champion</name></author>
	</entry>
	<entry>
		<id>http://libisis.org/index.php?title=Using_Homer_and_Getting_Started&amp;diff=2537</id>
		<title>Using Homer and Getting Started</title>
		<link rel="alternate" type="text/html" href="http://libisis.org/index.php?title=Using_Homer_and_Getting_Started&amp;diff=2537"/>
		<updated>2008-07-02T12:34:22Z</updated>

		<summary type="html">&lt;p&gt;Dickon Champion: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[Getting Started]] &amp;#039;&amp;#039;&amp;#039;VERY IMPORTANT&amp;#039;&amp;#039;&amp;#039; setup details defined&lt;br /&gt;
&lt;br /&gt;
* [[Homer GUI]] - mini tutorial with screenshots&lt;br /&gt;
&lt;br /&gt;
*[[Scripting Homer Functions]] are easy to use functions which call homer related functions underneath, as well as setting up the [[IXTdata_source]] object for use by homer&lt;br /&gt;
&lt;br /&gt;
*[[Homer and mgenie style functions]] Direct calls to homer and some mgenie style functions&lt;br /&gt;
&lt;br /&gt;
*[[Homer Utilities]] extra functions and utilities&lt;br /&gt;
&lt;br /&gt;
*[[IXTrunfile operations]] including algebra, elementary functions and other manipulations&lt;br /&gt;
&lt;br /&gt;
*[[diagnose]] diagnostic function for homer input&lt;br /&gt;
&lt;br /&gt;
*[[Example Scripts]]&lt;/div&gt;</summary>
		<author><name>Dickon Champion</name></author>
	</entry>
	<entry>
		<id>http://libisis.org/index.php?title=Homer_Utilities&amp;diff=2536</id>
		<title>Homer Utilities</title>
		<link rel="alternate" type="text/html" href="http://libisis.org/index.php?title=Homer_Utilities&amp;diff=2536"/>
		<updated>2008-07-01T16:40:15Z</updated>

		<summary type="html">&lt;p&gt;Dickon Champion: /* gget */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== gget == &lt;br /&gt;
generic raw file access&lt;br /&gt;
&lt;br /&gt;
it is possible at the matlab comand line to extract any variable from the rawfile by making a call to a populated [[IXTraw_file]] object.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; rawfile=IXTraw_file(&amp;#039;/path/to/my/file.raw&amp;#039;)&lt;br /&gt;
&amp;gt;&amp;gt; value=gget(rawfile,&amp;#039;FIELD&amp;#039;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== dae access ==&lt;br /&gt;
&lt;br /&gt;
it is possible to access the data in the DAE&lt;br /&gt;
&lt;br /&gt;
== head and mhead ==&lt;br /&gt;
&lt;br /&gt;
head() returns the header information for the raw file defined by the run_number, or the path to a defined raw file. Multiple run numbers can be combined together with limited practical use.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt;  head(run_number)&lt;br /&gt;
&amp;gt;&amp;gt;  head(path_to_raw_file)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;run_number&amp;lt;/tt&amp;gt; can be defined in the following ways&lt;br /&gt;
#  a numerical array of numbers &amp;lt;tt&amp;gt; [12345  45673 34436]&amp;lt;/tt&amp;gt; or a single numeric&lt;br /&gt;
# an array of strings &amp;lt;tt&amp;gt;char(&amp;#039;12345&amp;#039; &amp;#039;45673&amp;#039; &amp;#039;34436&amp;#039;)&amp;lt;/tt&amp;gt; or a single  string&lt;br /&gt;
# a cell array of strings &amp;lt;tt&amp;gt;{&amp;#039;12345&amp;#039; &amp;#039;45673&amp;#039; &amp;#039;34436&amp;#039;}&amp;lt;/tt&amp;gt;&lt;br /&gt;
# a cell array of numerics &amp;lt;tt&amp;gt;{12345  45673 34436}&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;path_to_raw_file&amp;lt;/tt&amp;gt; is defined as a string or a cell array of strings of the form &amp;lt;tt&amp;gt;&amp;#039;C:\data\myfile.raw&amp;#039;&amp;lt;/tt&amp;gt;, relative paths are also possible as well as using the [[Global IXTpath objects]] &amp;lt;tt&amp;gt;&amp;#039;inst_data:::myfile.raw&amp;#039;&amp;lt;/tt&amp;gt; provided they have been set properly in the [[Instrument setup]]&lt;br /&gt;
&lt;br /&gt;
mhead() returns the header information for each raw file defined by an &amp;#039;&amp;#039;&amp;#039;array&amp;#039;&amp;#039;&amp;#039; of run numbers, or an &amp;#039;&amp;#039;&amp;#039;array&amp;#039;&amp;#039;&amp;#039; of paths to a raw file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt;  mhead(run_numbers)&lt;br /&gt;
&amp;gt;&amp;gt;  mhead(paths_to_raw_files)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;run_numbers&amp;lt;/tt&amp;gt; can be defined in the following ways&lt;br /&gt;
#  a numerical array of numbers &amp;lt;tt&amp;gt; [12345  45673 34436]&amp;lt;/tt&amp;gt;&lt;br /&gt;
# an array of strings &amp;lt;tt&amp;gt;char(&amp;#039;12345&amp;#039; &amp;#039;45673&amp;#039; &amp;#039;34436&amp;#039;)&amp;lt;/tt&amp;gt; &lt;br /&gt;
# a cell array of strings &amp;lt;tt&amp;gt;{&amp;#039;12345&amp;#039; &amp;#039;45673&amp;#039; &amp;#039;34436&amp;#039;}&amp;lt;/tt&amp;gt;&lt;br /&gt;
# a cell array of numerics &amp;lt;tt&amp;gt;{12345  45673 34436}&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;paths_to_raw_files&amp;lt;/tt&amp;gt; is defined as a cell or string array of the form &amp;lt;tt&amp;gt;&amp;#039;C:\data\myfile.raw&amp;#039;&amp;lt;/tt&amp;gt;,  relative paths are also possible as well as using the [[Global IXTpath objects]] &amp;lt;tt&amp;gt;&amp;#039;inst_data:::myfile.raw&amp;#039;&amp;lt;/tt&amp;gt; provided they have been set properly in the [[Instrument setup]]&lt;br /&gt;
&lt;br /&gt;
== get_ei and mget_ei ==&lt;br /&gt;
get_ei() returns the energy of given a monochromatic run number, a guide energy can optionally be provided to focus the search for a monitor peak. It also optionally returns a structure containing the peak position, area and normalised area of the two monitors used to determine the energy.  Multiple run numbers may be combined.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt;  [ei,props]=get_ei(run_number,ei_guess)&lt;br /&gt;
&amp;gt;&amp;gt;  [ei,props]=get_ei(path_to_raw_file,ei_guess)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;run_number&amp;lt;/tt&amp;gt; can be defined in the following ways&lt;br /&gt;
#  a numerical array of numbers &amp;lt;tt&amp;gt; [12345  45673 34436]&amp;lt;/tt&amp;gt; or a single numeric&lt;br /&gt;
# an array of strings &amp;lt;tt&amp;gt;char(&amp;#039;12345&amp;#039; &amp;#039;45673&amp;#039; &amp;#039;34436&amp;#039;)&amp;lt;/tt&amp;gt; or a single  string&lt;br /&gt;
# a cell array of strings &amp;lt;tt&amp;gt;{&amp;#039;12345&amp;#039; &amp;#039;45673&amp;#039; &amp;#039;34436&amp;#039;}&amp;lt;/tt&amp;gt;&lt;br /&gt;
# a cell array of numerics &amp;lt;tt&amp;gt;{12345  45673 34436}&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;path_to_raw_file&amp;lt;/tt&amp;gt; is defined as a string or a cell array of strings of the form &amp;lt;tt&amp;gt;&amp;#039;C:\data\myfile.raw&amp;#039;&amp;lt;/tt&amp;gt;, relative paths are also possible as well as using the [[Global IXTpath objects]] &amp;lt;tt&amp;gt;&amp;#039;inst_data:::myfile.raw&amp;#039;&amp;lt;/tt&amp;gt; provided they have been set properly in the [[Instrument setup]]&lt;br /&gt;
* ei_guess is a single numeric value containing the starting ei for get_ei to use in its calculation&lt;br /&gt;
&lt;br /&gt;
mget_ei()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt;  [ei,props]=mget_ei(run_numbers,ei_guesses)&lt;br /&gt;
&amp;gt;&amp;gt;  [ei,props]=mget_ei(path_to_raw_file,ei_guesses)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;run_numbers&amp;lt;/tt&amp;gt; can be defined in the following ways&lt;br /&gt;
#  a numerical array of numbers &amp;lt;tt&amp;gt; [12345  45673 34436]&amp;lt;/tt&amp;gt;&lt;br /&gt;
# an array of strings &amp;lt;tt&amp;gt;char(&amp;#039;12345&amp;#039; &amp;#039;45673&amp;#039; &amp;#039;34436&amp;#039;)&amp;lt;/tt&amp;gt; &lt;br /&gt;
# a cell array of strings &amp;lt;tt&amp;gt;{&amp;#039;12345&amp;#039; &amp;#039;45673&amp;#039; &amp;#039;34436&amp;#039;}&amp;lt;/tt&amp;gt;&lt;br /&gt;
# a cell array of numerics &amp;lt;tt&amp;gt;{12345  45673 34436}&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;paths_to_raw_files&amp;lt;/tt&amp;gt; is defined as a cell or string array of the form &amp;lt;tt&amp;gt;&amp;#039;C:\data\myfile.raw&amp;#039;&amp;lt;/tt&amp;gt;,  relative paths are also possible as well as using the [[Global IXTpath objects]] &amp;lt;tt&amp;gt;&amp;#039;inst_data:::myfile.raw&amp;#039;&amp;lt;/tt&amp;gt; provided they have been set properly in the [[Instrument setup]]&lt;br /&gt;
*ei_guesses must be a numerical array equal to the number of run_numbers, containing the starting ei for mget_ei to use in the energy calculation for each run&lt;/div&gt;</summary>
		<author><name>Dickon Champion</name></author>
	</entry>
	<entry>
		<id>http://libisis.org/index.php?title=Homer_Utilities&amp;diff=2535</id>
		<title>Homer Utilities</title>
		<link rel="alternate" type="text/html" href="http://libisis.org/index.php?title=Homer_Utilities&amp;diff=2535"/>
		<updated>2008-07-01T16:29:27Z</updated>

		<summary type="html">&lt;p&gt;Dickon Champion: /* gget */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== gget == &lt;br /&gt;
generic raw file access&lt;br /&gt;
&lt;br /&gt;
it is possible at the matlab comand line to extract any variable from the rawfile by making a call to a populated [[IXTrawfile]] object.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; rawfile=IXTraw_file(&amp;#039;/path/to/my/file.raw&amp;#039;)&lt;br /&gt;
&amp;gt;&amp;gt; value=gget(rawfile,&amp;#039;FIELD&amp;#039;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== dae access ==&lt;br /&gt;
&lt;br /&gt;
it is possible to access the data in the DAE&lt;br /&gt;
&lt;br /&gt;
== head and mhead ==&lt;br /&gt;
&lt;br /&gt;
head() returns the header information for the raw file defined by the run_number, or the path to a defined raw file. Multiple run numbers can be combined together with limited practical use.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt;  head(run_number)&lt;br /&gt;
&amp;gt;&amp;gt;  head(path_to_raw_file)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;run_number&amp;lt;/tt&amp;gt; can be defined in the following ways&lt;br /&gt;
#  a numerical array of numbers &amp;lt;tt&amp;gt; [12345  45673 34436]&amp;lt;/tt&amp;gt; or a single numeric&lt;br /&gt;
# an array of strings &amp;lt;tt&amp;gt;char(&amp;#039;12345&amp;#039; &amp;#039;45673&amp;#039; &amp;#039;34436&amp;#039;)&amp;lt;/tt&amp;gt; or a single  string&lt;br /&gt;
# a cell array of strings &amp;lt;tt&amp;gt;{&amp;#039;12345&amp;#039; &amp;#039;45673&amp;#039; &amp;#039;34436&amp;#039;}&amp;lt;/tt&amp;gt;&lt;br /&gt;
# a cell array of numerics &amp;lt;tt&amp;gt;{12345  45673 34436}&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;path_to_raw_file&amp;lt;/tt&amp;gt; is defined as a string or a cell array of strings of the form &amp;lt;tt&amp;gt;&amp;#039;C:\data\myfile.raw&amp;#039;&amp;lt;/tt&amp;gt;, relative paths are also possible as well as using the [[Global IXTpath objects]] &amp;lt;tt&amp;gt;&amp;#039;inst_data:::myfile.raw&amp;#039;&amp;lt;/tt&amp;gt; provided they have been set properly in the [[Instrument setup]]&lt;br /&gt;
&lt;br /&gt;
mhead() returns the header information for each raw file defined by an &amp;#039;&amp;#039;&amp;#039;array&amp;#039;&amp;#039;&amp;#039; of run numbers, or an &amp;#039;&amp;#039;&amp;#039;array&amp;#039;&amp;#039;&amp;#039; of paths to a raw file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt;  mhead(run_numbers)&lt;br /&gt;
&amp;gt;&amp;gt;  mhead(paths_to_raw_files)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;run_numbers&amp;lt;/tt&amp;gt; can be defined in the following ways&lt;br /&gt;
#  a numerical array of numbers &amp;lt;tt&amp;gt; [12345  45673 34436]&amp;lt;/tt&amp;gt;&lt;br /&gt;
# an array of strings &amp;lt;tt&amp;gt;char(&amp;#039;12345&amp;#039; &amp;#039;45673&amp;#039; &amp;#039;34436&amp;#039;)&amp;lt;/tt&amp;gt; &lt;br /&gt;
# a cell array of strings &amp;lt;tt&amp;gt;{&amp;#039;12345&amp;#039; &amp;#039;45673&amp;#039; &amp;#039;34436&amp;#039;}&amp;lt;/tt&amp;gt;&lt;br /&gt;
# a cell array of numerics &amp;lt;tt&amp;gt;{12345  45673 34436}&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;paths_to_raw_files&amp;lt;/tt&amp;gt; is defined as a cell or string array of the form &amp;lt;tt&amp;gt;&amp;#039;C:\data\myfile.raw&amp;#039;&amp;lt;/tt&amp;gt;,  relative paths are also possible as well as using the [[Global IXTpath objects]] &amp;lt;tt&amp;gt;&amp;#039;inst_data:::myfile.raw&amp;#039;&amp;lt;/tt&amp;gt; provided they have been set properly in the [[Instrument setup]]&lt;br /&gt;
&lt;br /&gt;
== get_ei and mget_ei ==&lt;br /&gt;
get_ei() returns the energy of given a monochromatic run number, a guide energy can optionally be provided to focus the search for a monitor peak. It also optionally returns a structure containing the peak position, area and normalised area of the two monitors used to determine the energy.  Multiple run numbers may be combined.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt;  [ei,props]=get_ei(run_number,ei_guess)&lt;br /&gt;
&amp;gt;&amp;gt;  [ei,props]=get_ei(path_to_raw_file,ei_guess)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;run_number&amp;lt;/tt&amp;gt; can be defined in the following ways&lt;br /&gt;
#  a numerical array of numbers &amp;lt;tt&amp;gt; [12345  45673 34436]&amp;lt;/tt&amp;gt; or a single numeric&lt;br /&gt;
# an array of strings &amp;lt;tt&amp;gt;char(&amp;#039;12345&amp;#039; &amp;#039;45673&amp;#039; &amp;#039;34436&amp;#039;)&amp;lt;/tt&amp;gt; or a single  string&lt;br /&gt;
# a cell array of strings &amp;lt;tt&amp;gt;{&amp;#039;12345&amp;#039; &amp;#039;45673&amp;#039; &amp;#039;34436&amp;#039;}&amp;lt;/tt&amp;gt;&lt;br /&gt;
# a cell array of numerics &amp;lt;tt&amp;gt;{12345  45673 34436}&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;path_to_raw_file&amp;lt;/tt&amp;gt; is defined as a string or a cell array of strings of the form &amp;lt;tt&amp;gt;&amp;#039;C:\data\myfile.raw&amp;#039;&amp;lt;/tt&amp;gt;, relative paths are also possible as well as using the [[Global IXTpath objects]] &amp;lt;tt&amp;gt;&amp;#039;inst_data:::myfile.raw&amp;#039;&amp;lt;/tt&amp;gt; provided they have been set properly in the [[Instrument setup]]&lt;br /&gt;
* ei_guess is a single numeric value containing the starting ei for get_ei to use in its calculation&lt;br /&gt;
&lt;br /&gt;
mget_ei()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt;  [ei,props]=mget_ei(run_numbers,ei_guesses)&lt;br /&gt;
&amp;gt;&amp;gt;  [ei,props]=mget_ei(path_to_raw_file,ei_guesses)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;run_numbers&amp;lt;/tt&amp;gt; can be defined in the following ways&lt;br /&gt;
#  a numerical array of numbers &amp;lt;tt&amp;gt; [12345  45673 34436]&amp;lt;/tt&amp;gt;&lt;br /&gt;
# an array of strings &amp;lt;tt&amp;gt;char(&amp;#039;12345&amp;#039; &amp;#039;45673&amp;#039; &amp;#039;34436&amp;#039;)&amp;lt;/tt&amp;gt; &lt;br /&gt;
# a cell array of strings &amp;lt;tt&amp;gt;{&amp;#039;12345&amp;#039; &amp;#039;45673&amp;#039; &amp;#039;34436&amp;#039;}&amp;lt;/tt&amp;gt;&lt;br /&gt;
# a cell array of numerics &amp;lt;tt&amp;gt;{12345  45673 34436}&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;paths_to_raw_files&amp;lt;/tt&amp;gt; is defined as a cell or string array of the form &amp;lt;tt&amp;gt;&amp;#039;C:\data\myfile.raw&amp;#039;&amp;lt;/tt&amp;gt;,  relative paths are also possible as well as using the [[Global IXTpath objects]] &amp;lt;tt&amp;gt;&amp;#039;inst_data:::myfile.raw&amp;#039;&amp;lt;/tt&amp;gt; provided they have been set properly in the [[Instrument setup]]&lt;br /&gt;
*ei_guesses must be a numerical array equal to the number of run_numbers, containing the starting ei for mget_ei to use in the energy calculation for each run&lt;/div&gt;</summary>
		<author><name>Dickon Champion</name></author>
	</entry>
	<entry>
		<id>http://libisis.org/index.php?title=Homer_Utilities&amp;diff=2534</id>
		<title>Homer Utilities</title>
		<link rel="alternate" type="text/html" href="http://libisis.org/index.php?title=Homer_Utilities&amp;diff=2534"/>
		<updated>2008-07-01T16:26:20Z</updated>

		<summary type="html">&lt;p&gt;Dickon Champion: /* gget */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== gget == &lt;br /&gt;
generic raw file access&lt;br /&gt;
&lt;br /&gt;
it is possible at the matlab comand line to extract &lt;br /&gt;
&lt;br /&gt;
== dae access ==&lt;br /&gt;
&lt;br /&gt;
it is possible to access the data in the DAE&lt;br /&gt;
&lt;br /&gt;
== head and mhead ==&lt;br /&gt;
&lt;br /&gt;
head() returns the header information for the raw file defined by the run_number, or the path to a defined raw file. Multiple run numbers can be combined together with limited practical use.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt;  head(run_number)&lt;br /&gt;
&amp;gt;&amp;gt;  head(path_to_raw_file)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;run_number&amp;lt;/tt&amp;gt; can be defined in the following ways&lt;br /&gt;
#  a numerical array of numbers &amp;lt;tt&amp;gt; [12345  45673 34436]&amp;lt;/tt&amp;gt; or a single numeric&lt;br /&gt;
# an array of strings &amp;lt;tt&amp;gt;char(&amp;#039;12345&amp;#039; &amp;#039;45673&amp;#039; &amp;#039;34436&amp;#039;)&amp;lt;/tt&amp;gt; or a single  string&lt;br /&gt;
# a cell array of strings &amp;lt;tt&amp;gt;{&amp;#039;12345&amp;#039; &amp;#039;45673&amp;#039; &amp;#039;34436&amp;#039;}&amp;lt;/tt&amp;gt;&lt;br /&gt;
# a cell array of numerics &amp;lt;tt&amp;gt;{12345  45673 34436}&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;path_to_raw_file&amp;lt;/tt&amp;gt; is defined as a string or a cell array of strings of the form &amp;lt;tt&amp;gt;&amp;#039;C:\data\myfile.raw&amp;#039;&amp;lt;/tt&amp;gt;, relative paths are also possible as well as using the [[Global IXTpath objects]] &amp;lt;tt&amp;gt;&amp;#039;inst_data:::myfile.raw&amp;#039;&amp;lt;/tt&amp;gt; provided they have been set properly in the [[Instrument setup]]&lt;br /&gt;
&lt;br /&gt;
mhead() returns the header information for each raw file defined by an &amp;#039;&amp;#039;&amp;#039;array&amp;#039;&amp;#039;&amp;#039; of run numbers, or an &amp;#039;&amp;#039;&amp;#039;array&amp;#039;&amp;#039;&amp;#039; of paths to a raw file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt;  mhead(run_numbers)&lt;br /&gt;
&amp;gt;&amp;gt;  mhead(paths_to_raw_files)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;run_numbers&amp;lt;/tt&amp;gt; can be defined in the following ways&lt;br /&gt;
#  a numerical array of numbers &amp;lt;tt&amp;gt; [12345  45673 34436]&amp;lt;/tt&amp;gt;&lt;br /&gt;
# an array of strings &amp;lt;tt&amp;gt;char(&amp;#039;12345&amp;#039; &amp;#039;45673&amp;#039; &amp;#039;34436&amp;#039;)&amp;lt;/tt&amp;gt; &lt;br /&gt;
# a cell array of strings &amp;lt;tt&amp;gt;{&amp;#039;12345&amp;#039; &amp;#039;45673&amp;#039; &amp;#039;34436&amp;#039;}&amp;lt;/tt&amp;gt;&lt;br /&gt;
# a cell array of numerics &amp;lt;tt&amp;gt;{12345  45673 34436}&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;paths_to_raw_files&amp;lt;/tt&amp;gt; is defined as a cell or string array of the form &amp;lt;tt&amp;gt;&amp;#039;C:\data\myfile.raw&amp;#039;&amp;lt;/tt&amp;gt;,  relative paths are also possible as well as using the [[Global IXTpath objects]] &amp;lt;tt&amp;gt;&amp;#039;inst_data:::myfile.raw&amp;#039;&amp;lt;/tt&amp;gt; provided they have been set properly in the [[Instrument setup]]&lt;br /&gt;
&lt;br /&gt;
== get_ei and mget_ei ==&lt;br /&gt;
get_ei() returns the energy of given a monochromatic run number, a guide energy can optionally be provided to focus the search for a monitor peak. It also optionally returns a structure containing the peak position, area and normalised area of the two monitors used to determine the energy.  Multiple run numbers may be combined.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt;  [ei,props]=get_ei(run_number,ei_guess)&lt;br /&gt;
&amp;gt;&amp;gt;  [ei,props]=get_ei(path_to_raw_file,ei_guess)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;run_number&amp;lt;/tt&amp;gt; can be defined in the following ways&lt;br /&gt;
#  a numerical array of numbers &amp;lt;tt&amp;gt; [12345  45673 34436]&amp;lt;/tt&amp;gt; or a single numeric&lt;br /&gt;
# an array of strings &amp;lt;tt&amp;gt;char(&amp;#039;12345&amp;#039; &amp;#039;45673&amp;#039; &amp;#039;34436&amp;#039;)&amp;lt;/tt&amp;gt; or a single  string&lt;br /&gt;
# a cell array of strings &amp;lt;tt&amp;gt;{&amp;#039;12345&amp;#039; &amp;#039;45673&amp;#039; &amp;#039;34436&amp;#039;}&amp;lt;/tt&amp;gt;&lt;br /&gt;
# a cell array of numerics &amp;lt;tt&amp;gt;{12345  45673 34436}&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;path_to_raw_file&amp;lt;/tt&amp;gt; is defined as a string or a cell array of strings of the form &amp;lt;tt&amp;gt;&amp;#039;C:\data\myfile.raw&amp;#039;&amp;lt;/tt&amp;gt;, relative paths are also possible as well as using the [[Global IXTpath objects]] &amp;lt;tt&amp;gt;&amp;#039;inst_data:::myfile.raw&amp;#039;&amp;lt;/tt&amp;gt; provided they have been set properly in the [[Instrument setup]]&lt;br /&gt;
* ei_guess is a single numeric value containing the starting ei for get_ei to use in its calculation&lt;br /&gt;
&lt;br /&gt;
mget_ei()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt;  [ei,props]=mget_ei(run_numbers,ei_guesses)&lt;br /&gt;
&amp;gt;&amp;gt;  [ei,props]=mget_ei(path_to_raw_file,ei_guesses)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;run_numbers&amp;lt;/tt&amp;gt; can be defined in the following ways&lt;br /&gt;
#  a numerical array of numbers &amp;lt;tt&amp;gt; [12345  45673 34436]&amp;lt;/tt&amp;gt;&lt;br /&gt;
# an array of strings &amp;lt;tt&amp;gt;char(&amp;#039;12345&amp;#039; &amp;#039;45673&amp;#039; &amp;#039;34436&amp;#039;)&amp;lt;/tt&amp;gt; &lt;br /&gt;
# a cell array of strings &amp;lt;tt&amp;gt;{&amp;#039;12345&amp;#039; &amp;#039;45673&amp;#039; &amp;#039;34436&amp;#039;}&amp;lt;/tt&amp;gt;&lt;br /&gt;
# a cell array of numerics &amp;lt;tt&amp;gt;{12345  45673 34436}&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;paths_to_raw_files&amp;lt;/tt&amp;gt; is defined as a cell or string array of the form &amp;lt;tt&amp;gt;&amp;#039;C:\data\myfile.raw&amp;#039;&amp;lt;/tt&amp;gt;,  relative paths are also possible as well as using the [[Global IXTpath objects]] &amp;lt;tt&amp;gt;&amp;#039;inst_data:::myfile.raw&amp;#039;&amp;lt;/tt&amp;gt; provided they have been set properly in the [[Instrument setup]]&lt;br /&gt;
*ei_guesses must be a numerical array equal to the number of run_numbers, containing the starting ei for mget_ei to use in the energy calculation for each run&lt;/div&gt;</summary>
		<author><name>Dickon Champion</name></author>
	</entry>
	<entry>
		<id>http://libisis.org/index.php?title=Homer_Utilities&amp;diff=2533</id>
		<title>Homer Utilities</title>
		<link rel="alternate" type="text/html" href="http://libisis.org/index.php?title=Homer_Utilities&amp;diff=2533"/>
		<updated>2008-07-01T16:07:41Z</updated>

		<summary type="html">&lt;p&gt;Dickon Champion: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== gget == &lt;br /&gt;
generic raw file access&lt;br /&gt;
&lt;br /&gt;
== head and mhead ==&lt;br /&gt;
&lt;br /&gt;
head() returns the header information for the raw file defined by the run_number, or the path to a defined raw file. Multiple run numbers can be combined together with limited practical use.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt;  head(run_number)&lt;br /&gt;
&amp;gt;&amp;gt;  head(path_to_raw_file)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;run_number&amp;lt;/tt&amp;gt; can be defined in the following ways&lt;br /&gt;
#  a numerical array of numbers &amp;lt;tt&amp;gt; [12345  45673 34436]&amp;lt;/tt&amp;gt; or a single numeric&lt;br /&gt;
# an array of strings &amp;lt;tt&amp;gt;char(&amp;#039;12345&amp;#039; &amp;#039;45673&amp;#039; &amp;#039;34436&amp;#039;)&amp;lt;/tt&amp;gt; or a single  string&lt;br /&gt;
# a cell array of strings &amp;lt;tt&amp;gt;{&amp;#039;12345&amp;#039; &amp;#039;45673&amp;#039; &amp;#039;34436&amp;#039;}&amp;lt;/tt&amp;gt;&lt;br /&gt;
# a cell array of numerics &amp;lt;tt&amp;gt;{12345  45673 34436}&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;path_to_raw_file&amp;lt;/tt&amp;gt; is defined as a string or a cell array of strings of the form &amp;lt;tt&amp;gt;&amp;#039;C:\data\myfile.raw&amp;#039;&amp;lt;/tt&amp;gt;, relative paths are also possible as well as using the [[Global IXTpath objects]] &amp;lt;tt&amp;gt;&amp;#039;inst_data:::myfile.raw&amp;#039;&amp;lt;/tt&amp;gt; provided they have been set properly in the [[Instrument setup]]&lt;br /&gt;
&lt;br /&gt;
mhead() returns the header information for each raw file defined by an &amp;#039;&amp;#039;&amp;#039;array&amp;#039;&amp;#039;&amp;#039; of run numbers, or an &amp;#039;&amp;#039;&amp;#039;array&amp;#039;&amp;#039;&amp;#039; of paths to a raw file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt;  mhead(run_numbers)&lt;br /&gt;
&amp;gt;&amp;gt;  mhead(paths_to_raw_files)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;run_numbers&amp;lt;/tt&amp;gt; can be defined in the following ways&lt;br /&gt;
#  a numerical array of numbers &amp;lt;tt&amp;gt; [12345  45673 34436]&amp;lt;/tt&amp;gt;&lt;br /&gt;
# an array of strings &amp;lt;tt&amp;gt;char(&amp;#039;12345&amp;#039; &amp;#039;45673&amp;#039; &amp;#039;34436&amp;#039;)&amp;lt;/tt&amp;gt; &lt;br /&gt;
# a cell array of strings &amp;lt;tt&amp;gt;{&amp;#039;12345&amp;#039; &amp;#039;45673&amp;#039; &amp;#039;34436&amp;#039;}&amp;lt;/tt&amp;gt;&lt;br /&gt;
# a cell array of numerics &amp;lt;tt&amp;gt;{12345  45673 34436}&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;paths_to_raw_files&amp;lt;/tt&amp;gt; is defined as a cell or string array of the form &amp;lt;tt&amp;gt;&amp;#039;C:\data\myfile.raw&amp;#039;&amp;lt;/tt&amp;gt;,  relative paths are also possible as well as using the [[Global IXTpath objects]] &amp;lt;tt&amp;gt;&amp;#039;inst_data:::myfile.raw&amp;#039;&amp;lt;/tt&amp;gt; provided they have been set properly in the [[Instrument setup]]&lt;br /&gt;
&lt;br /&gt;
== get_ei and mget_ei ==&lt;br /&gt;
get_ei() returns the energy of given a monochromatic run number, a guide energy can optionally be provided to focus the search for a monitor peak. It also optionally returns a structure containing the peak position, area and normalised area of the two monitors used to determine the energy.  Multiple run numbers may be combined.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt;  [ei,props]=get_ei(run_number,ei_guess)&lt;br /&gt;
&amp;gt;&amp;gt;  [ei,props]=get_ei(path_to_raw_file,ei_guess)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;run_number&amp;lt;/tt&amp;gt; can be defined in the following ways&lt;br /&gt;
#  a numerical array of numbers &amp;lt;tt&amp;gt; [12345  45673 34436]&amp;lt;/tt&amp;gt; or a single numeric&lt;br /&gt;
# an array of strings &amp;lt;tt&amp;gt;char(&amp;#039;12345&amp;#039; &amp;#039;45673&amp;#039; &amp;#039;34436&amp;#039;)&amp;lt;/tt&amp;gt; or a single  string&lt;br /&gt;
# a cell array of strings &amp;lt;tt&amp;gt;{&amp;#039;12345&amp;#039; &amp;#039;45673&amp;#039; &amp;#039;34436&amp;#039;}&amp;lt;/tt&amp;gt;&lt;br /&gt;
# a cell array of numerics &amp;lt;tt&amp;gt;{12345  45673 34436}&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;path_to_raw_file&amp;lt;/tt&amp;gt; is defined as a string or a cell array of strings of the form &amp;lt;tt&amp;gt;&amp;#039;C:\data\myfile.raw&amp;#039;&amp;lt;/tt&amp;gt;, relative paths are also possible as well as using the [[Global IXTpath objects]] &amp;lt;tt&amp;gt;&amp;#039;inst_data:::myfile.raw&amp;#039;&amp;lt;/tt&amp;gt; provided they have been set properly in the [[Instrument setup]]&lt;br /&gt;
* ei_guess is a single numeric value containing the starting ei for get_ei to use in its calculation&lt;br /&gt;
&lt;br /&gt;
mget_ei()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt;  [ei,props]=mget_ei(run_numbers,ei_guesses)&lt;br /&gt;
&amp;gt;&amp;gt;  [ei,props]=mget_ei(path_to_raw_file,ei_guesses)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;run_numbers&amp;lt;/tt&amp;gt; can be defined in the following ways&lt;br /&gt;
#  a numerical array of numbers &amp;lt;tt&amp;gt; [12345  45673 34436]&amp;lt;/tt&amp;gt;&lt;br /&gt;
# an array of strings &amp;lt;tt&amp;gt;char(&amp;#039;12345&amp;#039; &amp;#039;45673&amp;#039; &amp;#039;34436&amp;#039;)&amp;lt;/tt&amp;gt; &lt;br /&gt;
# a cell array of strings &amp;lt;tt&amp;gt;{&amp;#039;12345&amp;#039; &amp;#039;45673&amp;#039; &amp;#039;34436&amp;#039;}&amp;lt;/tt&amp;gt;&lt;br /&gt;
# a cell array of numerics &amp;lt;tt&amp;gt;{12345  45673 34436}&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;paths_to_raw_files&amp;lt;/tt&amp;gt; is defined as a cell or string array of the form &amp;lt;tt&amp;gt;&amp;#039;C:\data\myfile.raw&amp;#039;&amp;lt;/tt&amp;gt;,  relative paths are also possible as well as using the [[Global IXTpath objects]] &amp;lt;tt&amp;gt;&amp;#039;inst_data:::myfile.raw&amp;#039;&amp;lt;/tt&amp;gt; provided they have been set properly in the [[Instrument setup]]&lt;br /&gt;
*ei_guesses must be a numerical array equal to the number of run_numbers, containing the starting ei for mget_ei to use in the energy calculation for each run&lt;/div&gt;</summary>
		<author><name>Dickon Champion</name></author>
	</entry>
	<entry>
		<id>http://libisis.org/index.php?title=IXTrunfile_operations&amp;diff=2532</id>
		<title>IXTrunfile operations</title>
		<link rel="alternate" type="text/html" href="http://libisis.org/index.php?title=IXTrunfile_operations&amp;diff=2532"/>
		<updated>2008-06-30T11:02:16Z</updated>

		<summary type="html">&lt;p&gt;Dickon Champion: /* Binary operators for two run files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;It is possible to perform algebraic and mathematical operations on populated [[IXTrunfile]] objects&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== runfile algebra ==&lt;br /&gt;
&lt;br /&gt;
a+b&lt;br /&gt;
&lt;br /&gt;
a-b&lt;br /&gt;
&lt;br /&gt;
a*b&lt;br /&gt;
&lt;br /&gt;
a/b&lt;br /&gt;
&lt;br /&gt;
a^b&lt;br /&gt;
&lt;br /&gt;
as the [[IXTrunfile]] object is more complicated than other simple datasets there are certain rules as to how a simple algebraic operation might be performed&lt;br /&gt;
&lt;br /&gt;
Consider a run file as a pair of [[IXTdata]] objects, one for the detector information and one for the monitor information, together with various objects that are for everything else. The ‘everything else’ includes the instrument description, user, source, but in particular the [[IXTspectra]] and [[IXTdetector]] classes as part of IXTinstrument. The [[IXTdata]] object contains bridging arrays to the IXTspectra object. For the purposes of the algebra, lets write an [[IXTrunfile]] as:&lt;br /&gt;
R= α(d,m)&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
α  	the ‘everything else’&lt;br /&gt;
d	dataset2D or array of dataset2D, or (if no detector map given) unassigned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===  Binary operators with a d1d, d2d, scalar, vector, array ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We permit the addition if the two conditions are true:&lt;br /&gt;
(i)	the operation is valid on both the detector and monitor dataset2D (using whatever rules apply to dataset2d as at the moment)&lt;br /&gt;
(ii)	the resultant detector and monitor dataset2d have the same sizes as the initial ones (this ensures that the ‘everything else is valid)&lt;br /&gt;
&lt;br /&gt;
In summary, (if a dash refers to the detector or monitor IXTdata being unassigned):&lt;br /&gt;
&lt;br /&gt;
α(d,m) + a = α(d+a,m+a)&lt;br /&gt;
&lt;br /&gt;
α(d,-) + a = α(d+a,-)&lt;br /&gt;
&lt;br /&gt;
α(-,m) + a = α(-,m+a)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Binary operators for two run files ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The different cases for consideration when combining two runfiles are legion – what if they have different numbers of detector and or monitor mapping, what if they have the same number of workspaces but different grouping of spectra, what if they have no monitor workspaces, what if from different instrument? The best criteria for algebra are&lt;br /&gt;
* Simple to implement, which will probably also satisfy:&lt;br /&gt;
* Simple for a user to predict the behaviour,&lt;br /&gt;
* Not place undue restrictions on what can be combined,&lt;br /&gt;
* Does the sensible thing in commonly encountered situations.&lt;br /&gt;
&lt;br /&gt;
Simple to implement is important, as it means code is also less prone to bugs. Simple for a user to predict is important – the outcome should be intuitively obvious. This will probably follow from ‘simple to implement’: if we don’t treat lots of special cases then the user won’t be worrying about lots of rules that need to be remembered. We shouldn’t place unnecessary restrictions: e.g. if a user wants to add MARI and HET data let them: they probably have a good reason to be trying to do so. It also means that the code doesn’t have to make copious checks, or worry too much about how to combine the ‘everything else’. Finally, the first three rules mean that the scheme will almost certainly do the sensible thing in common situations.&lt;br /&gt;
&lt;br /&gt;
For the sake of definiteness, consider addition. The rules for any other binary operation will be the same. The minimum scheme is:&lt;br /&gt;
(i)	Add the D2D for each of the detector and monitor data (using implicitly whatever rules we have in place for the algebra of dataset2d regarding sizes of arrays, units, point or histogram)  i.e.&lt;br /&gt;
(d1,m1) + (d2,m2) = (d1+d2, m1+m2)&lt;br /&gt;
(ii)	The ‘everything else’ comes from the [[IXTrunfile]] whose number of detector workspaces and monitor workspaces match those of the pair of D2D resulting from the operations on the detector and monitor D2D. If the D2D operations produce a pair whose dimensions do not match one of the two input pairs, then the operation is invalid. That is, we require the number of y values to satisfy&lt;br /&gt;
(nd1+d2, nm1+m2) = (nd1, nm1) or (nd2, nm2)&lt;br /&gt;
In particular this forbids the case where have (nd1,nm1)=(41472,1) and (nd2,nm2)=(1,3) – this would result in (41472,3) following the rules for adding D2D of different dimensions together. In the case when both α1 and α2 match, then take α1.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These rules are fine when d and m are assigned for both runfiles. Likewise, if m is assigned for neither, or d is assigned for neither, then we apply the same principles to just the d or the m, respectively. In summary:&lt;br /&gt;
&lt;br /&gt;
α1 (d1,m1) + α2 (d2,m2) = α (d1+d2, m1+m2)	&lt;br /&gt;
α is whichever of α1 and α2 match (α1 if both match); operation invalid if neither α1 nor α2 match&lt;br /&gt;
α1 (d1,-) + α2 (d2,-) = α (d1+d2, -)&lt;br /&gt;
&lt;br /&gt;
α1 (-,m1) + α2 (-,m2) = α (-, m1+m2)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above forbids some operations we would like to perform, in particular if the operation is ‘divide’ and we want to normalise the detectors by a monitor. In this case we would want to be able to achieve this operation by having no detector map file, i.e. we want  &lt;br /&gt;
R1/R2  = α1(d1,m1) / α2(-,m2) = α1(d1/m2, m1/m2)&lt;br /&gt;
for m2 corresponding to a single monitor. So let’s consider the various combinations of unassigned detector and/or monitor d2D:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
α1 (d1,-) + α2 (d2,m2) = α (d1+d2, d1+m2)	&lt;br /&gt;
α is α2 if it matches; else operation is invalid. (This rule is the same as the one above, as α1 is guaranteed not to match)&lt;br /&gt;
α1 (-,m1) + α2 (d2,m2) = α (m1+d2, m1+m2)&lt;br /&gt;
&lt;br /&gt;
and by symmetry;&lt;br /&gt;
&lt;br /&gt;
α1 (d1, m1) + α2 (d2,-) = α (d1+d2, m1+d2)&lt;br /&gt;
α is α1 if it matches; else operation is invalid (This rule is the same as the one above, as α1 is guaranteed not to match)&lt;br /&gt;
&lt;br /&gt;
α1 (d1, m1) + α2 (-,m2) = α (d1+m2, m1+m2)&lt;br /&gt;
&lt;br /&gt;
(The qualitative rule here is: ‘if one of d and m is unassigned for just one of the two runfiles, fill in the missing d or m with the m or d respectively, then add as when nothing is missing’)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally:&lt;br /&gt;
&lt;br /&gt;
α1 (d1,-) + α2 (-,m2) = α (d1+m2, -)			Same rule on α as always&lt;br /&gt;
&lt;br /&gt;
α1 (-, m1) + α2 (d2,-) = α (m1+d2, -)&lt;br /&gt;
&lt;br /&gt;
== elementary functions ==&lt;br /&gt;
&lt;br /&gt;
sin/cos/tan/sinh/cosh/tanh/exp/log/log10/deriv1x/deriv2x/shift_x&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
all these functions have a basic syntax and do not take any parameters except for shift_x&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; runfile_out=fn(runfile_in)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the operation is appled to both the monitor data and the detector data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== other manipulations ==&lt;br /&gt;
&lt;br /&gt;
these functions can be applied to either the monitor data only, the detector data only or both [[IXTdata]] objects in the [[IXTrunfile]]. These functions also take specific parameters associated with them.&lt;br /&gt;
&lt;br /&gt;
rebin_x/rebunch_x/regroup_x/integrate_x&lt;br /&gt;
&lt;br /&gt;
rebin_x_mon/rebunch_x_mon/regroup_x_mon/integrate_x_mon&lt;br /&gt;
&lt;br /&gt;
rebin_x_det/rebunch_x_det/regroup_x_det/integrate_x_det&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; runfile_out=fn_x(runfile_in,parameters)&lt;br /&gt;
&amp;gt;&amp;gt; runfile_out=fn_x_mon(runfile_in,parameters)&lt;br /&gt;
&amp;gt;&amp;gt; runfile_out=fn_x_det(runfile_in,parameters)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dickon Champion</name></author>
	</entry>
	<entry>
		<id>http://libisis.org/index.php?title=IXTrunfile_operations&amp;diff=2531</id>
		<title>IXTrunfile operations</title>
		<link rel="alternate" type="text/html" href="http://libisis.org/index.php?title=IXTrunfile_operations&amp;diff=2531"/>
		<updated>2008-06-30T11:01:36Z</updated>

		<summary type="html">&lt;p&gt;Dickon Champion: /* Binary operators for two run files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;It is possible to perform algebraic and mathematical operations on populated [[IXTrunfile]] objects&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== runfile algebra ==&lt;br /&gt;
&lt;br /&gt;
a+b&lt;br /&gt;
&lt;br /&gt;
a-b&lt;br /&gt;
&lt;br /&gt;
a*b&lt;br /&gt;
&lt;br /&gt;
a/b&lt;br /&gt;
&lt;br /&gt;
a^b&lt;br /&gt;
&lt;br /&gt;
as the [[IXTrunfile]] object is more complicated than other simple datasets there are certain rules as to how a simple algebraic operation might be performed&lt;br /&gt;
&lt;br /&gt;
Consider a run file as a pair of [[IXTdata]] objects, one for the detector information and one for the monitor information, together with various objects that are for everything else. The ‘everything else’ includes the instrument description, user, source, but in particular the [[IXTspectra]] and [[IXTdetector]] classes as part of IXTinstrument. The [[IXTdata]] object contains bridging arrays to the IXTspectra object. For the purposes of the algebra, lets write an [[IXTrunfile]] as:&lt;br /&gt;
R= α(d,m)&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
α  	the ‘everything else’&lt;br /&gt;
d	dataset2D or array of dataset2D, or (if no detector map given) unassigned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===  Binary operators with a d1d, d2d, scalar, vector, array ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We permit the addition if the two conditions are true:&lt;br /&gt;
(i)	the operation is valid on both the detector and monitor dataset2D (using whatever rules apply to dataset2d as at the moment)&lt;br /&gt;
(ii)	the resultant detector and monitor dataset2d have the same sizes as the initial ones (this ensures that the ‘everything else is valid)&lt;br /&gt;
&lt;br /&gt;
In summary, (if a dash refers to the detector or monitor IXTdata being unassigned):&lt;br /&gt;
&lt;br /&gt;
α(d,m) + a = α(d+a,m+a)&lt;br /&gt;
&lt;br /&gt;
α(d,-) + a = α(d+a,-)&lt;br /&gt;
&lt;br /&gt;
α(-,m) + a = α(-,m+a)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Binary operators for two run files ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The different cases for consideration when combining two runfiles are legion – what if they have different numbers of detector and or monitor mapping, what if they have the same number of workspaces but different grouping of spectra, what if they have no monitor workspaces, what if from different instrument? The best criteria for algebra are&lt;br /&gt;
* Simple to implement, which will probably also satisfy:&lt;br /&gt;
* Simple for a user to predict the behaviour,&lt;br /&gt;
* Not place undue restrictions on what can be combined,&lt;br /&gt;
* Does the sensible thing in commonly encountered situations.&lt;br /&gt;
&lt;br /&gt;
Simple to implement is important, as it means code is also less prone to bugs. Simple for a user to predict is important – the outcome should be intuitively obvious. This will probably follow from ‘simple to implement’: if we don’t treat lots of special cases then the user won’t be worrying about lots of rules that need to be remembered. We shouldn’t place unnecessary restrictions: e.g. if a user wants to add MARI and HET data let them: they probably have a good reason to be trying to do so. It also means that the code doesn’t have to make copious checks, or worry too much about how to combine the ‘everything else’. Finally, the first three rules mean that the scheme will almost certainly do the sensible thing in common situations.&lt;br /&gt;
&lt;br /&gt;
For the sake of definiteness, consider addition. The rules for any other binary operation will be the same. The minimum scheme is:&lt;br /&gt;
(i)	Add the D2D for each of the detector and monitor data (using implicitly whatever rules we have in place for the algebra of dataset2d regarding sizes of arrays, units, point or histogram)  i.e.&lt;br /&gt;
(d1,m1) + (d2,m2) = (d1+d2, m1+m2)&lt;br /&gt;
(ii)	The ‘everything else’ comes from the [[IXTrunfile]] whose number of detector workspaces and monitor workspaces match those of the pair of D2D resulting from the operations on the detector and monitor D2D. If the D2D operations produce a pair whose dimensions do not match one of the two input pairs, then the operation is invalid. That is, we require the number of y values to satisfy&lt;br /&gt;
(nd1+d2, nm1+m2) = (nd1, nm1) or (nd2, nm2)&lt;br /&gt;
In particular this forbids the case where have (nd1,nm1)=(41472,1) and (nd2,nm2)=(1,3) – this would result in (41472,3) following the rules for adding D2D of different dimensions together. In the case when both α1 and α2 match, then take α1.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These rules are fine when d and m are assigned for both runfiles. Likewise, if m is assigned for neither, or d is assigned for neither, then we apply the same principles to just the d or the m, respectively. In summary:&lt;br /&gt;
&lt;br /&gt;
α1 (d1,m1) + α2 (d2,m2) = α (d1+d2, m1+m2)	α is whichever of α1 and α2 match (α1 if both match); operation invalid if neither α1 nor α2 match&lt;br /&gt;
α1 (d1,-) + α2 (d2,-) = α (d1+d2, -)&lt;br /&gt;
&lt;br /&gt;
α1 (-,m1) + α2 (-,m2) = α (-, m1+m2)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above forbids some operations we would like to perform, in particular if the operation is ‘divide’ and we want to normalise the detectors by a monitor. In this case we would want to be able to achieve this operation by having no detector map file, i.e. we want  &lt;br /&gt;
R1/R2  = α1(d1,m1) / α2(-,m2) = α1(d1/m2, m1/m2)&lt;br /&gt;
for m2 corresponding to a single monitor. So let’s consider the various combinations of unassigned detector and/or monitor d2D:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
α1 (d1,-) + α2 (d2,m2) = α (d1+d2, d1+m2)	α is α2 if it matches; else operation is invalid. (This rule is the same as the one above, as α1 is guaranteed not to match)&lt;br /&gt;
α1 (-,m1) + α2 (d2,m2) = α (m1+d2, m1+m2)&lt;br /&gt;
&lt;br /&gt;
and by symmetry;&lt;br /&gt;
&lt;br /&gt;
α1 (d1, m1) + α2 (d2,-) = α (d1+d2, m1+d2)	α is α1 if it matches; else operation is invalid (This rule is the same as the one above, as α1 is guaranteed not to match)&lt;br /&gt;
&lt;br /&gt;
α1 (d1, m1) + α2 (-,m2) = α (d1+m2, m1+m2)&lt;br /&gt;
&lt;br /&gt;
(The qualitative rule here is: ‘if one of d and m is unassigned for just one of the two runfiles, fill in the missing d or m with the m or d respectively, then add as when nothing is missing’)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally:&lt;br /&gt;
&lt;br /&gt;
α1 (d1,-) + α2 (-,m2) = α (d1+m2, -)			Same rule on α as always&lt;br /&gt;
&lt;br /&gt;
α1 (-, m1) + α2 (d2,-) = α (m1+d2, -)&lt;br /&gt;
&lt;br /&gt;
== elementary functions ==&lt;br /&gt;
&lt;br /&gt;
sin/cos/tan/sinh/cosh/tanh/exp/log/log10/deriv1x/deriv2x/shift_x&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
all these functions have a basic syntax and do not take any parameters except for shift_x&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; runfile_out=fn(runfile_in)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the operation is appled to both the monitor data and the detector data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== other manipulations ==&lt;br /&gt;
&lt;br /&gt;
these functions can be applied to either the monitor data only, the detector data only or both [[IXTdata]] objects in the [[IXTrunfile]]. These functions also take specific parameters associated with them.&lt;br /&gt;
&lt;br /&gt;
rebin_x/rebunch_x/regroup_x/integrate_x&lt;br /&gt;
&lt;br /&gt;
rebin_x_mon/rebunch_x_mon/regroup_x_mon/integrate_x_mon&lt;br /&gt;
&lt;br /&gt;
rebin_x_det/rebunch_x_det/regroup_x_det/integrate_x_det&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; runfile_out=fn_x(runfile_in,parameters)&lt;br /&gt;
&amp;gt;&amp;gt; runfile_out=fn_x_mon(runfile_in,parameters)&lt;br /&gt;
&amp;gt;&amp;gt; runfile_out=fn_x_det(runfile_in,parameters)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dickon Champion</name></author>
	</entry>
	<entry>
		<id>http://libisis.org/index.php?title=IXTrunfile_operations&amp;diff=2530</id>
		<title>IXTrunfile operations</title>
		<link rel="alternate" type="text/html" href="http://libisis.org/index.php?title=IXTrunfile_operations&amp;diff=2530"/>
		<updated>2008-06-30T11:01:11Z</updated>

		<summary type="html">&lt;p&gt;Dickon Champion: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;It is possible to perform algebraic and mathematical operations on populated [[IXTrunfile]] objects&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== runfile algebra ==&lt;br /&gt;
&lt;br /&gt;
a+b&lt;br /&gt;
&lt;br /&gt;
a-b&lt;br /&gt;
&lt;br /&gt;
a*b&lt;br /&gt;
&lt;br /&gt;
a/b&lt;br /&gt;
&lt;br /&gt;
a^b&lt;br /&gt;
&lt;br /&gt;
as the [[IXTrunfile]] object is more complicated than other simple datasets there are certain rules as to how a simple algebraic operation might be performed&lt;br /&gt;
&lt;br /&gt;
Consider a run file as a pair of [[IXTdata]] objects, one for the detector information and one for the monitor information, together with various objects that are for everything else. The ‘everything else’ includes the instrument description, user, source, but in particular the [[IXTspectra]] and [[IXTdetector]] classes as part of IXTinstrument. The [[IXTdata]] object contains bridging arrays to the IXTspectra object. For the purposes of the algebra, lets write an [[IXTrunfile]] as:&lt;br /&gt;
R= α(d,m)&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
α  	the ‘everything else’&lt;br /&gt;
d	dataset2D or array of dataset2D, or (if no detector map given) unassigned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===  Binary operators with a d1d, d2d, scalar, vector, array ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We permit the addition if the two conditions are true:&lt;br /&gt;
(i)	the operation is valid on both the detector and monitor dataset2D (using whatever rules apply to dataset2d as at the moment)&lt;br /&gt;
(ii)	the resultant detector and monitor dataset2d have the same sizes as the initial ones (this ensures that the ‘everything else is valid)&lt;br /&gt;
&lt;br /&gt;
In summary, (if a dash refers to the detector or monitor IXTdata being unassigned):&lt;br /&gt;
&lt;br /&gt;
α(d,m) + a = α(d+a,m+a)&lt;br /&gt;
&lt;br /&gt;
α(d,-) + a = α(d+a,-)&lt;br /&gt;
&lt;br /&gt;
α(-,m) + a = α(-,m+a)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Binary operators for two run files ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The different cases for consideration when combining two runfiles are legion – what if they have different numbers of detector and or monitor mapping, what if they have the same number of workspaces but different grouping of spectra, what if they have no monitor workspaces, what if from different instrument? The best criteria for algebra are&lt;br /&gt;
* Simple to implement, which will probably also satisfy:&lt;br /&gt;
* Simple for a user to predict the behaviour,&lt;br /&gt;
* Not place undue restrictions on what can be combined,&lt;br /&gt;
* Does the sensible thing in commonly encountered situations.&lt;br /&gt;
&lt;br /&gt;
Simple to implement is important, as it means code is also less prone to bugs. Simple for a user to predict is important – the outcome should be intuitively obvious. This will probably follow from ‘simple to implement’: if we don’t treat lots of special cases then the user won’t be worrying about lots of rules that need to be remembered. We shouldn’t place unnecessary restrictions: e.g. if a user wants to add MARI and HET data let them: they probably have a good reason to be trying to do so. It also means that the code doesn’t have to make copious checks, or worry too much about how to combine the ‘everything else’. Finally, the first three rules mean that the scheme will almost certainly do the sensible thing in common situations.&lt;br /&gt;
&lt;br /&gt;
For the sake of definiteness, consider addition. The rules for any other binary operation will be the same. The minimum scheme is:&lt;br /&gt;
(i)	Add the D2D for each of the detector and monitor data (using implicitly whatever rules we have in place for the algebra of dataset2d regarding sizes of arrays, units, point or histogram)  i.e.&lt;br /&gt;
(d1,m1) + (d2,m2) = (d1+d2, m1+m2)&lt;br /&gt;
(ii)	The ‘everything else’ comes from the [[IXTrunfile]] whose number of detector workspaces and monitor workspaces match those of the pair of D2D resulting from the operations on the detector and monitor D2D. If the D2D operations produce a pair whose dimensions do not match one of the two input pairs, then the operation is invalid. That is, we require the number of y values to satisfy&lt;br /&gt;
(nd1+d2, nm1+m2) = (nd1, nm1) or (nd2, nm2)&lt;br /&gt;
In particular this forbids the case where have (nd1,nm1)=(41472,1) and (nd2,nm2)=(1,3) – this would result in (41472,3) following the rules for adding D2D of different dimensions together. In the case when both α1 and α2 match, then take α1.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These rules are fine when d and m are assigned for both runfiles. Likewise, if m is assigned for neither, or d is assigned for neither, then we apply the same principles to just the d or the m, respectively. In summary:&lt;br /&gt;
&lt;br /&gt;
α1 (d1,m1) + α2 (d2,m2) = α (d1+d2, m1+m2)	α is whichever of α1 and α2 match (α1 if both match); operation invalid if neither α1 nor α2 match&lt;br /&gt;
α1 (d1,-) + α2 (d2,-) = α (d1+d2, -)&lt;br /&gt;
&lt;br /&gt;
α1 (-,m1) + α2 (-,m2) = α (-, m1+m2)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above forbids some operations we would like to perform, in particular if the operation is ‘divide’ and we want to normalise the detectors by a monitor. In this case we would want to be able to achieve this operation by having no detector map file, i.e. we want  &lt;br /&gt;
R1/R2  = α1(d1,m1) / α2(-,m2) = α1(d1/m2, m1/m2)&lt;br /&gt;
for m2 corresponding to a single monitor. So let’s consider the various combinations of unassigned detector and/or monitor d2D:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
α1 (d1,-) + α2 (d2,m2) = α (d1+d2, d1+m2)	α is α2 if it matches; else operation is invalid. (This rule is the same as the one above, as α1 is guaranteed not to match)&lt;br /&gt;
α1 (-,m1) + α2 (d2,m2) = α (m1+d2, m1+m2)&lt;br /&gt;
&lt;br /&gt;
and by symmetry;&lt;br /&gt;
&lt;br /&gt;
α1 (d1, m1) + α2 (d2,-) = α (d1+d2, m1+d2)	α is α1 if it matches; else operation is invalid (This rule is the same as the one above, as α1 is guaranteed not to match)&lt;br /&gt;
&lt;br /&gt;
α1 (d1, m1) + α2 (-,m2) = α (d1+m2, m1+m2)&lt;br /&gt;
&lt;br /&gt;
(The qualitative rule here is: ‘if one of d and m is unassigned for just one of the two runfiles, fill in the missing d or m with the m or d respectively, then add as when nothing is missing’)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally:&lt;br /&gt;
&lt;br /&gt;
α1 (d1,-) + α2 (-,m2) = α (d1+m2, -)			Same rule on α as always&lt;br /&gt;
&lt;br /&gt;
α1 (-, m1) + α2 (d2,-) = α (m1+d2, -)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Unary operators&lt;br /&gt;
3.1 Operations on x-axis&lt;br /&gt;
Ones which apply only to the x-axis, such as rebin_x, integrate_x, shift_x etc. are straightforward:&lt;br /&gt;
&lt;br /&gt;
Ux[α(d,m)] = α(Ux[d], Ux[m])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== elementary functions ==&lt;br /&gt;
&lt;br /&gt;
sin/cos/tan/sinh/cosh/tanh/exp/log/log10/deriv1x/deriv2x/shift_x&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
all these functions have a basic syntax and do not take any parameters except for shift_x&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; runfile_out=fn(runfile_in)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the operation is appled to both the monitor data and the detector data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== other manipulations ==&lt;br /&gt;
&lt;br /&gt;
these functions can be applied to either the monitor data only, the detector data only or both [[IXTdata]] objects in the [[IXTrunfile]]. These functions also take specific parameters associated with them.&lt;br /&gt;
&lt;br /&gt;
rebin_x/rebunch_x/regroup_x/integrate_x&lt;br /&gt;
&lt;br /&gt;
rebin_x_mon/rebunch_x_mon/regroup_x_mon/integrate_x_mon&lt;br /&gt;
&lt;br /&gt;
rebin_x_det/rebunch_x_det/regroup_x_det/integrate_x_det&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; runfile_out=fn_x(runfile_in,parameters)&lt;br /&gt;
&amp;gt;&amp;gt; runfile_out=fn_x_mon(runfile_in,parameters)&lt;br /&gt;
&amp;gt;&amp;gt; runfile_out=fn_x_det(runfile_in,parameters)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dickon Champion</name></author>
	</entry>
	<entry>
		<id>http://libisis.org/index.php?title=IXTrunfile_operations&amp;diff=2529</id>
		<title>IXTrunfile operations</title>
		<link rel="alternate" type="text/html" href="http://libisis.org/index.php?title=IXTrunfile_operations&amp;diff=2529"/>
		<updated>2008-06-30T10:53:49Z</updated>

		<summary type="html">&lt;p&gt;Dickon Champion: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;It is possible to perform algebraic and mathematical operations on populated IXTrunfile objects&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== runfile algebra ==&lt;br /&gt;
&lt;br /&gt;
a+b&lt;br /&gt;
&lt;br /&gt;
a-b&lt;br /&gt;
&lt;br /&gt;
a*b&lt;br /&gt;
&lt;br /&gt;
a/b&lt;br /&gt;
&lt;br /&gt;
a^b&lt;br /&gt;
&lt;br /&gt;
as the [[IXTrunfile]] object is more complicated than other simple datasets there are certain rules as to how a simple algebraic operation might be performed&lt;br /&gt;
&lt;br /&gt;
Consider a run file as a pair of [[IXTdata]] objects, one for the detector information and one for the monitor information, together with various objects that are for everything else. The ‘everything else’ includes the instrument description, user, source, but in particular the [[IXTspectra]] and [[IXTdetector]] classes as part of IXTinstrument. The [[IXTdata]] object contains bridging arrays to the IXTspectra object. For the purposes of the algebra, lets write an [[IXTrunfile]] as:&lt;br /&gt;
R= α(d,m)&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
α  	the ‘everything else’&lt;br /&gt;
d	dataset2D or array of dataset2D, or (if no detector map given) unassigned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===  Binary operators with a d1d, d2d, scalar, vector, array ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We permit the addition if the two conditions are true:&lt;br /&gt;
(i)	the operation is valid on both the detector and monitor dataset2D (using whatever rules apply to dataset2d as at the moment)&lt;br /&gt;
(ii)	the resultant detector and monitor dataset2d have the same sizes as the initial ones (this ensures that the ‘everything else is valid)&lt;br /&gt;
&lt;br /&gt;
In summary, (if a dash refers to the detector or monitor IXTdata being unassigned):&lt;br /&gt;
&lt;br /&gt;
α(d,m) + a = α(d+a,m+a)&lt;br /&gt;
&lt;br /&gt;
α(d,-) + a = α(d+a,-)&lt;br /&gt;
&lt;br /&gt;
α(-,m) + a = α(-,m+a)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Binary operators for two run files ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The different cases for consideration when combining two runfiles are legion – what if they have different numbers of detector and or monitor mapping, what if they have the same number of workspaces but different grouping of spectra, what if they have no monitor workspaces, what if from different instrument? The best criteria for algebra are&lt;br /&gt;
* Simple to implement, which will probably also satisfy:&lt;br /&gt;
* Simple for a user to predict the behaviour,&lt;br /&gt;
* Not place undue restrictions on what can be combined,&lt;br /&gt;
* Does the sensible thing in commonly encountered situations.&lt;br /&gt;
&lt;br /&gt;
Simple to implement is important, as it means code is also less prone to bugs. Simple for a user to predict is important – the outcome should be intuitively obvious. This will probably follow from ‘simple to implement’: if we don’t treat lots of special cases then the user won’t be worrying about lots of rules that need to be remembered. We shouldn’t place unnecessary restrictions: e.g. if a user wants to add MARI and HET data let them: they probably have a good reason to be trying to do so. It also means that the code doesn’t have to make copious checks, or worry too much about how to combine the ‘everything else’. Finally, the first three rules mean that the scheme will almost certainly do the sensible thing in common situations.&lt;br /&gt;
&lt;br /&gt;
For the sake of definiteness, consider addition. The rules for any other binary operation will be the same. The minimum scheme is:&lt;br /&gt;
(i)	Add the D2D for each of the detector and monitor data (using implicitly whatever rules we have in place for the algebra of dataset2d regarding sizes of arrays, units, point or histogram)  i.e.&lt;br /&gt;
(d1,m1) + (d2,m2) = (d1+d2, m1+m2)&lt;br /&gt;
(ii)	The ‘everything else’ comes from the [[IXTrunfile]] whose number of detector workspaces and monitor workspaces match those of the pair of D2D resulting from the operations on the detector and monitor D2D. If the D2D operations produce a pair whose dimensions do not match one of the two input pairs, then the operation is invalid. That is, we require the number of y values to satisfy&lt;br /&gt;
(nd1+d2, nm1+m2) = (nd1, nm1) or (nd2, nm2)&lt;br /&gt;
In particular this forbids the case where have (nd1,nm1)=(41472,1) and (nd2,nm2)=(1,3) – this would result in (41472,3) following the rules for adding D2D of different dimensions together. In the case when both α1 and α2 match, then take α1.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These rules are fine when d and m are assigned for both runfiles. Likewise, if m is assigned for neither, or d is assigned for neither, then we apply the same principles to just the d or the m, respectively. In summary:&lt;br /&gt;
&lt;br /&gt;
α1 (d1,m1) + α2 (d2,m2) = α (d1+d2, m1+m2)	α is whichever of α1 and α2 match (α1 if both match); operation invalid if neither α1 nor α2 match&lt;br /&gt;
α1 (d1,-) + α2 (d2,-) = α (d1+d2, -)&lt;br /&gt;
&lt;br /&gt;
α1 (-,m1) + α2 (-,m2) = α (-, m1+m2)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above forbids some operations we would like to perform, in particular if the operation is ‘divide’ and we want to normalise the detectors by a monitor. In this case we would want to be able to achieve this operation by having no detector map file, i.e. we want  &lt;br /&gt;
R1/R2  = α1(d1,m1) / α2(-,m2) = α1(d1/m2, m1/m2)&lt;br /&gt;
for m2 corresponding to a single monitor. So let’s consider the various combinations of unassigned detector and/or monitor d2D:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
α1 (d1,-) + α2 (d2,m2) = α (d1+d2, d1+m2)	α is α2 if it matches; else operation is invalid. (This rule is the same as the one above, as α1 is guaranteed not to match)&lt;br /&gt;
α1 (-,m1) + α2 (d2,m2) = α (m1+d2, m1+m2)&lt;br /&gt;
&lt;br /&gt;
and by symmetry;&lt;br /&gt;
&lt;br /&gt;
α1 (d1, m1) + α2 (d2,-) = α (d1+d2, m1+d2)	α is α1 if it matches; else operation is invalid (This rule is the same as the one above, as α1 is guaranteed not to match)&lt;br /&gt;
&lt;br /&gt;
α1 (d1, m1) + α2 (-,m2) = α (d1+m2, m1+m2)&lt;br /&gt;
&lt;br /&gt;
(The qualitative rule here is: ‘if one of d and m is unassigned for just one of the two runfiles, fill in the missing d or m with the m or d respectively, then add as when nothing is missing’)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally:&lt;br /&gt;
&lt;br /&gt;
α1 (d1,-) + α2 (-,m2) = α (d1+m2, -)			Same rule on α as always&lt;br /&gt;
&lt;br /&gt;
α1 (-, m1) + α2 (d2,-) = α (m1+d2, -)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Unary operators&lt;br /&gt;
3.1 Operations on x-axis&lt;br /&gt;
Ones which apply only to the x-axis, such as rebin_x, integrate_x, shift_x etc. are straightforward:&lt;br /&gt;
&lt;br /&gt;
Ux[α(d,m)] = α(Ux[d], Ux[m])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== elementary functions ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
sin/cos/tan/sinh/cosh/tanh/exp/log/log10&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== other manipulations ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
rebin/rebunch/regroup/integrate/shift_x/deriv1x/deriv2x&lt;/div&gt;</summary>
		<author><name>Dickon Champion</name></author>
	</entry>
	<entry>
		<id>http://libisis.org/index.php?title=IXTrunfile_operations&amp;diff=2528</id>
		<title>IXTrunfile operations</title>
		<link rel="alternate" type="text/html" href="http://libisis.org/index.php?title=IXTrunfile_operations&amp;diff=2528"/>
		<updated>2008-06-27T15:40:44Z</updated>

		<summary type="html">&lt;p&gt;Dickon Champion: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;It is possible to perform algebraic and mathematical operations on populated IXTrunfile objects&lt;br /&gt;
&lt;br /&gt;
There are three basic types of functions&lt;br /&gt;
&lt;br /&gt;
elementary functions&lt;br /&gt;
&lt;br /&gt;
sin/cos/tan/sinh/cosh/tanh/exp/log/log10&lt;br /&gt;
&lt;br /&gt;
runfile algebra&lt;br /&gt;
&lt;br /&gt;
a+b&lt;br /&gt;
&lt;br /&gt;
a-b&lt;br /&gt;
&lt;br /&gt;
a*b&lt;br /&gt;
&lt;br /&gt;
a/b&lt;br /&gt;
&lt;br /&gt;
a^b&lt;br /&gt;
&lt;br /&gt;
as the IXTrunfile object is more complicated than other simple datasets there are certain rules as to how a simple algebraic operation might be performed&lt;br /&gt;
&lt;br /&gt;
Consider a run file as a pair of IXTdata objects, one for the detector information and one for the monitor information, together with various objects that are for everything else. The ‘everything else’ includes the instrument description, user, source, but in particular the IXTspectra and IXTdetector classes as part of IXTinstrument. The IXTdata object contains bridging arrays to the IXTspectra object. For the purposes of the algebra, lets write a run file as:&lt;br /&gt;
R= α(d,m)&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
α  	the ‘everything else’&lt;br /&gt;
d	dataset2D or array of dataset2D, or (if no detector map given) unassigned.&lt;br /&gt;
&lt;br /&gt;
1. Binary operators with a d1d, d2d, scalar, vector, array&lt;br /&gt;
&lt;br /&gt;
We permit the addition if the two conditions are true:&lt;br /&gt;
(i)	the operation is valid on both the detector and monitor dataset2D (using whatever rules apply to dataset2d as at the moment)&lt;br /&gt;
(ii)	the resultant detector and monitor dataset2d have the same sizes as the initial ones (this ensures that the ‘everything else is valid)&lt;br /&gt;
(iii)	&lt;br /&gt;
 In summary, (if a dash refers to the detector or monitor IXTdata being unassigned):&lt;br /&gt;
&lt;br /&gt;
α(d,m) + a = α(d+a,m+a)&lt;br /&gt;
&lt;br /&gt;
α(d,-) + a = α(d+a,-)&lt;br /&gt;
&lt;br /&gt;
α(-,m) + a = α(-,m+a)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Binary operators for two run files&lt;br /&gt;
&lt;br /&gt;
The different cases for consideration when combining two runfiles are legion – what if they have different numbers of detector and or monitor mapping, what if they have the same number of workspaces but different grouping of spectra, what if they have no monitor workspaces, what if from different instrument … The best criteria for algebra are&lt;br /&gt;
-	Simple to implement, which will probably also satisfy:&lt;br /&gt;
-	Simple for a user to predict the behaviour,&lt;br /&gt;
-	Not place undue restrictions on what can be combined,&lt;br /&gt;
-	Does the sensible thing in commonly encountered situations.&lt;br /&gt;
&lt;br /&gt;
Simple to implement is important, as it means code is also less prone to bugs. Simple for a user to predict is important – the outcome should be intuitively obvious. This will probably follow from ‘simple to implement’: if we don’t treat lots of special cases then the user won’t be worrying about lots of rules that need to be remembered. We shouldn’t place unnecessary restrictions: e.g. if a user wants to add MARI and HET data let them: they probably have a good reason to be trying to do so. It also means that the code doesn’t have to make copious checks, or worry too much about how to combine the ‘everything else’. Finally, the first three rules mean that the scheme will almost certainly do the sensible thing in common situations.&lt;br /&gt;
&lt;br /&gt;
For the sake of definiteness, consider addition. The rules for any other binary operation will be the same. The minimum scheme is:&lt;br /&gt;
(i)	Add the D2D for each of the detector and monitor data (using implicitly whatever rules we have in place for the algebra of dataset2d regarding sizes of arrays, units, point or histogram)  i.e.&lt;br /&gt;
(d1,m1) + (d2,m2) = (d1+d2, m1+m2)&lt;br /&gt;
(ii)	The ‘everything else’ comes from the runfile whose number of detector workspaces and monitor workspaces match those of the pair of D2D resulting from the operations on the detector and monitor D2D. If the D2D operations produce a pair whose dimensions do not match one of the two input pairs, then the operation is invalid. That is, we require the number of y values to satisfy&lt;br /&gt;
(nd1+d2, nm1+m2) = (nd1, nm1) or (nd2, nm2)&lt;br /&gt;
In particular this forbids the case where have (nd1,nm1)=(41472,1) and (nd2,nm2)=(1,3) – this would result in (41472,3) following the rules for adding D2D of different dimensions together. In the case when both α1 and α2 match, then take α1.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These rules are fine when d and m are assigned for both runfiles. Likewise, if m is assigned for neither, or d is assigned for neither, then we apply the same principles to just the d or the m, respectively. In summary:&lt;br /&gt;
&lt;br /&gt;
α1 (d1,m1) + α2 (d2,m2) = α (d1+d2, m1+m2)	α is whichever of α1 and α2 match (α1 if both match); operation invalid if neither α1 nor α2 match&lt;br /&gt;
α1 (d1,-) + α2 (d2,-) = α (d1+d2, -)&lt;br /&gt;
&lt;br /&gt;
α1 (-,m1) + α2 (-,m2) = α (-, m1+m2)&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above forbids some operations we would like to perform, in particular if the operation is ‘divide’ and we want to normalise the detectors by a monitor. In this case we would want to be able to achieve this operation by having no detector map file, i.e. we want  &lt;br /&gt;
R1/R2  = α1(d1,m1) / α2(-,m2) = α1(d1/m2, m1/m2)&lt;br /&gt;
for m2 corresponding to a single monitor. So let’s consider the various combinations of unassigned detector and/or monitor d2D:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
α1 (d1,-) + α2 (d2,m2) = α (d1+d2, d1+m2)	α is α2 if it matches; else operation is invalid. (This rule is the same as the one above, as α1 is guaranteed not to match)&lt;br /&gt;
α1 (-,m1) + α2 (d2,m2) = α (m1+d2, m1+m2)&lt;br /&gt;
&lt;br /&gt;
and by symmetry;&lt;br /&gt;
&lt;br /&gt;
α1 (d1, m1) + α2 (d2,-) = α (d1+d2, m1+d2)	α is α1 if it matches; else operation is invalid (This rule is the same as the one above, as α1 is guaranteed not to match)&lt;br /&gt;
&lt;br /&gt;
α1 (d1, m1) + α2 (-,m2) = α (d1+m2, m1+m2)&lt;br /&gt;
&lt;br /&gt;
(The qualitative rule here is: ‘if one of d and m is unassigned for just one of the two runfiles, fill in the missing d or m with the m or d respectively, then add as when nothing is missing’)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally:&lt;br /&gt;
&lt;br /&gt;
α1 (d1,-) + α2 (-,m2) = α (d1+m2, -)			Same rule on α as always&lt;br /&gt;
&lt;br /&gt;
α1 (-, m1) + α2 (d2,-) = α (m1+d2, -)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Unary operators&lt;br /&gt;
3.1 Operations on x-axis&lt;br /&gt;
Ones which apply only to the x-axis, such as rebin_x, integrate_x, shift_x etc. are straightforward:&lt;br /&gt;
&lt;br /&gt;
Ux[α(d,m)] = α(Ux[d], Ux[m])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
other manipulations&lt;br /&gt;
&lt;br /&gt;
rebin/rebunch/regroup/integrate/shift_x/deriv1x/deriv2x&lt;/div&gt;</summary>
		<author><name>Dickon Champion</name></author>
	</entry>
	<entry>
		<id>http://libisis.org/index.php?title=IXTrunfile_operations&amp;diff=2527</id>
		<title>IXTrunfile operations</title>
		<link rel="alternate" type="text/html" href="http://libisis.org/index.php?title=IXTrunfile_operations&amp;diff=2527"/>
		<updated>2008-06-27T15:40:17Z</updated>

		<summary type="html">&lt;p&gt;Dickon Champion: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;It is possible to perform algebraic and mathematical operations on populated IXTrunfile objects&lt;br /&gt;
&lt;br /&gt;
There are three basic types of functions&lt;br /&gt;
&lt;br /&gt;
elementary functions&lt;br /&gt;
&lt;br /&gt;
sin/cos/tan/sinh/cosh/tanh/exp/log/log10&lt;br /&gt;
&lt;br /&gt;
runfile algebra&lt;br /&gt;
&lt;br /&gt;
a+b&lt;br /&gt;
a-b&lt;br /&gt;
a*b&lt;br /&gt;
a/b&lt;br /&gt;
a^b&lt;br /&gt;
&lt;br /&gt;
as the IXTrunfile object is more complicated than other simple datasets there are certain rules as to how a simple algebraic operation might be performed&lt;br /&gt;
&lt;br /&gt;
Consider a run file as a pair of IXTdata objects, one for the detector information and one for the monitor information, together with various objects that are for everything else. The ‘everything else’ includes the instrument description, user, source, but in particular the IXTspectra and IXTdetector classes as part of IXTinstrument. The IXTdata object contains bridging arrays to the IXTspectra object. For the purposes of the algebra, lets write a run file as:&lt;br /&gt;
R= α(d,m)&lt;br /&gt;
&lt;br /&gt;
where&lt;br /&gt;
α  	the ‘everything else’&lt;br /&gt;
d	dataset2D or array of dataset2D, or (if no detector map given) unassigned.&lt;br /&gt;
&lt;br /&gt;
1. Binary operators with a d1d, d2d, scalar, vector, array&lt;br /&gt;
&lt;br /&gt;
We permit the addition if the two conditions are true:&lt;br /&gt;
(i)	the operation is valid on both the detector and monitor dataset2D (using whatever rules apply to dataset2d as at the moment)&lt;br /&gt;
(ii)	the resultant detector and monitor dataset2d have the same sizes as the initial ones (this ensures that the ‘everything else is valid)&lt;br /&gt;
(iii)	&lt;br /&gt;
 In summary, (if a dash refers to the detector or monitor IXTdata being unassigned):&lt;br /&gt;
&lt;br /&gt;
α(d,m) + a = α(d+a,m+a)&lt;br /&gt;
&lt;br /&gt;
α(d,-) + a = α(d+a,-)&lt;br /&gt;
&lt;br /&gt;
α(-,m) + a = α(-,m+a)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Binary operators for two run files&lt;br /&gt;
&lt;br /&gt;
The different cases for consideration when combining two runfiles are legion – what if they have different numbers of detector and or monitor mapping, what if they have the same number of workspaces but different grouping of spectra, what if they have no monitor workspaces, what if from different instrument … The best criteria for algebra are&lt;br /&gt;
-	Simple to implement, which will probably also satisfy:&lt;br /&gt;
-	Simple for a user to predict the behaviour,&lt;br /&gt;
-	Not place undue restrictions on what can be combined,&lt;br /&gt;
-	Does the sensible thing in commonly encountered situations.&lt;br /&gt;
&lt;br /&gt;
Simple to implement is important, as it means code is also less prone to bugs. Simple for a user to predict is important – the outcome should be intuitively obvious. This will probably follow from ‘simple to implement’: if we don’t treat lots of special cases then the user won’t be worrying about lots of rules that need to be remembered. We shouldn’t place unnecessary restrictions: e.g. if a user wants to add MARI and HET data let them: they probably have a good reason to be trying to do so. It also means that the code doesn’t have to make copious checks, or worry too much about how to combine the ‘everything else’. Finally, the first three rules mean that the scheme will almost certainly do the sensible thing in common situations.&lt;br /&gt;
&lt;br /&gt;
For the sake of definiteness, consider addition. The rules for any other binary operation will be the same. The minimum scheme is:&lt;br /&gt;
(i)	Add the D2D for each of the detector and monitor data (using implicitly whatever rules we have in place for the algebra of dataset2d regarding sizes of arrays, units, point or histogram)  i.e.&lt;br /&gt;
(d1,m1) + (d2,m2) = (d1+d2, m1+m2)&lt;br /&gt;
(ii)	The ‘everything else’ comes from the runfile whose number of detector workspaces and monitor workspaces match those of the pair of D2D resulting from the operations on the detector and monitor D2D. If the D2D operations produce a pair whose dimensions do not match one of the two input pairs, then the operation is invalid. That is, we require the number of y values to satisfy&lt;br /&gt;
(nd1+d2, nm1+m2) = (nd1, nm1) or (nd2, nm2)&lt;br /&gt;
In particular this forbids the case where have (nd1,nm1)=(41472,1) and (nd2,nm2)=(1,3) – this would result in (41472,3) following the rules for adding D2D of different dimensions together. In the case when both α1 and α2 match, then take α1.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These rules are fine when d and m are assigned for both runfiles. Likewise, if m is assigned for neither, or d is assigned for neither, then we apply the same principles to just the d or the m, respectively. In summary:&lt;br /&gt;
&lt;br /&gt;
α1 (d1,m1) + α2 (d2,m2) = α (d1+d2, m1+m2)	α is whichever of α1 and α2 match (α1 if both match); operation invalid if neither α1 nor α2 match&lt;br /&gt;
α1 (d1,-) + α2 (d2,-) = α (d1+d2, -)&lt;br /&gt;
&lt;br /&gt;
α1 (-,m1) + α2 (-,m2) = α (-, m1+m2)&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above forbids some operations we would like to perform, in particular if the operation is ‘divide’ and we want to normalise the detectors by a monitor. In this case we would want to be able to achieve this operation by having no detector map file, i.e. we want  &lt;br /&gt;
R1/R2  = α1(d1,m1) / α2(-,m2) = α1(d1/m2, m1/m2)&lt;br /&gt;
for m2 corresponding to a single monitor. So let’s consider the various combinations of unassigned detector and/or monitor d2D:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
α1 (d1,-) + α2 (d2,m2) = α (d1+d2, d1+m2)	α is α2 if it matches; else operation is invalid. (This rule is the same as the one above, as α1 is guaranteed not to match)&lt;br /&gt;
α1 (-,m1) + α2 (d2,m2) = α (m1+d2, m1+m2)&lt;br /&gt;
&lt;br /&gt;
and by symmetry;&lt;br /&gt;
&lt;br /&gt;
α1 (d1, m1) + α2 (d2,-) = α (d1+d2, m1+d2)	α is α1 if it matches; else operation is invalid (This rule is the same as the one above, as α1 is guaranteed not to match)&lt;br /&gt;
&lt;br /&gt;
α1 (d1, m1) + α2 (-,m2) = α (d1+m2, m1+m2)&lt;br /&gt;
&lt;br /&gt;
(The qualitative rule here is: ‘if one of d and m is unassigned for just one of the two runfiles, fill in the missing d or m with the m or d respectively, then add as when nothing is missing’)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally:&lt;br /&gt;
&lt;br /&gt;
α1 (d1,-) + α2 (-,m2) = α (d1+m2, -)			Same rule on α as always&lt;br /&gt;
&lt;br /&gt;
α1 (-, m1) + α2 (d2,-) = α (m1+d2, -)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Unary operators&lt;br /&gt;
3.1 Operations on x-axis&lt;br /&gt;
Ones which apply only to the x-axis, such as rebin_x, integrate_x, shift_x etc. are straightforward:&lt;br /&gt;
&lt;br /&gt;
Ux[α(d,m)] = α(Ux[d], Ux[m])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
other manipulations&lt;br /&gt;
&lt;br /&gt;
rebin/rebunch/regroup/integrate/shift_x/deriv1x/deriv2x&lt;/div&gt;</summary>
		<author><name>Dickon Champion</name></author>
	</entry>
	<entry>
		<id>http://libisis.org/index.php?title=Using_Homer_and_Getting_Started&amp;diff=2526</id>
		<title>Using Homer and Getting Started</title>
		<link rel="alternate" type="text/html" href="http://libisis.org/index.php?title=Using_Homer_and_Getting_Started&amp;diff=2526"/>
		<updated>2008-06-27T15:34:21Z</updated>

		<summary type="html">&lt;p&gt;Dickon Champion: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[Getting Started]] &amp;#039;&amp;#039;&amp;#039;VERY IMPORTANT&amp;#039;&amp;#039;&amp;#039; setup details defined&lt;br /&gt;
&lt;br /&gt;
* [[Homer GUI]] - mini tutorial with screenshots&lt;br /&gt;
&lt;br /&gt;
*[[Scripting Homer Functions]] are easy to use functions which call homer related functions underneath, as well as setting up the [[IXTdata_source]] object for use by homer&lt;br /&gt;
&lt;br /&gt;
*[[Homer and mgenie style functions]] Direct calls to homer and some mgenie style functions&lt;br /&gt;
&lt;br /&gt;
*[[Homer Utilities]] head and get_ei&lt;br /&gt;
&lt;br /&gt;
*[[IXTrunfile operations]] including algebra, elementary functions and other manipulations&lt;br /&gt;
&lt;br /&gt;
*[[diagnose]] diagnostic function for homer input&lt;br /&gt;
&lt;br /&gt;
*[[Example Scripts]]&lt;/div&gt;</summary>
		<author><name>Dickon Champion</name></author>
	</entry>
	<entry>
		<id>http://libisis.org/index.php?title=Using_Homer_and_Getting_Started&amp;diff=2525</id>
		<title>Using Homer and Getting Started</title>
		<link rel="alternate" type="text/html" href="http://libisis.org/index.php?title=Using_Homer_and_Getting_Started&amp;diff=2525"/>
		<updated>2008-06-27T15:30:52Z</updated>

		<summary type="html">&lt;p&gt;Dickon Champion: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[Getting Started]] &amp;#039;&amp;#039;&amp;#039;VERY IMPORTANT&amp;#039;&amp;#039;&amp;#039; setup details defined&lt;br /&gt;
&lt;br /&gt;
* [[Homer GUI]] - mini tutorial with screenshots&lt;br /&gt;
&lt;br /&gt;
*[[Scripting Homer Functions]] are easy to use functions which call homer related functions underneath, as well as setting up the [[IXTdata_source]] object for use by homer&lt;br /&gt;
&lt;br /&gt;
*[[Homer and mgenie style functions]] Direct calls to homer and some mgenie style functions&lt;br /&gt;
&lt;br /&gt;
*[[Homer Utilities]] head and get_ei&lt;br /&gt;
&lt;br /&gt;
*[[IXTrunfile algebra]]&lt;br /&gt;
&lt;br /&gt;
*[[diagnose]] diagnostic function for homer input&lt;br /&gt;
&lt;br /&gt;
*[[Example Scripts]]&lt;/div&gt;</summary>
		<author><name>Dickon Champion</name></author>
	</entry>
	<entry>
		<id>http://libisis.org/index.php?title=Using_Homer_and_Getting_Started&amp;diff=2524</id>
		<title>Using Homer and Getting Started</title>
		<link rel="alternate" type="text/html" href="http://libisis.org/index.php?title=Using_Homer_and_Getting_Started&amp;diff=2524"/>
		<updated>2008-06-27T15:30:40Z</updated>

		<summary type="html">&lt;p&gt;Dickon Champion: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[Getting Started]] &amp;#039;&amp;#039;&amp;#039;VERY IMPORTANT&amp;#039;&amp;#039;&amp;#039; setup details defined&lt;br /&gt;
&lt;br /&gt;
* [[Homer GUI]] - mini tutorial with screenshots&lt;br /&gt;
&lt;br /&gt;
*[[Scripting Homer Functions]] are easy to use functions which call homer related functions underneath, as well as setting up the [[IXTdata_source]] object for use by homer&lt;br /&gt;
&lt;br /&gt;
*[[Homer and mgenie style functions]] Direct calls to homer and some mgenie style functions&lt;br /&gt;
&lt;br /&gt;
*[[Homer Utilities]] head and get_ei&lt;br /&gt;
&lt;br /&gt;
*[[Runfile algebra]]&lt;br /&gt;
&lt;br /&gt;
*[[diagnose]] diagnostic function for homer input&lt;br /&gt;
&lt;br /&gt;
*[[Example Scripts]]&lt;/div&gt;</summary>
		<author><name>Dickon Champion</name></author>
	</entry>
	<entry>
		<id>http://libisis.org/index.php?title=Input_and_Output_Functions&amp;diff=2523</id>
		<title>Input and Output Functions</title>
		<link rel="alternate" type="text/html" href="http://libisis.org/index.php?title=Input_and_Output_Functions&amp;diff=2523"/>
		<updated>2008-06-27T15:23:07Z</updated>

		<summary type="html">&lt;p&gt;Dickon Champion: /* Nexus Files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ASCII Files ==&lt;br /&gt;
&lt;br /&gt;
* [[IXTdataset_1d]] objects may be stored in ASCII files. &lt;br /&gt;
* These files may contain x and y data &amp;#039;&amp;#039;or&amp;#039;&amp;#039; x, s, error data in a 2 or 3 column format. &lt;br /&gt;
* Column 1 will be x values, column 2 will be s values and if available column 3 will be error values, if not available then error is assumed to be 0. &lt;br /&gt;
* Any information at the start or end of the file that is not in a 2 or 3 column format is &amp;#039;&amp;#039;&amp;#039;ignored&amp;#039;&amp;#039;&amp;#039; (for instance, &amp;#039;&amp;#039;header information&amp;#039;&amp;#039; may be stored here). &lt;br /&gt;
* Columns may be separated by commas, tabs, or spaces. &lt;br /&gt;
* ASCII files may contain point or histogram data, the x column in histogram data will have one more value than the s and e columns. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* The following files would all be acceptable ASCII files  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;title = plots1 xaxis = wavelength yaxis = signal &lt;br /&gt;
490.2 30000&lt;br /&gt;
491.2 31923&lt;br /&gt;
492.2 40000&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Represents a three point dataset with 0 error.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;title = plots1 xaxis = wavelength yaxis = signal &lt;br /&gt;
490.2 30000 300&lt;br /&gt;
491.2 31923 300 &lt;br /&gt;
492.2 40000 250&lt;br /&gt;
493.2&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Represents a 3 column histogram dataset with error data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;490.2,30000,300&lt;br /&gt;
491.2,31923,300&lt;br /&gt;
492.2,40000,250&lt;br /&gt;
493.2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will represent the same 3 column histogram dataset with error data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* When files are &amp;#039;&amp;#039;&amp;#039;written&amp;#039;&amp;#039;&amp;#039; by libisis a header is written at the top of the file with the following information &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;name = dataset name&lt;br /&gt;
title = dataset title &lt;br /&gt;
signal_units = dataset s axis label &lt;br /&gt;
x_units = dataset x axis label&lt;br /&gt;
x_distribution = 1&lt;br /&gt;
&lt;br /&gt;
x1 s1 e1&lt;br /&gt;
x2 s2 e2 &lt;br /&gt;
...&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where the header information is taken from the dataset being written.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* To read and write ASCII files in the format (point or histogram) specified by the file or dataset use&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;gt;&amp;gt; read_ascii(&amp;#039;filename&amp;#039;)&lt;br /&gt;
&amp;gt;&amp;gt; write_ascii(dataset,&amp;#039;filename&amp;#039;)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if no filename is given then the user will be prompted to locate the file. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Point Data === &lt;br /&gt;
One can force the written or read ASCII file to be in the form of point data by using the commands&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;gt;&amp;gt;read_points(&amp;#039;filename&amp;#039;)&lt;br /&gt;
write_points(dataset, &amp;#039;filename&amp;#039;)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Histogram Data ===&lt;br /&gt;
One can force the written or read ASCII file to be in the form of histogram data by using the commands &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;gt;&amp;gt; read_hist(&amp;#039;filename&amp;#039;)&lt;br /&gt;
&amp;gt;&amp;gt; write_hist(dataset, &amp;#039;filename&amp;#039;)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== RAW Files ==&lt;br /&gt;
&lt;br /&gt;
RAW files come directly from instruments and can also be read into Libisis. Data can then be extracted from the RAW file to form an [[IXTdataset_1d]] or an [[IXTdataset_2d]] object. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* To read in a rawfile (in the form of an [[IXTraw_file]] object) use the command &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;gt;&amp;gt; rawfile1 = IXTraw_file(&amp;#039;filename&amp;#039;)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* To read data into an [[IXTdataset_1d]] object use the command&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;gt;&amp;gt; dataset = getspectrum(rawfile1, spectrum_number)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where &amp;#039;&amp;#039;&amp;#039;spectrum_number&amp;#039;&amp;#039;&amp;#039; is the spectrum which is required. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* to read multiple runs into an [[IXTdataset_2d]] object use the command&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;gt;&amp;gt; dataset_2d = getspectra(rawfile1, [start:end])&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where start and end are the initial and final spectrum to include in the dataset_2d.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; EXAMPLE: &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;gt;&amp;gt; rawfile1 = IXTraw_file(&amp;#039;c:/RAWfiles/HET15958&amp;#039;);&lt;br /&gt;
&amp;gt;&amp;gt; nsp = geti(rawfile1,&amp;#039;nsp1&amp;#039;);&lt;br /&gt;
&amp;gt;&amp;gt; d2a = getspectra(rawfile1, [1:nsp]);&lt;br /&gt;
&amp;gt;&amp;gt; d1a = getspectrum(rawfile1, 25); &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
this will load all spectra from the HET15958 raw file contained in the folder c:/RAWfiles into an [[IXTdataset_2d]] object called d2a and load spectrum 25 into an [[IXTdataset_1d]] object name d1a.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Other information is contained in the rawfile, see [[IXTraw_file]] documentation for more information.&lt;br /&gt;
&lt;br /&gt;
==Slices, Cuts and Masks==&lt;br /&gt;
&lt;br /&gt;
Some other programs can generate a slice, cut or mask object. Two such programs are mslice and Horace.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A slice can be read into a Libisis [[IXTdataset_2d]] object using the command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;gt;&amp;gt;w = read_slice(filename)&lt;br /&gt;
w = read_slice&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;filename&amp;#039;&amp;#039;&amp;#039; is a string containing the location of the .slc file&lt;br /&gt;
* If filename is not given then a prompt will ask the user to locate the file&lt;br /&gt;
* Output is an [[IXTdataset_2d]], with as much information taken from the slice as possible, otherwise fields are blank.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Similarly, a Mask or a cut from Horace / mslice can be read into Libisis [[IXTdataset_1d]] objects using the commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;gt;&amp;gt;w = read_cut(filename)&lt;br /&gt;
&amp;gt;&amp;gt; w = read_mask(filename)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;filename&amp;#039;&amp;#039;&amp;#039; is a string containing the location of the .cut or .msk file&lt;br /&gt;
* If filename is not given then a prompt will ask the user to locate the file&lt;br /&gt;
* Output is an [[IXTdataset_1d]], with as much information taken from the cut / mask as possible, otherwise fields are blank.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Nexus Files==&lt;br /&gt;
&lt;br /&gt;
Objects can be written to file in hdf format using the nexus API, using the write_nxs function. These files can also be read in using the read_nxs command.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;gt;&amp;gt; write_nxs(IXTobject,&amp;#039;filename&amp;#039;, entry)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;IXTobject&amp;#039;&amp;#039;&amp;#039; is the object that is being written out (i.e. [[IXTrunfile]], [[IXTdataset_2d]])&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;filename&amp;#039;&amp;#039;&amp;#039; is a string showing the location of the .nxs file which is being written&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;entry&amp;#039;&amp;#039;&amp;#039; is a string, the top level directory to write the object to (i.e. &amp;#039;runfile&amp;#039;), by &amp;#039;&amp;#039;default&amp;#039;&amp;#039; it is &amp;#039;object&amp;#039; (optional)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt; write_nxs(IXTrunfile,&amp;#039;C:/nexusfiles/maps1020.nxs&amp;#039;)&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
writes the data from the IXTrunfile object into the top-level directory &amp;#039;runfile&amp;#039; of the maps1020.nxs file&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;gt;&amp;gt;w = read_nxs(filename, IXTobject, entry)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;filename&amp;#039;&amp;#039;&amp;#039; is a string showing the location of the .nxs file&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;IXTobject&amp;#039;&amp;#039;&amp;#039; is the type of object that the data is being read into (i.e. [[IXTrunfile]], [[IXTdataset_2d]])&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;entry&amp;#039;&amp;#039;&amp;#039; is a string, the top level directory to read the object from (i.e. &amp;#039;runfile&amp;#039;), by &amp;#039;&amp;#039;default&amp;#039;&amp;#039; it is &amp;#039;object&amp;#039; (optional)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;w&amp;#039;&amp;#039;&amp;#039; is the actual object which will hold the data being read, it will be of the same object type as IXTobject (i.e. [[IXTrunfile]]) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;wout = read_nxs(&amp;#039;C:/nexusfiles/maps1020.nxs&amp;#039;, IXTrunfile, &amp;#039;runfile&amp;#039;)&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
reads the data from the runfile top directory into the wout object that will be an [[IXTrunfile]] object.&lt;br /&gt;
&lt;br /&gt;
== Other Formats ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Data can be read from other formats or in other ways, such as using [[Homer_and_mgenie_style_functions| Homer]] to populate an [[IXTrunfile]] object.&lt;/div&gt;</summary>
		<author><name>Dickon Champion</name></author>
	</entry>
	<entry>
		<id>http://libisis.org/index.php?title=Download_and_setup_LIBISIS&amp;diff=2522</id>
		<title>Download and setup LIBISIS</title>
		<link rel="alternate" type="text/html" href="http://libisis.org/index.php?title=Download_and_setup_LIBISIS&amp;diff=2522"/>
		<updated>2008-06-27T14:28:34Z</updated>

		<summary type="html">&lt;p&gt;Dickon Champion: /* Download LIBISIS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Download Homer &amp;#039;blackbox&amp;#039; ==&lt;br /&gt;
* If you do not have matlab it is possible to download an executable which will run the homer GUI standalone&lt;br /&gt;
&lt;br /&gt;
{| {{Tablestyle}}&lt;br /&gt;
|-&lt;br /&gt;
! {{Headcellstyle}} | Windows&lt;br /&gt;
!{{Headcellstyle}} | Linux&lt;br /&gt;
! {{Headcellstyle}} | MacOS&lt;br /&gt;
|-&lt;br /&gt;
| [[Media:homer_blackbox.zip|homer_blackbox.zip]] &lt;br /&gt;
| not available&lt;br /&gt;
| not available&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
you must also install the matlab [[Media:mcrinstaller.exe|mcr runtime libraries]] for it to work&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Download LIBISIS ==&lt;br /&gt;
* Download the latest libisis build for your version of matlab,(currently the only download will work with Matlab 2007a or later)&lt;br /&gt;
&lt;br /&gt;
{| {{Tablestyle}}&lt;br /&gt;
|-&lt;br /&gt;
! {{Headcellstyle}} | Windows&lt;br /&gt;
!{{Headcellstyle}} | Linux&lt;br /&gt;
! {{Headcellstyle}} | MacOS&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[Media:7sp3_libisis.zip|matlab7sp3_libisis.zip]]&lt;br /&gt;
&lt;br /&gt;
[[Media:2006a_libisis.zip|2006a_libisis.zip]]&lt;br /&gt;
&lt;br /&gt;
[[Media:2006b_libisis.zip|2006b_libisis.zip]]&lt;br /&gt;
&lt;br /&gt;
[[Media:libisis.zip|2007a_libisis.zip]] &lt;br /&gt;
&lt;br /&gt;
[[Media:2007b_libisis.zip|2007b_libisis.zip]] &lt;br /&gt;
&lt;br /&gt;
| not available at the moment, requires extra rpms&lt;br /&gt;
| not available at the moment&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Windows===&lt;br /&gt;
* Unpack this file into &amp;lt;tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;C:\mprogs&amp;#039;&amp;#039;&amp;#039;&amp;lt;/tt&amp;gt; or a directory of your choice eg &amp;lt;tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;X:\analysis&amp;#039;&amp;#039;&amp;#039;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Requirements===&lt;br /&gt;
&lt;br /&gt;
* Matlab 2007a (or later) &lt;br /&gt;
* 1GB RAM memory &lt;br /&gt;
* 40MB free hard drive space&lt;br /&gt;
&lt;br /&gt;
== Setup Paths ==&lt;br /&gt;
* Copy the libisis_start.m file into &amp;lt;tt&amp;gt;C:\mprogs&amp;lt;/tt&amp;gt; or into the directory where your matlab starts&lt;br /&gt;
&lt;br /&gt;
* there are two ways you can make sure the paths are set in the matlab instance&lt;br /&gt;
# call the libisis_start function from the command line, with the name of the libisis directory which was unpacked see the example below&lt;br /&gt;
# or you can add the line below into your startup.m, the path to the libisis_start function &amp;#039;&amp;#039;&amp;#039;must&amp;#039;&amp;#039;&amp;#039; of course be in the matlab path, so you may have to add C:\mprogs or X:\analysis to the path in the startup.m already&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; libisis_start(&amp;#039;C:\mprogs\libisis_2008_01_18_1356&amp;#039;)&lt;br /&gt;
&amp;gt;&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; libisis_start(&amp;#039;X:\analysis\libisis_2008_01_18_1356&amp;#039;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setup Memory Usage ==&lt;br /&gt;
&lt;br /&gt;
Sometimes when we are treating large datasets, such as on MAPS, we cannot load all the data into the memory of the computer at once, we need to &amp;#039;chunk&amp;#039; the data into smaller pieces. We therefore need to set the default number of workspaces in each &amp;#039;chunk&amp;#039; to treat at any one time during the population of an [[IXTrunfile]] and the total amount of memory to allow the computer to use. &lt;br /&gt;
&lt;br /&gt;
If the memory required for the number of workspaces in each chunk is greater than that defined then the number of workspaces is reduced until it fits in the memory or a failure status is raised. These two values are defined in &amp;lt;tt&amp;gt;./matlab/homer/default_homer_nchunk.m&amp;lt;/tt&amp;gt; which needs to be edited to suit the memory needs of your computer. Tests have shown that LIBISIS will populate data fastest when it is chunked in groups of 100 workspaces, so this is the default value in the file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function nchunk=default_homer_nchunk&lt;br /&gt;
% nchunk = default_homer_nchunk&lt;br /&gt;
% nchunk is a two membered array&lt;br /&gt;
% the first element is the default number of workspaces to be treated at &lt;br /&gt;
% one time, and the second element is the maximum amount of memory (in MB)&lt;br /&gt;
% that you want the computer to use&lt;br /&gt;
nchunk=int32([100,500]);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dickon Champion</name></author>
	</entry>
	<entry>
		<id>http://libisis.org/index.php?title=Download_and_setup_LIBISIS&amp;diff=2521</id>
		<title>Download and setup LIBISIS</title>
		<link rel="alternate" type="text/html" href="http://libisis.org/index.php?title=Download_and_setup_LIBISIS&amp;diff=2521"/>
		<updated>2008-06-27T14:23:05Z</updated>

		<summary type="html">&lt;p&gt;Dickon Champion: /* Download LIBISIS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Download Homer &amp;#039;blackbox&amp;#039; ==&lt;br /&gt;
* If you do not have matlab it is possible to download an executable which will run the homer GUI standalone&lt;br /&gt;
&lt;br /&gt;
{| {{Tablestyle}}&lt;br /&gt;
|-&lt;br /&gt;
! {{Headcellstyle}} | Windows&lt;br /&gt;
!{{Headcellstyle}} | Linux&lt;br /&gt;
! {{Headcellstyle}} | MacOS&lt;br /&gt;
|-&lt;br /&gt;
| [[Media:homer_blackbox.zip|homer_blackbox.zip]] &lt;br /&gt;
| not available&lt;br /&gt;
| not available&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
you must also install the matlab [[Media:mcrinstaller.exe|mcr runtime libraries]] for it to work&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Download LIBISIS ==&lt;br /&gt;
* Download the latest libisis build for your version of matlab,(currently the only download will work with Matlab 2007a or later)&lt;br /&gt;
&lt;br /&gt;
{| {{Tablestyle}}&lt;br /&gt;
|-&lt;br /&gt;
! {{Headcellstyle}} | Windows&lt;br /&gt;
!{{Headcellstyle}} | Linux&lt;br /&gt;
! {{Headcellstyle}} | MacOS&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[Media:matlab7sp3_libisis.zip|matlab7sp3_libisis.zip]]&lt;br /&gt;
&lt;br /&gt;
[[Media:2006a_libisis.zip|2006a_libisis.zip]]&lt;br /&gt;
&lt;br /&gt;
[[Media:2006b_libisis.zip|2006b_libisis.zip]]&lt;br /&gt;
&lt;br /&gt;
[[Media:libisis.zip|2007a_libisis.zip]] &lt;br /&gt;
&lt;br /&gt;
[[Media:2007b_libisis.zip|2007b_libisis.zip]] &lt;br /&gt;
&lt;br /&gt;
| not available at the moment, requires extra rpms&lt;br /&gt;
| not available at the moment&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Windows===&lt;br /&gt;
* Unpack this file into &amp;lt;tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;C:\mprogs&amp;#039;&amp;#039;&amp;#039;&amp;lt;/tt&amp;gt; or a directory of your choice eg &amp;lt;tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;X:\analysis&amp;#039;&amp;#039;&amp;#039;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Requirements===&lt;br /&gt;
&lt;br /&gt;
* Matlab 2007a (or later) &lt;br /&gt;
* 1GB RAM memory &lt;br /&gt;
* 40MB free hard drive space&lt;br /&gt;
&lt;br /&gt;
== Setup Paths ==&lt;br /&gt;
* Copy the libisis_start.m file into &amp;lt;tt&amp;gt;C:\mprogs&amp;lt;/tt&amp;gt; or into the directory where your matlab starts&lt;br /&gt;
&lt;br /&gt;
* there are two ways you can make sure the paths are set in the matlab instance&lt;br /&gt;
# call the libisis_start function from the command line, with the name of the libisis directory which was unpacked see the example below&lt;br /&gt;
# or you can add the line below into your startup.m, the path to the libisis_start function &amp;#039;&amp;#039;&amp;#039;must&amp;#039;&amp;#039;&amp;#039; of course be in the matlab path, so you may have to add C:\mprogs or X:\analysis to the path in the startup.m already&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; libisis_start(&amp;#039;C:\mprogs\libisis_2008_01_18_1356&amp;#039;)&lt;br /&gt;
&amp;gt;&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; libisis_start(&amp;#039;X:\analysis\libisis_2008_01_18_1356&amp;#039;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setup Memory Usage ==&lt;br /&gt;
&lt;br /&gt;
Sometimes when we are treating large datasets, such as on MAPS, we cannot load all the data into the memory of the computer at once, we need to &amp;#039;chunk&amp;#039; the data into smaller pieces. We therefore need to set the default number of workspaces in each &amp;#039;chunk&amp;#039; to treat at any one time during the population of an [[IXTrunfile]] and the total amount of memory to allow the computer to use. &lt;br /&gt;
&lt;br /&gt;
If the memory required for the number of workspaces in each chunk is greater than that defined then the number of workspaces is reduced until it fits in the memory or a failure status is raised. These two values are defined in &amp;lt;tt&amp;gt;./matlab/homer/default_homer_nchunk.m&amp;lt;/tt&amp;gt; which needs to be edited to suit the memory needs of your computer. Tests have shown that LIBISIS will populate data fastest when it is chunked in groups of 100 workspaces, so this is the default value in the file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function nchunk=default_homer_nchunk&lt;br /&gt;
% nchunk = default_homer_nchunk&lt;br /&gt;
% nchunk is a two membered array&lt;br /&gt;
% the first element is the default number of workspaces to be treated at &lt;br /&gt;
% one time, and the second element is the maximum amount of memory (in MB)&lt;br /&gt;
% that you want the computer to use&lt;br /&gt;
nchunk=int32([100,500]);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dickon Champion</name></author>
	</entry>
	<entry>
		<id>http://libisis.org/index.php?title=Download_and_setup_LIBISIS&amp;diff=2520</id>
		<title>Download and setup LIBISIS</title>
		<link rel="alternate" type="text/html" href="http://libisis.org/index.php?title=Download_and_setup_LIBISIS&amp;diff=2520"/>
		<updated>2008-06-27T14:20:40Z</updated>

		<summary type="html">&lt;p&gt;Dickon Champion: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Download Homer &amp;#039;blackbox&amp;#039; ==&lt;br /&gt;
* If you do not have matlab it is possible to download an executable which will run the homer GUI standalone&lt;br /&gt;
&lt;br /&gt;
{| {{Tablestyle}}&lt;br /&gt;
|-&lt;br /&gt;
! {{Headcellstyle}} | Windows&lt;br /&gt;
!{{Headcellstyle}} | Linux&lt;br /&gt;
! {{Headcellstyle}} | MacOS&lt;br /&gt;
|-&lt;br /&gt;
| [[Media:homer_blackbox.zip|homer_blackbox.zip]] &lt;br /&gt;
| not available&lt;br /&gt;
| not available&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
you must also install the matlab [[Media:mcrinstaller.exe|mcr runtime libraries]] for it to work&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Download LIBISIS ==&lt;br /&gt;
* Download the latest libisis build (This download will work with Matlab 2007a or later)&lt;br /&gt;
&lt;br /&gt;
{| {{Tablestyle}}&lt;br /&gt;
|-&lt;br /&gt;
! {{Headcellstyle}} | Windows&lt;br /&gt;
!{{Headcellstyle}} | Linux&lt;br /&gt;
! {{Headcellstyle}} | MacOS&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[Media:matlab7sp3_libisis.zip|matlab7sp3_libisis.zip]]&lt;br /&gt;
&lt;br /&gt;
[[Media:2006a_libisis.zip|2006a_libisis.zip]]&lt;br /&gt;
&lt;br /&gt;
[[Media:2006b_libisis.zip|2006b_libisis.zip]]&lt;br /&gt;
&lt;br /&gt;
[[Media:libisis.zip|2007a_libisis.zip]] &lt;br /&gt;
&lt;br /&gt;
[[Media:2007b_libisis.zip|2007b_libisis.zip]] &lt;br /&gt;
&lt;br /&gt;
| not available at the moment, requires extra rpms&lt;br /&gt;
| not available at the moment&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Windows===&lt;br /&gt;
* Unpack this file into &amp;lt;tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;C:\mprogs&amp;#039;&amp;#039;&amp;#039;&amp;lt;/tt&amp;gt; or a directory of your choice eg &amp;lt;tt&amp;gt;&amp;#039;&amp;#039;&amp;#039;X:\analysis&amp;#039;&amp;#039;&amp;#039;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Requirements===&lt;br /&gt;
&lt;br /&gt;
* Matlab 2007a (or later) &lt;br /&gt;
* 1GB RAM memory &lt;br /&gt;
* 40MB free hard drive space&lt;br /&gt;
&lt;br /&gt;
== Setup Paths ==&lt;br /&gt;
* Copy the libisis_start.m file into &amp;lt;tt&amp;gt;C:\mprogs&amp;lt;/tt&amp;gt; or into the directory where your matlab starts&lt;br /&gt;
&lt;br /&gt;
* there are two ways you can make sure the paths are set in the matlab instance&lt;br /&gt;
# call the libisis_start function from the command line, with the name of the libisis directory which was unpacked see the example below&lt;br /&gt;
# or you can add the line below into your startup.m, the path to the libisis_start function &amp;#039;&amp;#039;&amp;#039;must&amp;#039;&amp;#039;&amp;#039; of course be in the matlab path, so you may have to add C:\mprogs or X:\analysis to the path in the startup.m already&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; libisis_start(&amp;#039;C:\mprogs\libisis_2008_01_18_1356&amp;#039;)&lt;br /&gt;
&amp;gt;&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; libisis_start(&amp;#039;X:\analysis\libisis_2008_01_18_1356&amp;#039;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setup Memory Usage ==&lt;br /&gt;
&lt;br /&gt;
Sometimes when we are treating large datasets, such as on MAPS, we cannot load all the data into the memory of the computer at once, we need to &amp;#039;chunk&amp;#039; the data into smaller pieces. We therefore need to set the default number of workspaces in each &amp;#039;chunk&amp;#039; to treat at any one time during the population of an [[IXTrunfile]] and the total amount of memory to allow the computer to use. &lt;br /&gt;
&lt;br /&gt;
If the memory required for the number of workspaces in each chunk is greater than that defined then the number of workspaces is reduced until it fits in the memory or a failure status is raised. These two values are defined in &amp;lt;tt&amp;gt;./matlab/homer/default_homer_nchunk.m&amp;lt;/tt&amp;gt; which needs to be edited to suit the memory needs of your computer. Tests have shown that LIBISIS will populate data fastest when it is chunked in groups of 100 workspaces, so this is the default value in the file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function nchunk=default_homer_nchunk&lt;br /&gt;
% nchunk = default_homer_nchunk&lt;br /&gt;
% nchunk is a two membered array&lt;br /&gt;
% the first element is the default number of workspaces to be treated at &lt;br /&gt;
% one time, and the second element is the maximum amount of memory (in MB)&lt;br /&gt;
% that you want the computer to use&lt;br /&gt;
nchunk=int32([100,500]);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dickon Champion</name></author>
	</entry>
	<entry>
		<id>http://libisis.org/index.php?title=Matlab_Bindings&amp;diff=2518</id>
		<title>Matlab Bindings</title>
		<link rel="alternate" type="text/html" href="http://libisis.org/index.php?title=Matlab_Bindings&amp;diff=2518"/>
		<updated>2008-05-16T16:27:13Z</updated>

		<summary type="html">&lt;p&gt;Dickon Champion: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
The main binding to the Libisis framework which has been implemented is matlab. Each type defined in the framework has a module which contains type-specific methods for getting objects and variables from the matlab front-end and sending objects and variables back to the matlab front-end. These methods are called using two interfaces which are defined in a module &amp;lt;tt&amp;gt;IXMm_classname&amp;lt;/tt&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;IXBgetFromBinding&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;IXBsendToBinding&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This module is always defined in the file &amp;lt;tt&amp;gt;bindings/matlab/IXMclassname_m.f90&amp;lt;/tt&amp;gt;. As a rule this module always contains the line &amp;lt;tt&amp;gt;use IXMclassname&amp;lt;/tt&amp;gt; (it is however included automatically and does not need to be explicitly specified in the code)&lt;br /&gt;
&lt;br /&gt;
The interfaces and methods of the &amp;lt;tt&amp;gt;IXMm_classname&amp;lt;/tt&amp;gt; module are generated automatically using the preprocessor, in the following example for the &amp;lt;tt&amp;gt;IXTtestclass&amp;lt;/tt&amp;gt; object in the &amp;lt;tt&amp;gt;IXMtestclass_m.f90&amp;lt;/tt&amp;gt; file. These are the &amp;#039;&amp;#039;&amp;#039;only&amp;#039;&amp;#039;&amp;#039; statements required to define the &amp;lt;tt&amp;gt;IXMm_testclass&amp;lt;/tt&amp;gt; module.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
module IXMm_testclass&lt;br /&gt;
&lt;br /&gt;
#define IXD_TYPE testclass&lt;br /&gt;
#include &amp;quot;bindings_header.f90&amp;quot;&lt;br /&gt;
&lt;br /&gt;
contains&lt;br /&gt;
&lt;br /&gt;
#define IXD_TYPE testclass&lt;br /&gt;
#include &amp;quot;bindings_base.f90&amp;quot;&lt;br /&gt;
&lt;br /&gt;
end module IXMm_testclass&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a class method implemented in the fortran framework is to be called from the matlab front-end various steps need to be followed.&lt;br /&gt;
&lt;br /&gt;
==define an appropriate binding subroutine in &amp;lt;tt&amp;gt;IXMclassname_m.f90&amp;lt;/tt&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
functions which are called from matlab are defined in the same file but outside of the &amp;lt;tt&amp;gt;IXMm_classname&amp;lt;/tt&amp;gt; module. They are all prefixed with &amp;lt;tt&amp;gt;IXB&amp;lt;/tt&amp;gt;. all the standard functions which are called such as &amp;lt;tt&amp;gt;IXBdisplay_classname, IXBcheck_classname&amp;lt;/tt&amp;gt; are auto-generated using the preprocessor, so do not need any extra implementation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#define IXD_TYPE testclass&lt;br /&gt;
#include &amp;quot;bindings_extra.f90&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
only functions which are extra to the standard module subroutines which you need to call from matlab have to have a binding subroutine defined. We can create an &amp;lt;tt&amp;gt;IXBplus_testclass&amp;lt;/tt&amp;gt; subroutine to allow matlab calling of the [[Libclasses#Example_object_method|IXFplus_testclass]] method of &amp;lt;tt&amp;gt;IXTtestclass&amp;lt;/tt&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
The arguments of every &amp;lt;tt&amp;gt;IXBmethod_classname&amp;lt;/tt&amp;gt; subroutine are the same&lt;br /&gt;
* &amp;lt;tt&amp;gt;nlhs&amp;lt;/tt&amp;gt; is the number of left hand side arguments from matlab (ie what is the output of the matlab call)&lt;br /&gt;
* &amp;lt;tt&amp;gt;plhs(nlhs)&amp;lt;/tt&amp;gt; is an array of pointers to the left hand side arguments&lt;br /&gt;
* &amp;lt;tt&amp;gt;nrhs&amp;lt;/tt&amp;gt; is the number of right hand side arguments from matlab (ie what are the arguments of the matlab call)&lt;br /&gt;
* &amp;lt;tt&amp;gt;prhs(nrhs)&amp;lt;/tt&amp;gt; is an array of pointers to the right hand side arguments&lt;br /&gt;
&lt;br /&gt;
for the most part memory is shared between the matlab binding and fortran framework, so we work with pointers.&lt;br /&gt;
&lt;br /&gt;
there are four types of subroutine which can be called, each with different variables which are returned to the matlab front-end&lt;br /&gt;
# functions which have no variable output eg. display,check (defined in &amp;lt;tt&amp;gt;bindings_base.f90&amp;lt;/tt&amp;gt;)&lt;br /&gt;
# functions which return a simple type (&amp;lt;tt&amp;gt;real, integer, character&amp;lt;/tt&amp;gt;) eg. getting a value from an object&lt;br /&gt;
# functions which return an object(s) (&amp;lt;tt&amp;gt;IXTtestclass, IXTdataset_2d&amp;lt;/tt&amp;gt;) eg. the result of a plus operation (defined below)&lt;br /&gt;
# functions which return an object(s) and a simple type back to matlab &lt;br /&gt;
&lt;br /&gt;
the &amp;lt;tt&amp;gt;IXBgetFromBinding&amp;lt;/tt&amp;gt; command reads data into a variable which has been passed down to the bindings layer from the matlab front-end. the call syntax is defined below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    call IXFgetFromBinding(prhs(number),&amp;#039; &amp;#039;,1,0,variable,status)&lt;br /&gt;
    call IXFgetFromBindingPtr(prhs(number),&amp;#039; &amp;#039;,1,0,variable,status)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* the 1st argument defines which matlab pointer to read the data from according to &amp;lt;tt&amp;gt;number&amp;lt;/tt&amp;gt;, which refers to the position of the right hand side argument when the [[Matlab Bindings#write an appropriate matlab function|matlab function]] is called&lt;br /&gt;
* the 2nd, 3rd &amp;amp; 4th arguments are &amp;#039;&amp;#039;&amp;#039;always&amp;#039;&amp;#039;&amp;#039; &amp;lt;tt&amp;gt;  &amp;#039; &amp;#039;,1,0  &amp;lt;/tt&amp;gt; &lt;br /&gt;
* the 5th argument is the variable to be populated&lt;br /&gt;
* if a variable length array is to be populated, the variable is defined as a &amp;lt;tt&amp;gt;pointer&amp;lt;/tt&amp;gt; and the &amp;lt;tt&amp;gt;IXBgetFromBindingPtr&amp;lt;/tt&amp;gt; subroutine is called, with the same syntax&lt;br /&gt;
* if a structure is to be returned to the matlab front-end &amp;lt;tt&amp;gt;prhs(1)&amp;lt;/tt&amp;gt; is generally reserved for the object to be returned, it does not need to be read in, more details are specified [[Matlab Bindings#write an appropriate matlab function|below]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
when data is sent back to the matlab front-end the &amp;lt;tt&amp;gt;IXBsendToBinding&amp;lt;/tt&amp;gt; subroutine is called. There are two possible syntaxes:&lt;br /&gt;
&lt;br /&gt;
1) if we are returning a simple type variable &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    call IXFsendToBinding(plhs(number_left),&amp;#039; &amp;#039;,1,0,variable,status)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* the 1st argument defines which matlab pointer to write the data in to according to &amp;lt;tt&amp;gt;number_left&amp;lt;/tt&amp;gt;, which refers to the position of the left hand side argument when the [[Matlab Bindings#write an appropriate matlab function|matlab function]] is called&lt;br /&gt;
* the 2nd, 3rd &amp;amp; 4th arguments are &amp;#039;&amp;#039;&amp;#039;always&amp;#039;&amp;#039;&amp;#039; &amp;lt;tt&amp;gt;  &amp;#039; &amp;#039;,1,0  &amp;lt;/tt&amp;gt; &lt;br /&gt;
* the 5th argument is the variable to be sent back to the matlab front-end&lt;br /&gt;
&lt;br /&gt;
2) if we are returning a structure &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    call IXFsendToBinding(plhs(number_left),prhs(number_right),&amp;#039; &amp;#039;,1,0,variable,status)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* the 1st argument defines which matlab pointer to write the data in to according to &amp;lt;tt&amp;gt;number_left&amp;lt;/tt&amp;gt;, which refers to the position of the left hand side argument when the [[Matlab Bindings#write an appropriate matlab function|matlab function]] is called&lt;br /&gt;
* the 2nd argument is the return type which has been sent from matlab&lt;br /&gt;
* the 3rd, 4th &amp;amp; 5th arguments are &amp;#039;&amp;#039;&amp;#039;always&amp;#039;&amp;#039;&amp;#039; &amp;lt;tt&amp;gt;  &amp;#039; &amp;#039;,1,0  &amp;lt;/tt&amp;gt; &lt;br /&gt;
* the 6th argument is the variable to be populated, it &amp;#039;&amp;#039;&amp;#039;must&amp;#039;&amp;#039;&amp;#039; agree with the type which has been sent in &amp;lt;tt&amp;gt;prhs(number_right)&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
an example &amp;lt;tt&amp;gt;IXBmethod_classname&amp;lt;/tt&amp;gt; is defined below&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  subroutine IXBplus_testclass(nlhs, plhs, nrhs, prhs, status)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
this provides access to the &amp;lt;tt&amp;gt;IXBgetFromBinding&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;IXBsendtoBinding&amp;lt;/tt&amp;gt; interfaces to read/write variables from/to matlab&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    use IXMm_testclass&lt;br /&gt;
    implicit none&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
standard declarations&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    integer :: nlhs, nrhs&lt;br /&gt;
    integer(cpointer_t) :: plhs(nlhs), prhs(nrhs)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* declarations of input and output objects used by the method called&lt;br /&gt;
* array input is defined as a pointer&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    type(IXTtestclass) :: wres, w1, w2&lt;br /&gt;
    real(dp),pointer::array(:)&lt;br /&gt;
    type(IXTstatus) :: status&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* read in two structures which will be added together&lt;br /&gt;
* check read went OK - report errors and return if not&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    call IXBgetFromBinding(prhs(2),&amp;#039; &amp;#039;, 1, 0, w1, status)&lt;br /&gt;
    call IXBgetFromBinding(prhs(3),&amp;#039; &amp;#039;, 1, 0, w2, status)&lt;br /&gt;
    call IXBgetFromBindingPtr(prhs(4),&amp;#039; &amp;#039;, 1, 0, array, status)&lt;br /&gt;
    if (status == IXCseverity_error) return&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
do adding operation&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    call IXFplus_testclass(wres, w1, w2,array, status)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
wres has now been filled and needs to be entered into the matlab memory if the process was successfull&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    if (status == IXCseverity_error) then&lt;br /&gt;
        plhs(1)=ixDuplicateArray(prhs(1))&lt;br /&gt;
    else&lt;br /&gt;
        call IXBsendToBinding(plhs(1), prhs(1), &amp;#039; &amp;#039;, 1, 0, wres, status)&lt;br /&gt;
    endif&lt;br /&gt;
  end subroutine IXBplus_testclass&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===preprocessing operations===&lt;br /&gt;
&lt;br /&gt;
preprocesing can also be used to generate common code in the bindings, for example to create general code for unary operations (log, exp,sin etc...) called from the matlab front-end, there is explanation on preprocessing files [[Libclasses#Preprocessing files|here]]&lt;br /&gt;
&lt;br /&gt;
in the file &amp;lt;tt&amp;gt;bindings/matlab/IXMdataset_2d_m.f90&amp;lt;/tt&amp;gt; the KEYWORDS are defined&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#define IXD_TYPE	dataset_2d&lt;br /&gt;
#define IXD_NAME	Sin_Dataset_2d&lt;br /&gt;
#include &amp;quot;unary_ops.f90&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and in the include file &amp;lt;tt&amp;gt;bindings/matlab/unary_ops.f90&amp;lt;/tt&amp;gt; they are substituted&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#if defined(IXD_TYPE) &amp;amp;&amp;amp; defined(IXD_NAME)&lt;br /&gt;
&lt;br /&gt;
subroutine IXB&amp;amp;/**/&lt;br /&gt;
              &amp;amp;IXD_NAME (nlhs, plhs, nrhs, prhs, s)&lt;br /&gt;
  use IXMm_&amp;amp;/**/&lt;br /&gt;
           &amp;amp;IXD_TYPE&lt;br /&gt;
  implicit none&lt;br /&gt;
  integer :: nlhs,nrhs&lt;br /&gt;
  integer(cpointer_t) :: plhs(nlhs),prhs(nrhs)&lt;br /&gt;
  type(IXT&amp;amp;/**/&lt;br /&gt;
          &amp;amp;IXD_TYPE ), allocatable :: wres(:), w1(:)&lt;br /&gt;
  type(IXTstatus) :: s&lt;br /&gt;
  integer n, i&lt;br /&gt;
  n = ixGetNumberOfElements(prhs(2))&lt;br /&gt;
  allocate(w1(n),wres(n))&lt;br /&gt;
  call IXBgetFromBinding(prhs(2), &amp;#039; &amp;#039;, 1, 0, w1, s)&lt;br /&gt;
  if (s == IXCseverity_error) return&lt;br /&gt;
  do i = 1,n&lt;br /&gt;
      call IXF&amp;amp;/**/&lt;br /&gt;
              &amp;amp;IXD_NAME (wres(i),w1(i),s)&lt;br /&gt;
  enddo&lt;br /&gt;
  if (s == IXCseverity_error) then&lt;br /&gt;
    plhs(1)=ixDuplicateArray(prhs(1))&lt;br /&gt;
  else&lt;br /&gt;
    call IXBsendToBinding(plhs(1), prhs(1), &amp;#039; &amp;#039;, 1, 0, wres, s)&lt;br /&gt;
  endif&lt;br /&gt;
  deallocate(w1,wres)&lt;br /&gt;
end subroutine&lt;br /&gt;
&lt;br /&gt;
#undef IXD_NAME&lt;br /&gt;
#undef IXD_TYPE&lt;br /&gt;
&lt;br /&gt;
#endif /* defined(IXD_TYPE) &amp;amp;&amp;amp; defined(IXD_NAME) */&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==define object method pair in &amp;lt;tt&amp;gt;bindings/matlab/libisisexc.txt&amp;lt;/tt&amp;gt; ==&lt;br /&gt;
we need to define all the subroutines which need to be accessed from the matlab front-end in another file, together with the number of input and output arguments. they are defined as a classname/method pair in the &amp;lt;tt&amp;gt;bindings/matlab/libisisexc.txt&amp;lt;/tt&amp;gt; file with a general constuction:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
IXTclassname     method    no_of_output_args   no_of_input_args&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
if the number of arguments is variable then -1 is defined. the number of arguments is essentially &amp;lt;tt&amp;gt;nrhs&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;tt&amp;gt;#&amp;lt;/tt&amp;gt; is a comment character, the definition for IXTtestclass is as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#&lt;br /&gt;
# IXTtestclass&lt;br /&gt;
#&lt;br /&gt;
IXTtestclass		plus			1		4&lt;br /&gt;
IXTtestclass		display			0		1&lt;br /&gt;
IXTtestclass		create			1		2&lt;br /&gt;
IXTtestclass		check			1		1&lt;br /&gt;
IXTtestclass		read			1		3&lt;br /&gt;
IXTtestclass		write			1		3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==write an appropriate matlab function==&lt;br /&gt;
The last step to creating a new object in the framework is to create a &amp;lt;tt&amp;gt;bindings/matlab/classes/@IXTclassname&amp;lt;/tt&amp;gt; directory. this identifies &amp;lt;tt&amp;gt;IXTclassname&amp;lt;/tt&amp;gt; as a class to matlab. Within this directory you create &amp;lt;tt&amp;gt;.m&amp;lt;/tt&amp;gt; files corresponding to the functions that operation on the class. these can have any name you wish, but there are two that you must create.&lt;br /&gt;
&amp;lt;tt&amp;gt;&lt;br /&gt;
* IXTclassname.m&lt;br /&gt;
* display.m&lt;br /&gt;
&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first of these is called the constructor and is named after the class i.e. the file &amp;lt;tt&amp;gt;@IXTtestclass/IXTtestclass.m&amp;lt;/tt&amp;gt; - the constructor tells matlab the data members that are contained within the class and how they should/can be initialised. The second file tells matlab how to display (print) the class to the screen.&lt;br /&gt;
&lt;br /&gt;
every any non-standard object method which is defined in &amp;lt;tt&amp;gt;libisisexc.txt&amp;lt;/tt&amp;gt; will also need to have a &amp;lt;tt&amp;gt;.m&amp;lt;/tt&amp;gt; file to make a call into the DLL. this file does not necessarily have to have the same name as the method.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;display.m&amp;lt;/tt&amp;gt; has a standard construction.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function display(object)&lt;br /&gt;
libisisexc(&amp;#039;IXTclassname&amp;#039;,&amp;#039;display&amp;#039;,object);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The constructor defines the data within a class and the order that these members are in if the class in indexed. It is thus important that the order defined in this class is followed &amp;#039;&amp;#039;&amp;#039;EXACTLY&amp;#039;&amp;#039;&amp;#039; in fortran when calling &amp;lt;tt&amp;gt;IXFoperationRun_classname&amp;lt;/tt&amp;gt;. In our case the constructor should populate a default empty object and then pass this empty object and any arguments out to LIBISIS with a call to &amp;lt;tt&amp;gt;libisisexc()&amp;lt;/tt&amp;gt;, which will check the arguments and then complete creation of the object. The first two string arguments to &amp;lt;tt&amp;gt;libisisexc()&amp;lt;/tt&amp;gt; are the &amp;lt;tt&amp;gt;classname&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;method&amp;lt;/tt&amp;gt;, inside the DLL they are mangled together and the DLL then calls the appropriate &amp;lt;tt&amp;gt;IXBmethod_classname&amp;lt;/tt&amp;gt;, provided it has been defined in &amp;lt;tt&amp;gt;libisisexc.txt&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function object = IXTtestclass(varargin)&lt;br /&gt;
object.base = IXTbase;&lt;br /&gt;
object.val = 0;&lt;br /&gt;
object.nx = int32(1);&lt;br /&gt;
object.val_static = ones(3);&lt;br /&gt;
object.int_static =  ones(4);&lt;br /&gt;
object.val_array = zeros(2);&lt;br /&gt;
object.int_arr = int32(zeros(2,2));&lt;br /&gt;
object.spectra = IXTspectra;&lt;br /&gt;
object.xhist = true;&lt;br /&gt;
object.label=&amp;#039;test&amp;#039;;&lt;br /&gt;
object.cell_string = [ &amp;#039;one&amp;#039; ];&lt;br /&gt;
object.d2d = [ IXTdataset_2d ];&lt;br /&gt;
object = class(object ,&amp;#039;IXTtestclass&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
if (nargin &amp;gt; 0) &lt;br /&gt;
    object = libisisexc(&amp;#039;IXTtestclass&amp;#039;,&amp;#039;create&amp;#039;,object ,varargin);&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We will often need to pass out an empty/default object as the first argument, this is because FORTRAN can modify, but not create, Matlab class objects (it sees them as structures), for example in &amp;lt;tt&amp;gt;bindings/matlab/classes/@IXTtestclass/plus.m&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function object = plus(a,b,array)&lt;br /&gt;
object = libisisexc(&amp;#039;IXTtestclass&amp;#039;,&amp;#039;plus&amp;#039;,IXTtestclass,a,b,array);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the arguments to &amp;lt;tt&amp;gt;libisisexc()&amp;lt;/tt&amp;gt; are directly related to the variables used in &amp;lt;tt&amp;gt;IXBplus_testclass&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;&lt;br /&gt;
* prhs(1) =&amp;gt; IXTtestclass ,&amp;lt;/tt&amp;gt;(empty objectused to populate return result)&amp;lt;tt&amp;gt;&lt;br /&gt;
* prhs(2) =&amp;gt; a &amp;lt;/tt&amp;gt; (a is a populated IXTtestclass object input argument)&amp;lt;tt&amp;gt;&lt;br /&gt;
* prhs(3) =&amp;gt; b &amp;lt;/tt&amp;gt; (a is a populated IXTtestclass object input argument)&amp;lt;tt&amp;gt;&lt;br /&gt;
* prhs(4) =&amp;gt; array&lt;br /&gt;
&amp;lt;/tt&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dickon Champion</name></author>
	</entry>
</feed>