Next: 5. Data analysis with
Up: html
Previous: 3. Getting spec running
  Contents
  Index
Subsections
4. spec
spec
is a x-ray diffraction software which is used at our beamline for the
control of all devices, from the monochromator, slit systems up to the
diffractometer. A general description of the capabilities of spec is
give in the reference manual [Spe99]. See also the Internet page
of Certified Scientific Software (CSS)
http://www.certif.com/
for more information.
The aim of this chapter is to provide a simple manual for the use of
the most important commands of spec and a description of the beamline
specific features and macros. It is not intended to describe all
commands implemented in spec. Advanced users should only read section
4.1 to learn about the non standart commands implemented
exspecially for our beamline. Beginners should skip that section and
start reading at section 4.2.
4.1 Site specific macros
- atten value
- Reads the actual setting of the filters
and displays the thickness and the transmission for
the actual energy if no argument is supplied. At the
6ID-B Main Station with argument it moves the absorbers according
to the value (0 - 255), each bit represents one filter.
At the 6ID-D Side Station the command atten bank value
might have two arguments. If one argument is supplied (0 - 15)
the specified number of filters is moved into the beam. At the
6ID-D Side Station there might be two filter banks installed. If two
arguments are supplied the first argument is the filterbank
which is to be used (1 or 2)
- ugmv,umgvr
- move up to 10 motors at the same time,
see section 4.3
- theta0
- two theta correction, see section 4.9
- read_ubm
- reads a UB-matrice from rafin, see section
4.9
- ana_elast
- moves analyser theta and two theta, see
section 4.7
- absorption
- calls a fortran program which calculates
the transmission for different elements and energies
- shutter command
- opens or closes the main shutter,
command are the words open or close. For the shutter of
the idb- and idd-station the command idbshutter command
and idbshutter command exists
- new_fio_filename
- and new_fio_copy implements
the automatic creation of fio (Spectra) files during all
scans. Package hp_fio.mac has to be loaded.
new_fio_filename defines necessary variables
and implements the creation of fio files.
new_fio_copy defines a variable necessary for
automatic copying of fio files to another computer. Package
ssh has to be installed on both computers and the public
key of the beamline computer has to be installed on the
other computer. Look in the man pages of ssh. The macro
show_fio_settings can be used to show the status
of the fio package.
4.1.1 To move and scan PVs
The following commands are used to move or scan PVs, that are epics
variables, e.g. the gap, that behave like motors.
- pvwa
- lists all PVs and their position
- pvmv
- moves a PV
- pvascan
- absolute scan of a PV
- pvdscan
- relative scan of a PV (also pvlup)
- pvconfig
- configure (add, delete, ...) PVs
4.2 Handling macros
- qdofile(''filename'')
- load macros defined in filename
so that they are known to the program
- prdef macroname
- show code of macro macroname
- lsdef
- lists the names and sizes of macros
- lscmd
- lists build-in keywords and functions
- newmac
- reloads the startup macros, normally done
when entering spec
4.3 Motors
- umv motor pos
- move motor to absolut position
- umvr motor value
- move motor relativ to actual position
- wa
- show positions of all motors (wu shows only mnemonic and user position)
- wm mot1 mot2 mot3 ...
- show positions of the specified motors
- lm mot1 mot2 mot3 ...
- show limits of the specified motors,
without options the limits of all motors are shown.
- ugmv mot1 pos1 mot2 pos2 ...
- move group of motors to
absolute positions
- ugmvr mot1 val1 mot2 val2 ...
- move group of motors relative
to absolute positions
- set motor position
- sets the actual motor position to a new
value
- set_dial motor position
- sets the actual dial motor position
to a new value
- set_lm motor low_limit high_limit
- set new soft limits
for a motor
- zero motor
- sets the dial value to the mechanical zero for
motors which are equipped with a home position feature
- tw mot1 mot2 ...delta1 delta2 ...sample_time
- moves one ore more motors in small steps each time you hit the
return key. The parameter sample_time is optional, if given after
each move a count will be performed and displayed
4.4 General stuff
- startup
- Should be performed at the beginning of an
experiment to set up data files and so on
- newfile
- changes to a new file where the data is written
to
- whats ???
- gives information about an expression
- gpset variable1 variable2
- variable2 gets the same
value than variable1 and the change is documented in the
data file
- sleep value
- spec waits until the specified time in
seconds has passed. If you use the command do_sleep
instead spec will show a counter running backwards
- setmono
- set parameters for monochromator
4.5 Counting
- ct time
- counts for time seconds
- uct time
- counting is updated during count, try uctn
if you have more than six counters
- counters
- changes the counter displayed during the scans
- _show_cntr
- shows current configuration of the counters
- count
- is the macro called by all scans and ct commands to do the
counting
- chk_beam
- tests if beam is there, but normally the macro is
not defined. Look into standard.mac to change this. If it is defined
properly it waits until the beam is back if the intensity in the
monitor (defined by global variable MON) is below the
value defined in the global variable chk_thresh
Please note that a positive value of time represents counting for the
defined time and a negative value represents counting against a monitor,
which has to be defined by the counters command.
The global variables DET and MON contain the channel
displayed during the scan and the monitor channel. They might be changed just by
typing DET = ion1 then ion chamber 1 will be displayed during the
scans.
4.6 Scans
Here a list of possible scans with a short explanation is shown. For
details about the different scan types use spec command help.
- ascan motor start_position end_position points sample_time
- normal scan, positions are given in absolut values, scan
contains one more point than given in points, last parameter
is the sample time
- a2scan motor1 start1 stop1 motor2 start2 stop2 points sample_time
- two motor scan, also a3scan, a4scan and a5scan
exist
- dscan motor start_position end_position points sample_time
- (or lup)
relative scan, same like ascan but the values of start_position
and end_position are added to the actual position. Also d2scan,
d3scan, d4scan and d5scan exists
- th2th tth_start_rel tth_finish_rel points sample_time
- theta-two-theta scan
- hklscan start_h stop_h start_k stop_k start_l stop_l points sample_time
- Q-scan. In addition also hscan, kscan and lscan exists,
easier to use if you are only doing scans in one Q-direction. Also more fancy
Q-scans are available like hkcircle, hlcircle, klcircle,
hkradial, hkradial and hkradial.
- mesh motor1 start1 stop1 interval1 motor2 start2 stop2 interval2 sample_time
- nested motor scan which is able to scan a two dimensional area defined by the
two motors. Data is written to a single scan in the data file so make sure you
are able to read the data with your data analysis software. The same exists for
Q-scans, see hklmesh
- aziscan azi_start azi_finish intervals sample_time
- scan azimuthal angle
- Escan start_E stop_E points sample_time
- Energy scan
In addition also tscan, dtscan, abscan
and abmesh scans exist but are not described here.
Please note that a positive value of sample_time in all scan types
represents counting for the defined time and a negative value represents counting
against a monitor, which has to be defined by the counters command.
After performing the scan the data of the counter displayed during the
scan can be analyzed by the following commands (Note that to display
a value a print command has to be added, e.g. p pl_MIN or the value
has to be given to a variable, e.g. i = pl_MIN. Also a motor can
be driven to the value umv tth CEN):
| pl_MIN |
smallest measured value (y) |
| pl_MAX |
biggest measured value (y) |
| pl_xMIN |
position (x) of minimum (y) |
| pl_xMAX |
position (x) of maximum (y) |
| pl_SUM |
sum of all measured values (y) |
| pl_SUMSQ |
sum squared of all measured values (y2) |
| pl_FWHM |
full width half maximum (y) |
| pl_CFWHM |
center of FWHM (y) |
| pl_COM |
center of mass (y) |
| pl_MINX |
minimum (x) |
| pl_MAXX |
maximum (x) |
| pl_LHMX |
upper half-maximum of (x) |
| pl_UHMX |
lower half-maximum of (x) |
For convenience CEN is identical to pl_CFWHM.
4.7 Energy
Here commands related to the monochromator are given. Warning!
Energies in spec are given in keV and not in eV! Make shure to type
moveE 7.930, do not forget the dot if you want to go to the
gadolinium L_II-edge. Do not mix it up with the HASYLAB
standart. The 6ID-D Side Station is using a special custom designed monochromator.
In addition to the commands mentioned in this section the commands
special for the sidestation are described in section 4.11.6.
- getE
- displays the actual energy
- moveE energy
- move monochromator to energy.
- setE energy
- this command recalibrates the monochromator
motors. Never use it unless you are really knowing what
you are doing
- ana_elast value
- drives the theta and two theta of the analyser
(tha, ttha) to the correct positions for the actual energy.
For this purpose to the variable ANALYSER_d_spacing
has to be assigned the correct value. If this is done
the analyser will also be moved automatically whenever the
energy of the monochromator is changed (also in an Escan
(section 4.6)). To omit this assign a value
0
to ANALYSER_d_spacing. If an energy is submitted
as an arguement to ana_elast the analyser will not
be moved but the positions will be calculated and shown. This
is for testing purpose
- setanalyser
- calculates lattices constants for different
analysers. This is a command only available at the 6ID-D Side Station.
Should be self explanatory.
spec is internally working with the wavelength lambda, which is accessible
through the global variable LAMBDA. With the command calcE
which is automatically invoked by moveE, getE and
setE a new value for LAMBDA can be calculated.
The Energy in keV can easily be calculated with the global variable
hc_over_e performing hc_over_e/LAMBDA as is done by
getE.
4.8 Temperature control macros
There are some predefined temperature control macros:
- te value
- reads temperature or sets setpoint if value is supplied
- teramp
- ramps a temperature
These macros are only working if the macros settemp and
measuretemp are defined. For an example to define these macros
see the spec manual or call your system administrator.
4.9 UB-matrix
List of usefull commands related to the UB-matrix:
4.9.1 Commands from
- ca h k l
- calculate positions for h k l
- ubr h k l
- move to position h k l
- wh
- display h, k, l, tth, th, chi, phi, etc.
- pa
- display geometry parameter
- showUB
- Displays the actual used UB-matrix. Please note that
it differs by a factor of 2
from the results of the program
rafin, also the matrix was transponated.
- enterUB
- enables you to enter a UB-matrix directly.
- setlat
- sets the lattice parameters of the sample. Is is also
possible to set directly the reciprocal lattice parameters
with setrlat
- or0
- set actual position to be first orientation reflection
- or1
- set actual position to be second orientation reflection
- setor0
- and setor1 same like the commands or0
and or1 but not the actual position is used, you have to
enter the position of the reflections manually
- or_swap
- exchange first and second orientation relection set
with the commands or0 and or1
- savegeo
- prints all information necessary for UB-matrix or
monochromator setup on the screen. The user is responsible
for printing this or writing it into the logbook!
- save
- executes savegeo and saveusr and saves
it to hard disk. saveusr is normally empty and could
for example contain user defined global variables
- cuts
- displays the angles which th, chi and phi will not cross
but instead reach the position from the other direction.
cuts name value will change one of them,
cuts value value value value will change all four
- setmode
- sets the mode the UB-matrix is working in. Value is
stored in variable g_mode. For explanation execute
command setmode or look into the spec manual [Spe99]
- freeze value
- Freezes depending on the mode (see setmode)
one or more angles to the actual value or if parameter value is supplied
to the supplied value. This is exspecially usefull if you always
want to go to your reflections is one or more angles fixed regardless
where the actual position of this angles is. The command is rewoked
with the command unfreeze. The command pr_freeze
displays the actual frozen values
- setsector value
- choses a symmetry transformation out of 8 possible
transformations, value 0 means no transformation. See the spec
manual for an detailed explanation [Spe99]
- sectors H K L
- displays all motor positions for all possible sectors
- setaz
- set azimutal reference
- startgeo
- asks for all necessary information, executing the commands
setmode, setsector, setlat and setaz
- cz H0 K0 L0 H1 K1 L1
- calculate zone: prints the values of chi and phi
needed to put two vectors in the scattering plan
- mz H0 K0 L0 H1 K1 L1
- move zone: calculates the necessary chi and phi,
moves there and then goes into the fixed zone mode (g_mode = 2)
- sz H0 K0 L0 H1 K1 L1
- set zone: calculates the necessary chi and phi
and then goes into the fixed zone mode (g_mode = 2), freezing
chi and phi on these values
- calcG
- calculates the UB-matrix. This routine is normally called
by all commands which change the configuration of the UB-matrix,
for example or0 and or1
- reflex H K L
- stores the actual position as reflex named H K L in a
file. Before the first reflection can be stored command
reflex_beg has to be executed. After all reflections are
stored execute reflex_end. Follow the instructions on the
screen if you want obtain a new UB-matrix from a fit of these reflections
- calcL
- after a custom made UB-matrix was entered or fitted with the
reflex commands, calcL calculates the lattice
parameters for the real and reciprokal lattice from the UB-matrix
The following commands are custom made commands, defined in the file hp_ubm.mac,
see 4.11.11.
- richt
- small programm that calculates reflex positions fast and
efficient and is in principle self-explanatory, at least if you
understand german
- theta0
- this command reads the information about the two
reflections from which the UB-matrice was derived and
calculates a correction for two theta and the lattice constant.
It works only for cubic systems or if both reflections
used pointing in directions with the same lattice constant
- ubm_read filename
- reads a UB-matrix from filename. If filename
is not given it will be read from ubfrom.raf. Afterwards UB-matrix will be
transposed and multiplicated with a factor 2
to make it workable
with spec.
For a definition of the UB-matrix see [Bus67].
Small trick if you only plan to do measurements in one direction: Measure
two reflections, for example (0 0 2) and (0 0 4) and do a correction with
the program theta0. Afterwards with the commands or0 and
or1 use the same reflection (e.g. (0 0 4)) for the UB-matrix, but
name it (0 0 4) for or0 and (0 4 0) for or1. Of course
you get an error message. Now set one of the variables g_u12 or g_u13, they
represent chi and phi of the second reflection, to a value which differs by
90 degree from the original one. You now have created a virtual (0 4 0)
reflection. To calculate a new UB-matrix finally execute the command
calcG. You now have a UB-matrix which should work perfect in the
(0 0 4) direction but contains no information about other directions.
4.10 Tips for programmers
Usefull macros that should be loaded at each spec session wether or
not you are starting fresh can be saved in the file spec.mac
in the current directory where spec is executed or in the file
site.mac in the specd directory, usually /usr/local/lib/spec.d.
In addition site macros which only should be loaded while starting with
option fresh should be saved in site_f.mac.
Very important for programmers is also the possibility to execute
loops, this is done by the command for. A short example for
doing a mesh-scan manually follows:
for (i=20; i<=21; i+=0.1) {
umv th i
lup tth -1 1 20 1
}
Also a while command using the C-syntax exists.
Very important: When defining macros put the complete macro in a
{} surrounding if you want to avoid that local defined variables
become global known.
- _check0 motor
- checks if a motor name is valid
- move_em
- is a macro that starts all motor movements
with the build in function move_all. Before the movement
starts the macro user_premove is executed and afterwards
user_postmove. Both are normally emty.
- show_cnts
- reads the scalers and shows the contents but did not count
by itself
In this section a collection of macros, sorted by the filenames in
which they are defined is explained. They are not of general interest
for every user but might be usefull for specific tasks. At the 6ID-D Side Station
most of these macros are preloaded by the macro site_f.mac
which is residing in the home directory of spec macros (normally in
/usr/local/spec/lib/) at the beamline computer and executed at every
fresh start.
This package contains macros which are usefull for people who are
familiar with the HASYLAB, DESY program spectra and are using it
for their data analysis. The package redefines user entry points
supported by the standart.mac package delivered with spec to write
fio-files. In addition the following commands have been defined to do
the setup of the package:
- fio_show_settings
- shows if the writing of fio files
is in use
- fio_new_filename
- this command is used to start creation
of fio files or to change the name of the created fio files
- fio_new_copy
- if fio files are created and the
beamline computer is able to use ssh (not the case for ID-B)
and has an authorized key on another system this command
can be used to set up an automatic copying of the fio files
to the second computer. Might be usefull as backup or for
data analysis
See also section 3.2.3 for an explanation of these
commands.
4.11.2 GPIB macros
Normally GPIB and serial input and output is directly supported by
spec. Because of the problem with the generic EPICS serial and GPIB
support it is necessary to have special macros available which allow
users a conveniant and consistant way to address external devices. The
macros in this section provide the users with the following two commands:
- hp_gpib_get address
- reads a value from a serial or
GPIB device. Address is the GPIB address of the device
if it is a positive integer, the absolut value of address
is the serial address of the device if address is a
negative integer. Because spec does not support
user functions (at least not very easy), the return value
will be found in the variable GPIB_val
- hp_gpib_put address value
- writes value to the serial
or GPIB device address (see above)
Because of spec problems with the proper handling of value which can be
a string or a variable it is strongly recommended to use the command
in the following way: dummy = ``test1234'';hp_gpib_put address dummy
Usage of for example hp_gpib_put 24 ``SETP? 1'' which is
a typical command for the lakeshore model 340 will lead to strange error messages.
dummy = ``SETP? 1'';hp_gpib_put 24 dummy is the workaround, so
only use variables as argument for hp_gpib_put.
If only the hp_gpib_get and hp_gpib_put commands are
used macros can be easily interchanged between beamlines. For example
hp_SI_controller.mac (section 4.11.3) and
hp_lakeshore340.mac (section 4.11.4) only use
these two commands to communicate with the devices independent if they
are connected to the serial port or the GPIB. A beamline specific
macro package than connects these two commands to the actual used serial
port or GPIB. Two examples are given, section 4.11.2 for
sector 11, BESSRC-CAT and section 4.11.2 for sector 6,
-CAT
At BESSRC-CAT a gpib card is used which is supported by spec. Thus
hp_gpib_11id.mac is very short and the commands
hp_gpib_get and hp_gpib_put are only projected
to the spec commands. Only a terminating character is added if
necessary.
At the
-CAT 6ID-B Main Station and 6ID-D Side Station EPICS generic serial and
GPIB records are used to communicate with for example temperature
controllers. This complicates the communication with devices and made
the development of hp_gpib.mac necessary. These macro
package supports both the generic serial record and the generic GPIB
record. It allows the usage of several GPIB devices at the same time
even though only one generic GPIB record is available and handels all
necessary changes which have to be made to the generic GPIB record
automatically. It has to be configured properly which is normally done
by the system administrator. For configuration read the source code in
the file hp_gpib.mac.
This is a package for the use of a Scientific Instruments temperature
controller. It requires that hp_gpib.mac is loaded first. It is not
recommended to use the Scientific Instrument temperature controller
in experiments, it is outdated hardware, for example the temperature
setpoint can only be changed in 0.1 K steps. This package redefines
the macros measuretemp and _settemp so that the
temperature commands supplied by standart.mac (see section
4.8) are working.
The hp_lakeshore340.mac package is for the use with a lakeshore
model 340 temperature controller. It works together with package
hp_gpib.mac (see 4.11.2), this package has to be loaded first.
It has three main funtions: Change the setpoint and measure the
temperatures during the scan. The measurements are done during the
scalers are busy with counting, look into the source code for details.
Second, write and read sensor calibration curves to and from the
lakeshore and third, allow the configuration of importand parameters
and allow to save or read them from hard disk.
- lakeshore340_help
- Displays a short help of all commands
and also shows the values of global variables used to
configure the lakeshore macros.
- lakeshore340_config_settemp
- configures the global variables
for the settemp macro
- lakeshore340_read_curve curve_number filename
- Reads a
curve and displays it. If optional filename is given it will
be written to harddisk
- lakeshore340_write_curve
- reads a curve from disk and
send it to the lakeshore
- lakeshore340_settings option
- execute program without parameter
option, it will show all possible values of mode. Allows to change,
save, restore of lakeshore parameters
- lakeshore340_set_pid
- changes PID parameters and heater range
- lakeshore340_set_mode
- changes temperature control mode
- lakeshore340_set_control
- configures control sensor
- lakeshore340_set_zone
- configures one zone of PID parameters
- lakeshore340_set_ramp
- configures ramp parameter
- lakeshore340_set_settle
- configures settle parameters (lakeshore
signals with status bit if temperature is stable)
For the lakeshore340_set_pid and the lakeshore340_set_ramp
command parameters can be set up on the command line, just enter the command followed
by the appropriate number of parameters (4 and 2).
This short description does not replace the manual of the lakeshore 340 model. Read
the manual und use the hp_gpib_put and hp_gpib_get commands
to write your own macros.
The hp_move.mac package provides the commands gmv,
gmvr, ugmv, ugmvr, which are able to drive one
to ten motors at the same time. This package might be used to replace the
old move commands of standart.mac. For a description of these commands
see 4.3.
The macro hp_mono_6idd.mac provides special commands
for operating the 6ID-D Side Station monochromator. These special commands are
needed for two reasons: First the 6ID-D Side Station monochromator consists of
three monochromator crystal pairs and these macros enable the user to
easily exchange them. Second the second monochromator moves over a
large distance. If the energy is changed by several MeV a realignemend is
necessary.
- setmono value
- This macro replaces the setmono macro distributed
with spec. The original macro can be found under _setmono. With
the setmono command a monochromator crystal pair can be choosen and
spec automatically makes all changes necessary to change the monochromator
crystals. If value is the number of a valid monochromator crystal pair the
change will be done immidiately, otherwise an interactive menue will be displayed
- mono_accept_position energy
- The 6ID-D Side Station monochromator
covers a very large energy interval. The monochromator is working very stable but
if big changes in the energy are made the alignement of the monochromator changes
a little bit. Once the monochromator has been aligned for a certain energy
mono_accept_position can be used to calibrate the monochromator to
the correct energy. Warning! Do not use the standart spec command setE
for this purpose, it will work for the moment, but the energy calibration of
the monochromator will be lost in the long term.
- mono_calc_position energy
- calculates the theoretical positions
for the motors monu, mond and montrav for a given energy.
- mono_calc_energy_range
- calculates the energy range which is
covered by the actually used monochromator.
- mono_show_settings n
- shows all parameters for the monochromator
with number n, if no number is supplied it shows the parameters for the actually
used monochromator.
- mono_show_all
- shows all parameters for all available monochromators.
- mono_align_crystals
- This macro aligns the beam on the second
monochromator crystal. To do so the second monochromator is moved to several different
positions and at each position a scan with the
of the first monochromator
crystal is done. The range where these scans are done depends on the energy and the
chosen monochromator crystal pair. This macro does not do any data analysis.
The user is responsible to analyse the data and to chose a suitable position for
the monochromator pairs.
- mono_save_values filename
- all relevant information about all three
monochromators is stored in a file named filename on the harddisk. To reset all variables
to these values execute this file with the command qdofile, for an explanation
see section 4.2. These information is also stored on harddisk, whenever for example
the command mono_accept_position is executed. The files are stored in the subdirectory
monochromator in the SPECD directory. This is normally the directory where for example the
standart macros of spec are placed. To see where this is just type p SPECD.
- _mono_determine_crystal
- This macro determines which crystal is actually in
use by looking at the position of motor m1_xtal, the crystal changer of the first
monochromator and than assigns the number of the crystal to the global variable mon_num.
The commands defined in the file hp_motor_6idd.mac
are used to control the special Huber diffractometer if the 6ID-D Side Station.
The
2
rotation for the vertical scattering mode of this
diffractometer consists of two translations and one rotation. All motors
of the 6ID-D Side Station are described in section 2.2. In this
macro the movement of the virtual motors described in table
2.1 is implemented. All motor movements are normally
done automatically, the following commands are intended for the setup
of the diffractometer.
- diffractometer_mode_change value
- Changes the mode
in which the virtual motors operate. Mode 0 means no coupling between
virtual and real motors, all movements of virtual motors will not affect any
real motor. Mode 1 means the diffractometer is in vertical mode and
mode 2 means the diffractometer is in horizontal mode. If virtual motors
are used in this mode the corresponding real motors will move. See section
2.2 for a detailed description which motors are coupled.
If no value is given the command will show the options and ask for a value.
- ana_elast
- see section 4.7
- setanalyser
- see section 4.7
To be able to simulate the vertical
2
rotation three variables
have to be set. This is done in the first lines of the file
hp_motor_6idd.mac, for the actual values see table
4.1. The variable dist_sample_analyser defines
the distance between the sample mounted in the center of rotation of the
diffractometer and the analyser. During the simulated
2
rotation
this distance will stay constant. The variables zero_tt_y and zero_tt_z
define the position of the motors tt_y and tt_z for
2
= 0. For tt_y this is the difference between the zero
of the encoders and the beam hight, when the beam is going through the center
of rotation of the diffractometer. Because in the moment the encoder for motor
tt_z is not working the zero position is determined by using a plumb to
put the analyser directly above the sample position. Therefore, zero_tt_z and
dist_sample_analyser have the same value.
Table 4.1:
Actual values for the variables used
for the setup of the virtual
2
movement in vertical scattering
geometry
| Variable name |
value |
| dist_sample_analyser |
924.31 |
| zero_tt_y |
5.26 |
| zero_tt_z |
924.31 |
|
The Canberra Detector system used at the 6ID-D Side Station is operated through
a Canberra computer interface called AIM 556. This AIM controls a
digital signal processor (DSP) with integrated support of a multi channel
analyser (MCA) and a high voltage (HV) power supply for the detector.
There are several MEDM screens available to control the HV power supply
and the DSP. In addition a graphical display of the MCA is provided.
The setup of the HV power supply and the DSP should be done by experienced
staff members. Normally not two many changes should be necessary. Two
remarks to operation:
- The DSP can be used in coincidence or anticoincidence mode. It is
only counting if the regular counters are running or not running at the
same time, respectively.
- it is possible to connect an analog single channel analyser (SCA) to
the test output of the DSP, this way the DSP is used as an ordinary amplifier.
This makes life a lot easier, because the regular counters can be used.
Warning! hp_mca.mac requires that hp_fio.mac was
loaded before hp_mca.mac.
The MCA features are available in spec, they are provided by the
macro package hp_mca.mac. This package does not use any
specific commands of the DSP and therefore should work together with
any MCA system supported by EPICS. This package only provides basic features.
In the moment the data is only stored in the fio format of Spectra.
During counting done with this macro package the display of the MEDM window
is not updated. The reason is that updated consume to much time so that not all
photons will be collected if the MCA is read out.
- mca_count filename time
- The mca counts for the given time
and the result is saved into a file with name filename. Both arguments are
optional. If only one argument is given that must be time. If no or only
one argument is given the filename is constructed from the variables
MCA_NAME and MCA_NUMBER.
- mca_new_filename
- Use this command to define a filename and
a starting number. Whenever the mca_count command is used without
the optional filename the name defined in here is used. If MCA files
are written during scans they will have the name of the fio file with an additional
number corresponding to the point in the scan where the MCA spectrum was taken.
If no FIO_NAME is defined the MCA_NAME will be used and
the user is responsible to keep track which file belongs to which point and scan.
- mca_mode_change number
- The MCA macro knows three modes:
- 0
- - MCA not in use
- 1
- - MCA in use but only regions of interest (ROI) are read out
- 2
- - MCA in use, at each scan point a MCA spectrum is written to disk
Argument number is optional, if omitted possible arguments are shown and
the user is asked for his choice.
- mca_energy_calibration
- With this command the user gets an
easy interface to do an energy calibration. In principle nothing more is done
then defining four variables, MCA_cal_ch1, MCA_cal_ch2, MCA_cal_ener1 and
MCA_cal_ener2. Two channel numbers and the corresponding to energies are needed.
For the 6ID-D Side Station a Co_57 source is a good choice, it has
two lines at 122 keV and 136.5 keV.
MCA data files will be automatically copied to the same place like the fio
files, see section 4.11.1 for explanation how to copy files.
The macros in this file control the VMIC 4116 digital analog converter
(DAC). This device is a 16 bit DAC which is able to provide voltages
in the range from -10 V to +10 V.
- dac_volt channel value
- Applies a voltage to one of the
eight channels. Channel has to be a value between 0 and 7, value is
the voltage between -10 and +10
- dac_bit channel value
- Applies a voltage to one of the
eight channels. Channel has to be between 0 and 7, value is a bit
value between 0 (corresponds to -10 V and 65535 (corresponds to
+10 V)
- dac_init
- This command initialises the DAC. This command
is automatically called by dac_volt or dac_bit if
necessary. It should only be necessary if the VME crate was switched
off. Nevertheless this command can be called at any time without doing
any harm.
hp_filter.mac controls the filter. It also calculates the absorption.
All values are automatically stored in each scan. It is also possible
to calibrate the filters at certain energies and have those calibrated values
written into the data files. See section 4.1
for commands for explanation of the atten command which
controls the filters. In addition there are some more commands in
this file which might be usefull:
- marshutter word
- Opens or closes a small shutter built
by Peter Hiller which might be very helpfull together with the image plate system.
Word has to be replaced by open or close.
- absorption
- Calculates absorption values
- filter_calibration
- This command does an automatic calibration of the
filter bank which is actually in use by changing the intensity with detuning the monochromator
and moving the filters out of the beam one by one at the same time. This
command might not work correctly and is very primitive. It should be replaced
as soon as possible with a programm which uses both filterbanks instead of
detuning the monochromator.
- filter_show_calibration bank
- Shows if the filter bank
with number bank has been calibrated and if this is the case shows the
calibration
- filter_save_calibration filename
- Saves the actual calibration
of both filter banks in a file named filename. This file can later be executed
with the qdofile command to regain the stored values
hp_ubm.mac contains macros which allow you to do some calculations
related to the ub-matrix and other usefull stuff. See section 4.9
for details, all commands of this macro are listed in the section
with the custom made commands. Originally this macro package was intended
to work together with the rafin program which refines UB matrices from
a given list of reflections and provide other usefull things related to
UB matrices. Unfortunately it was never finished. The only things which
are usable right now is the theta0 command based on an old fortran
program from Thomas Brückel which helps to set up a UB matrix from two reflections
for cubic systems and the hp_read_ubm command which is able to
read output from rafin into spec. richt is a small programm
to calculate the positions of reflections written by Oliver Hermann Seeck (unfortunately
in German).
The macro hp_mar.mac is a preliminary macro to control
the Mar Image Plate Scanner with spec written on November 27th, 2001 during
a beamtime at the 6ID-D Side Station. It is not fully tested but it was working
during that beamtime and it is only providing very limited support of
the features the Mar Image Plate Scanner offers. Feel free to improve it.
Known bugs: Sometimes a command is given by spec and never reaches the Mar
Image Plate Scanner. Commands are transfered by the program package ssh which is
one ore two times a day not working reliable. Also keep in mind that this package
is only working if there is a working and compatible version including public and
private key infrastructure on the beamline and image plate control computers. Due
to changes in the operating systems of the computers the used ssh and scp commands
might have to be modified.
There is one important global variable: MAR_ON. If MAR_ON
is greater then 0 The small shutter build by Peter Hiller will be opend and closed
for each counting command.
- mar_show_settings
- Shows the configuration of the Mar
Image Plate scanner control variables.
- mar_setup
- Configures the Mar Image scanner control variables.
- mar_execute
- Sends a command to the Mar Image Plate Scanner.
- mar_wait_for_imageplate
- Waits until a command is finished
on the Mar Image Plate Scanner.
- mar_read
- Reads and erases the Mar Image Plate Scanner and waits
until it is finished and ready for the next exposure.
dw_shutter.mac written by Didier Wermeille contains the commands shutter word,
idbshutter word, idcshutter word and iddshutter word.
They are used to open the shutters. word has to be replaced by open or close to
open or close the shutter, respectively.
This macro package written by Jonathan Lang and Didier Wermeille provides
commands to move and scan epics variables, the commands are described
in section 4.1.1. On the 6ID-D Side Station a version is running which
automatically executes the command pvdefine if necessary.
On the 6ID-B Main Station if one of the PV macros asks you to execute the
command pvconfig and you do not want to make changes to the
configuration file it is sufficient to execute the command pvdefine.
In this macro written by Didier Wermeille the Escan command provided
within the spec package is redefined. During every energy scan the
actual Q-position at each energy will be written to the data file.
The macros in hp_fio.mac will automatically notice this
change and the Q-positions are also written into the fio files.
Next: 5. Data analysis with
Up: html
Previous: 3. Getting spec running
  Contents
  Index
Dirk Hupfeld
2001-12-20