Difference between revisions of "Overriding and setting default values for homer processes"

From LIBISIS
Jump to navigation Jump to search
Line 1: Line 1:
 
 
== Where are the defaults specified ==
 
== Where are the defaults specified ==
  
Line 12: Line 11:
 
<tt>/libisis/applications/matlab/</tt>
 
<tt>/libisis/applications/matlab/</tt>
  
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.
+
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.
  
== overriding instrument specific population ==
+
== Overriding instrument specific population ==
  
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]]
+
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]]
  
  
the specific MERLIN population information is contained in the file  
+
For example the specific MERLIN population information is contained in the file  
  
setup_merlin_data_source.m
+
<tt>setup_merlin_data_source.m</tt>
  
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.  
+
This file defines the nexus files which are required for population of the [[IXTrunfile]] object which in turn the .spe file is produced from.  
  
 +
To define files used to populate the [[IXTdetector]] and [[IXTspectra]] objects from the we can add the following two lines to this file:
 +
<pre>
 
DSO=add_item(DSO,'inst_nxs:::merlin_detector.nxs','detector');
 
DSO=add_item(DSO,'inst_nxs:::merlin_detector.nxs','detector');
 
DSO=add_item(DSO,'inst_nxs:::merlin_spectra.nxs','spectra');
 
DSO=add_item(DSO,'inst_nxs:::merlin_spectra.nxs','spectra');
 +
</pre>
  
these files are not distributed with libisis package as they can change. the 'inst_nxs:::' path is a standard definition which is specified in the inst_defs.m file
+
These files are not distributed with libisis package as they can change. the 'inst_nxs:::' path is a standard definition which is specified in the <tt>inst_defs.m</tt> file or
  
  
 
== Creating populated nexus files ==
 
== Creating populated nexus files ==
 +
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 'mon' command then it will not contain enough detector information.
 +
then you make the matlab command
 +
<pre>
 +
>> write_nxs(your_runfile.inst.detector,'mydetectorfile.nxs')
 +
>> write_nxs(your_runfile.inst.spectra,'myspectrafile.nxs')
 +
</pre>
 +
these files can then be used in the lines above to populate the [[IXTrunfile]] object provided thety are placed in the inst_nxs::: path

Revision as of 10:09, 4 July 2008

Where are the defaults specified

the homer distribution files are contained in

on a windows distribution /your_libisis_directory/matlab

on a linux rpm installation: /usr/local/libisis/applications/matlab/ in the svn repository: /libisis/applications/matlab/

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.

Overriding instrument specific population

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. Creating populated nexus files


For example the specific MERLIN population information is contained in the file

setup_merlin_data_source.m

This file defines the nexus files which are required for population of the IXTrunfile object which in turn the .spe file is produced from.

To define files used to populate the IXTdetector and IXTspectra objects from the we can add the following two lines to this file:

DSO=add_item(DSO,'inst_nxs:::merlin_detector.nxs','detector');
DSO=add_item(DSO,'inst_nxs:::merlin_spectra.nxs','spectra');

These files are not distributed with libisis package as they can change. the 'inst_nxs:::' path is a standard definition which is specified in the inst_defs.m file or


Creating populated nexus files

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 'mon' command then it will not contain enough detector information. then you make the matlab command

>> write_nxs(your_runfile.inst.detector,'mydetectorfile.nxs')
>> write_nxs(your_runfile.inst.spectra,'myspectrafile.nxs')

these files can then be used in the lines above to populate the IXTrunfile object provided thety are placed in the inst_nxs::: path