Running LAMP | Imagemap
| Selecting Instrument | Selecting
Data-Base | Selecting a Workspace |
Selecting a Run-Number | Reading
the Run | Other Methods of Reading Data |
Reading Treated Data | Saving
Workspaces
The Lamp Book describes the classical lamp interface selected from "Lamp/Layout" item in the menu-bar.
To start Lamp see "Installation README" in the front page of this manual.
The correct instrument and data-base may already be set, if not you
must select DATA Instrument and the Data Collector Area will then
appear as :
Imagemap - click on any point to go to the relevant
paragraph.
- Path is the working path
This is the current path for default inputs and outputs.
- Selecting Instrument/Data-Type
If the instrument button (IN16 above) 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, or data-type
eg. INX (see Reading Treated Data below).
To add or modify a Data-Type then press the button labelled Customize
- Selecting 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:
- Current Cycle... Data for the current cycle on the
main data-base
- Previous Cycle... Data from the previous cycle on
the main 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.
- Etc...
To add or modify a data-base Link then press the button labelled Customize
- 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 a Run-Number (or a file-name)
Enter the desired run-number in the window (containing run 9876 above).
You can increment the run-number using the "->"(+1)
button, which causes an automatic read and plot.
If you enter the form "9376 : 9380" or "9376 >
9380" or "9376+9378-9380", functions rdand or rdsum or rdopr are called
(see Other Methods of Reading Data above)
- Reading the Run
To read the data into the chosen workspace click on Read
(or hit carriage return in the run-number window), the instrument parameters,
monitor spectra etc. are automatically read into their corresponding arrays
for that workspace (see Main Concepts).
- Other Methods of Reading Data
The command w1=rdrun(1234)
can be entered into the
formula-entry window and "Do input commands". This example reads
run number 1234 into w1 (and the monitor spectra into n1, axes scales into
x1,y1 etc.).
The command w1=rdsum(1234,1237)
would sum together runs
1234 to 1237 into w1.
The command w1=rdand(1234,1237)
would join together
runs 1234 to 1237 into w1.
The command w1=rdopr('1234+1237')
would sum runs
1234 and 1237 into w1.
These forms of read-in are useful for command
files and compiled macros.
When used in macros you can add the keyword DATP=
datp to get all data parameters
in the structure variable datp
ex: w1=rdand(1234,1237,DATP=datp)
.
The IMPORT file Workspace button from the File menu-bar allows you to read
saved data from the path selected (see the File item in the menu-bar).
The SELECTOR_Access(Self...) button is expected to be useful for reading
in data series (see the File item in the menu-bar).
- Reading Treated Data (example for TOF)
Data files output by the time-of-flight treatment program, INX, can
be read into LAMP by selecting INX from the instrument menu.
Then select current path from the data-base menu. If required
change the path in the path-window to point to the data, then enter the
filename in the read window. See Saving Workspaces below for
saving data files.
- ** Emptying Workspaces
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 eg. typing w6=0
in the
formula-entry window would empty w6
(and the tied arrays n6,x6 etc.).
- ** Saving Workspaces
The EXPORT workspace button in the File menu-bar allows you to save data in the path selected
and gives a choice of formats. The LAMP format is the default
setting, which saves the data in either binary or ASCII file and all the
associated parameters, scales, titles, history etc., in a second file which
is always a text file. This format has the advantage that the workspaces and their
associated arrays can be restored in their entirety. Other formats (tiff,png
etc.) are mostly intended for reproducing graphics.
Binary formats are:
- XDR,HTM for data exchange between different platforms (UNIX, LINUX, WINDOWS..),
- F77 for FORTRAN unformatted read.
- HDF for data exchange between different instituts (NeXus),
A snapshot image file (192x192 byte array) is produced as binary stream data.
Data can be saved in any desired format using a
user-macro, eg. to write workspace w1 to an INX file, say
myfile.dat, the macro dumpx.pro
, can be used as follows
dumpx,w1,'myfile.dat'
which is typed in the formula-entry
area.
Some on-line help can be obtained by pressing the ' ? ' button.