Next Previous Contents

5. Data Reduction and Visualisation

5.1 OpenGenie (OG)

read me first!

setting up

To set up the OSIRIS programmes to run with OG on your account you should put the following lines in your login.com file

osiris:== @osiris$disk0:[osiris]user_set_up.com.
When you type osiris you will then among other things define the logical genie_gcl_init, and OG will find the right genieinit.gcl file to use. Definitions needed to find the raw-data files are also performed

remote access

You login to an Alpha station, e.g. ISISA. When you login from a remote computer, and want to use graphics, you have to set the display with

set display/create/node=ip.ip.ip.ip/transport=tcpip
where you replace ip.ip.ip.ip with your own ip address/number. You can define a symbol in your login.com if you need to type this often,
remote == "set display/create/node=ip.ip.ip.ip/transport=tcpip"
so that when you type remote the display is set up.

You probably have to set some sort of protection on your own computer, if it is a unix machine typically xhost ip.ip.ip.ip., where you type the ip number of the machine you want to allow to open a window on your local computer. This way you set the security level varies between operating systems.

gcl

It is strongly recommended that you write your analysis in the form of command/gcl files. To start inspecting the data the interactive approach is much easier but when you have decided what to do, use a command file!! The use is twofold, if you want to redo your analysis it is easy and you have a very good log of what you actually did with your data. It is not necessary to give the files the extension .gcl but it does help you to keep track of your files. They are very easy to write as these short examples show:

PROCEDURE test1
RESULT run
LOCAL run1 run2
run1=focus_norm_bank(1,"high","raw") 
run2=focus_norm_bank(2,"high","raw")
run=merge_diffractogram(run1,run2)
ENDPROCEDURE

PROCEDURE test2
PARAMETER NAME=String
RESULT run
LOCAL run1 run2 fil
fil=NAME&"in3"
sum_raw 1 2 0.05 0.1
run=focus_norm(1,5,122,"raa")
put/new run file=fil
ENDPROCEDURE
To run these you first have to load them load "filename" and then run them with the commands result=test1() and result=test2(saved) or just test2 saved if you just want to save the result to the file saved.in3.

Syntax

In what follows [ ] always means qualifiers that not need to be used. Also remember that in OG all strings have to be enclosed with quotation marks. In all examples that follows, when you see quotation marks, they should be typed. Every procedure that returns a result needs to written with parentheses, even if there are no 'in' parameters. You can type:

procedure(a)
but you have to type
work_space=procedure(a)
(cf. focus_norm) to save the result of the procedure in a workspace. If however the procedure writes to a file it is alright just to write (cf. sum_raw):
procedure a
Note that work_space=procedure a is always WRONG, whereas procedure(a) can be right. In OG as opposed to old Genie you can give your workspaces any name and not just w1, w2... as in Genie.

Some OG commands

Read log files(SC) Help is often available with the /help qualifier. toggle/info To get the long title: get("titl") and to see a list of all parameters in the raw file list "file_name" or just list/in to list the current in file rebin:log(bound1,step1,bound2) rebin(w,w2.x)

aliases (alias.gcl)

There are some non-standard aliases defined in the file alias.gcl that you can use. They are:
alias function d display p plot fnb focus norm bank md merge diffractogram a/b alter/binning

local extensions (local.gcl)

ASCII

To export an x,y,e array of your workspace use the routine "ascii_export", it takes two parameters:

ascii_export work_space "file name"
where "work space" is the work space you want to export and "file name" is the name you want to give to your exported data. There is no default value for "file name" and if you do not give a name with a full stop the computer will still put a full stop at the end of the file name. To import an ascii file (three columns or the "genie" ascii) use the
 work_space=ascii_import("file name","type")
where type can be plain or genie. (not written yet)

in3

To save a work space to an intermediate genie, in3, file you type

 put/new work_space file="name.in3"
you can then continue adding blocks by the same command, just remember not type new. When you later want to read in your saved workspaces you type
work_space=get(3,"name.in3")
to get block 3 from file name.in3

graphics

You can change the colour of your next plot by the commands red green blue and white. A small plot window can be opened with the command fonster.

dae

To display the dae you type assign "dae" where you have to type the quotation marks since dae is a string. You can, however type only assign and the default value is to set your input to the dae

correctL

You can correct old runs with wrong angle and flight path with this command. Either you have a detector.dat file you want to use to replace both angle and flight-path. It is also possible to have a genie intermediate file that hold shift of each detector. The output file will have the extension caw instead of raw and the commands should look like:

correctL/all run_number "detector.dat"
correctL run_number "dL.in3"

5.2 Diffraction

OSIRIS routines (osd.gcl)

There are to different ways of doing reduction for the diffraction data.

sum_raw

The program takes at least two parameters

sum_raw first_run_number last_run_number [%low %high]
The runs are summed where they overlap, otherwise they are just appended together into one file with the same run number as the first file but the extension "raw" replaced with "raa" and the run_no is changed to the range summed. The monitor is "unwrapped" before the summation and only data points where both monitor and detector data (in wavelength) are available are saved. The numbers %low and %high (type 10% as 0.1) gives you the possibility to skip the first %low and last %high part of each spectra. Something you would want to do to be sure that opening and closing of the choppers are not influencing your data.

The routine unwrap is used to unwrap the monitor. This is done by searching for the minimum value in the spectra and then moving everything from the right of that point to the left side of the spectra.

focus_norm

This routine reads "raw", "sav" or "raa" files. The units are changed to wavelength the monitor is corrected for efficiency (see Monitor) and, detector efficiency corrections are performed Units are changed to d-spacing and the spectra are focused and normalised with the monitor. The spectra are focused in d-space. This routine takes three parameters.

work_space=focus_norm(run_number,first_detector,last_detector,"ext")
The default value for ext is raa, and as standard we use all detectors.

focus_norm_bank (fnb)

Same as focus_norm but takes slightly different parameters

work_space=focus_norm_bank(run_number,"bank","ext")
where bank is either all or high, and high means high resolution. Default values are bank=all and ext=raw so to focus all detectors from a raw file you need only to type
work_space=fnb(run_number)

merge_diffractogram

If you run focus_norm on your raw files you will have to merge the the workspaces into which you have focused your raw data.

work_space=merge_diffractogram(f1,f2,f3...)
Here f1, f2, f3... are the workspaces you want to merge, the maximum is 10 at a time. They should be typed in order of increasing d-spacing. You will see a plot of the overlapping regions of f1 and f2 to start with and you have to decide where you want to cut your data.

ccslgen

A workspace can be exported to ccsl format (three columns x,y,e) with the command

ccslgen work_space
and then you follow instructions.

ISIS routines

gsasgen

A workspace can be exported to gsas format with the command

gsasgen work_space 
and then you follow the instructions. If you have any problem try rebinning your data before exporting. Background subtraction should be done before you generate gsas format.

You should choose bank 1 for "all" detectors and bank 2 for the "high" resolution option.


Next Previous Contents