Planning a Horace scan

From Horace
Revision as of 14:18, 25 November 2013 by Russell Ewings (talk | contribs)
Jump to navigationJump to search

Simple Scan Planner

Horace has a useful little tool which allows you to work out the coverage of reciprocal space that will be achieved for a given instrument / incident energy / sample angle range.

You start it up by typing


The graphical user interface shown below should open up

Screenshot-Horace Planner.png

  • You first select the PAR file associated with your instrument (which specifies detector positions), by browsing to it, and then clicking Load.
  • Next you enter the vector u and v as comma-separated lists. u is the Q-space direction parallel to the incident beam when psi=0, and v is the vector perpendicular to this lying in the equatorial plane of the detectors (horizontal for most instruments).
  • Enter the incident energy, Ei, and the energy transfer you are interested in, then the minimum and maximum values of psi you are considering.
  • Finally enter the lattice parameters (in Angstroms) as a comma-separated list, and the lattice angles.
  • Hit Calculate and the coverage is calculated. The axes of the 3 plots are the Q directions parallel to u and v, and the direction out-of-plane, respectively. The axes are labelled with inverse Angstroms, and circles are shown at integer (h,k,l) positions.

More Detailed Scan Planner

The scan planner shown above is quick and simple to use. But sometimes you want to inspect very carefully exactly what reciprocal space coverage you will get for a given scan. To do this you can generate a fake dataset, where the 'signal' is represented as the angle of of the contributing scan at each point. Note that this process is rather slow, so is better for checking your decisions about what scan range and incident energy from the simple scan planner detailed above.

An example script for generating fake data is given below.

en=[0:10:190];%energy bins (coarse for simulation)
par_file='/usr/local/mprogs/Libisis/InstrumentFiles/maps/4to1_124.par';%detector parameter file
sqw_file_fake='/home/maps/maps_users/Gruenwald/fake_200meV.sqw';%name of output file

efix=200;%incident energy
emode=1;%select 1 for direct geometry spectrometer


u=[1,0,0]; v=[0,1,1];

psi=[-90:0];%scan range in degrees

omega=0; dpsi=0; gl=0; gs=0;

fake_sqw (en, par_file, sqw_file_fake, efix, emode, alatt, angdeg,...
                     u, v, psi, omega, dpsi, gl, gs);

Once you have created this fake dataset you can take cuts and slices out of it in exactly the same way as you would a real dataset. For example:

proj.u=[1,0,0]; proj.v=[0,1,0]; proj.type='rrr';%viewing axes for plots

my_l=[-2:2];%loop over a set of values of L

for i=1:numel(my_l)
    plot(compact(my_slice(i))); keep_figure;

Sample plot of fake dataset

Scan figure.png