Data reading is controlled from the DATA COLLECTOR area at the top of the main LAMP interface. LAMP looks at the system on which it is running and tries to set the best default values for the instrument and data-base. Normally the correct instrument and data-base will already be set.
Selecting Instrument.
If the instrument button does not indicate the desired instrument
then press this button. A pull-down menu of instrument-groups
appears. Select the desired group then the desired instrument.
Selecting the Data-Base.
The button to the right of the instrument-button contains the
name of the data base. Press this button and a pull-down menu
appears which normally offers:
Instrument Name | Data on the instrument computer. |
Current Cycle | Data for the current cycle on the main ILL data-base |
Previous Cycle | Data from the previous cycle on the main ILL data-base |
Current Path | Data will be read from the path defined in the field at the top-right of the window. This path is editable. |
Old cycles | Data will be read from the archives on the central data server (\\serdon for PCs /usr/illdata for UNIX machines) |
Selecting a Workspace.
The workspace selector is at the far-right of the DATA COLLECTOR
area. At start-up w1 will be selected. You may change this by
pressing the "<" and ">" buttons on the
interface.
Selecting and reading a Run.
Enter the desired run number in the "Read" field. To
read in and sum several consecutive runs, use the
">" symbol, e.g. 1234>1237. Click
"Read".
1. The run will be read into the selected workspace if you hit carriage return in the "Read" field.
2. The selected run-number can be incremented by pressing the "+1" button which is next to the run-number window.
3. The command w1=rdrun(1234) can be entered directly in the "MANIPULATIONS" window. This example reads run number 1234 into w1.
4. The command w1=rdsum(1234,1237) will sum together runs 1234 to 1237 into w1, equivalent to entering 1234>1237 in the "Read" field.
5. It is often convenient to reserve w1, w2, and w3 for special purposes: e.g.. current run, vanadium, background runs. This allows you to use the programmable buttons to maximum advantage.
6. LAMP uses dynamic memory allocation so that empty workspaces take no space. You can empty workspaces that are no longer required by setting them equal to zero. NB LAMP may become slow when all the available memory is used.
The area controlling display is in the centre of the LAMP interface.
Any workspace can be plotted by selecting the workspace number in the plot button with the neighbouring "<-" "->" buttons. When you press the plot button the plot will appear according to the setting of the other buttons on the "DISPLAY WORKSPACE" area. LAMP automatically selects the last workspace which was modified as the default for plotting.
Plots made in the small display in the centre of the LAMP interface are rapid, but small. This is the "below" option. If the "beside" button is selected plots will appear in a new window which can be rescaled and scrolled. Each new plot makes a new window "beside" which enables plots to be compared easily. The windows can be stored as icons, but should be removed if they are not needed to avoid complication.
The type of plot is selected with the appropriate button or buttons. These can be combined to obtain complex plots, but remember that contour plots of noisy data can take a long time to generate. "Image" is usually very fast.
The view angle for surface plots is given in the box next to the "surface" button. This can be modified as desired.
The plot range can be chosen by the desired values in the fields next to the "x-range" ...etc. buttons. If the buttons are deselected the full range will be taken. Warning: When you change a workspace from channels to energy you may get a shock if you have selected an x-range based on channels!
This button, followed by "Titles .."brings up a "set preferences" window. This allows you to change titles, default printer and various plot options.
Colours can be changed in the "beside" plot by pressing the colours button.
To zoom in on a region of a plot press the left mouse-button and drag out a rectangle enclosing the area of interest. When you release the mouse-button the zoomed area will be plotted. Data in the zoomed area can be saved into a workspace with the command: trap,w4 (into w4 in this case). Unzoom by pressing "replot" in the "beside" window or "plot" in the main LAMP interface.
The cursor cannot work on "surface" plots. Press the left mouse-button on with the cursor arrow in the plot and the values of x,y,z will appear. Areas can be integrated by "dragging" an area with the right mouse-button pressed.
Normally the correct printing device will be set so that you simply press the "print" button to obtain a hard-copy. If no device is set LAMP will make a postscript file. The printing device is set in the "Options/Titles..." window.
1. Use "below" with "image" for fast plots.
2. Press the "w-log" button to reveal small features with "image". Do not forget to unset "w-log" afterwards!
3. For a small number of spectra the "vectors" style (in the "Options/Titles.." window) gives a multi-plot effect.
4. Use two "beside" windows to compare runs.
In addition to the counting intensities in, say w1. Additional information is stored in the following arrays:
![]() | x1: x-axis values |
![]() | y1: y-axis values |
![]() | e1: error bars (usually the standard deviation) |
![]() | n1: beam monitors |
![]() | p1: instrument parameters. Can be seen and edited by pressing the "Data Params" button. |
![]() | captions: x_tit(1), y_tit(1), z_tit(1), w_tit(1)and other_tit(1) with the obvious meanings. other_tit contains a record of all workspace manipulations performed using the TOF functions. |
In order to add, subtract, etc. workspaces, commands are entered in the "MANIPULATIONS" area. The main scrollable formula entry is the easiest place to enter new commands. These are executed when carriage return is pressed.
To add two runs which are in workspaces w1 and w2 simply type:
w3 = w1 + w2 |
in the "MANIPULATIONS" window. Subtraction, multiplication etc. are similar. In these operations LAMP will transfer the parameters, axes values, titles (and monitors) of the first workspace after the "=" sign into the new workspace. Effectively, "w3 = w1 + w2" invokes:
p3 = p1 x3 = x1 y3 = y1 x_tit(3) = x_tit(1) & y_tit(3) = y_tit(1) & w_tit(3) = w_tit(1) |
which is what you would expect. However, it also invokes
n3 = n1 e3 = e1 |
which is not at all what you expect.
There are two very important points here, which are often a
source of error:
1) If you are adding together raw (un-normalised) data, you should
always explicitly add the monitors, i.e.
n3 = n1 + n2 |
in the above example
2) You should always explicitly perform the error bar calculation
when manipulating workspaces, i.e.
e3 = sqrt(e1^2 + e2^2) |
in the above example. Note that you do not need to do this when the manipulation is done by an existing TOF function, e.g.
w2=normalise(w1) |
automatically gets the error bars right.
When multiplying or dividing two workspaces by a number, always
remember to perform the error bar calculation explicitly, e.g.
w2 = w1/1.87 & e2 = e1/1.87 |
When dividing two workspaces by each other, a divide function has been written to automatically work out the appropriate error bars, in order to save tediously working out the expression every time, i.e.
w3 = divide(w1,w2) |
does not require an explicit error bar calculation.
To extract spectra 20 to 30 from w1 into w2:
w2=w1(*,19:29) |
In this example the "*" implies all channels. If you were only interested in channels 300 to 400 for spectra 20 to 30:
w2=w1(299:399,19:29) |
LAMP ensures that parameters, axes etc. are transferred correctly but it does not update the values for the number of spectra and number of channels in the new parameters. These can be edited with the "data params" button.
If the sum of spectra collected at all different scattering angles is required:
w2=total(w1,2) |
Here the "2" means sum over the second dimension i.e.. spectra. A sum of a range of spectra, say spectrum 50 to spectrum 100 can be made:
w2=total(w1(*,49:99),2) |
A sum of all channels (for s(Q)):
w2=total(w1,1) |
If only elastic s(Q) is required and the elastic-peak position is known to be from say 200 to 220:
w2=total(w1(199:219,*),1) |
1. Use the history to cut out previous commands and paste them into "MANIPULATIONS" for reuse.
2. The programmable buttons are often easier to use than the "MANIPULATIONS"
3. Simple error messages appear between the "MANIPULATIONS" and history windows.
4. General warning and error
messages appear in the winterm window from which LAMP was
launched. Keep this window in view.