Scripting Homer Functions

From LIBISIS
Jump to: navigation, search

The basics

It is possible to treat your data by making calls to the homer function only, but it can be quite involved, requiring specific keyword arguments to be specified for different parts of the process. These three functions can be called in conjunction with diagnose to fully homer your data. They all call the homer function underneath, but they set up particular default values particular to the process. All these default values can be overridden if they are defined as arguments to the function.

  • Before any of the following commands can be called the appropriate Instrument setup functions must be called.
  • All three functions have required keywords and accept all the optional keywords from homer
  • run_no is a keyword common to all these functions, it is a string defining the run number to be homered
  • if multiple runs are to be added together then they can be provided in a cell array of strings
>> run_no='12345'
>> run_no={'11045' '23456' '12345'} % a cell array of srings
  • no extra functions need to be called on the dso IXTdata_source object.
  • normalisation by an integral of monitor 1 between 1000 and 2000 <math>\mu</math>s is set by default and common to all functions

non-default keyword arguments

There are two sets of keywords which are not default values.

  1. 'mon_map' and 'det_map', if they are not supplied then a 1:1 mapping will be made and there will be a message on screen that this is the case. They can either be defined as a text file, a nexus file or as an IXTmap object.
  2. 'mon_mask' and 'det_mask' can be created by the diagnose function which creates an IXTmask object. They can also be defined as a text file or a nexus file.

There are also special functions to create an IXTmap and IXTmask from the matlab command line.

white_beam

>> whitebeam_runfile=white_beam(dso,  run_no, 'keyword_1', parameter_1,..., 'keyword_N',parameter_N)
  • creates an IXTrunfile output
  • 'ei' is set to be 'white' by default
  • obvious values to override might be the 'd_int' values, or the normalisation details

mono_van

>> monovan_runfile=mono_van(dso,  run_no, chopper_type,'keyword_1', parameter_1,..., 'keyword_N',parameter_N)
  • creates an IXTrunfile output
  • chopper type is a string argument denoting the type of chopper used in the experiment eg. 'sloppy'
  • 'ei' or 'fixei' must also be a keyword

monovan_abs

The absolute units scaling factor from a monochromatic vanadium can be determined by making a call to monovan_abs, it is generally run on the IXTrunfile output from mono_van. This value can then be used as an argument to mono_sample below

>> scaling_factor=monovan_abs(monovan_runfile)

mono_sample

>> monosample_runfile=mono_sample(dso,  run_no, chopper_type,'keyword_1', parameter_1,..., 'keyword_N',parameter_N)
  • creates an IXTrunfile output
  • chopper type is a string argument denoting the type of chopper used in the experiment eg. 'sloppy'
  • 'ei' or 'fixei' must also be a keyword

Examples

Examples of homer scripting files can be downloaded