In the current version, reuse of the symbol d is
accepted.
Can Use .log Extension For Log Files
Previously, log files (files that recorded all of
spec's output) were any files with names that
began with the three characters log. Now files ending
with the four characters .log, are also used as log files.
Debugging Log Files
A new type of log file is available. If an output
file name begins with the characters dlog or ends with the
characters .dlog, all of spec's output
will be sent to that file, as with normal log files. In
addition, if any debugging output is being generated (by
assigning a value to the built-in DEBUG variable),
the debugging output will only be sent to the dlog file
and won't be printed on the screen or sent to any other files.
New Function To Prompt For User Input
A new function named getval() is available for
reading values from the keyboard. See the funcs help file
for usage information. Macros that use the slightly awkward
getvar macro can be rewritten with this new
function.
New Random Number Function
A new function named rand() returns random
numbers. See the funcs help file for usage information.
New \a Attention Character
A new special character sequence, \a (for
attention or audible alert), has been added. This sequence
sounds the terminal bell (and appears to be part of the ANSI C
grammar).
MCA No Longer Automatically Cleared
spec will no longer clear the LeCroy 2301,
3512 and 3521 MCA modules when counting using
tcount() or mcount(). You will have to
use the mca_par("clear") function before counting to
clear the MCA channels. This change is made to accommodate the
needs of some users.
Multiple Processes Can Share GPIB Controller
On System V UNIX operating systems with IPC (inter-process
communication), it is now possible to share one National
Instruments GPIB controller among multiple versions of
spec running on the same computer. In addition,
it is also possible to share a single KS 3988 GPIB-to-CAMAC
controller among multiple processes. The IPC version of the GPIB
controller is selected by the name PC_GPIBPC_L in
the config file.
Multiple Versions Of 386/486 NI GPIB Supported
Both the National Instruments PCII and AT-GPIB cards and
drivers are now supported within the same binary for 386 systems.
The former is chosen using the PC_GPIBPC (or
PC_GPIBPC_L) and the latter using
PC_GPIBPC2 (or PC_GPIBPC2_L) in the
config file. Warning: Selecting the wrong
controller type may crash your computer or damage your file
system.
Multiple Versions of Sun NI GPIB Supported
Three versions of the National Instruments GPIB drivers are
now available for Sun platforms. In the config file, the
keywords PC_GPIBPC (or PC_GPIBPC_L)
select the SB-GPIB Version 1.3 driver, the keywords
PC_GPIBPC2 (or PC_GPIBPC2_L) select the
GPIB 1014-1S driver and the keywords PC_GPIBPC3 (or
PC_GPIBPC3_L) select the SB-GPIB Version 2.1 driver.
Warning: Selecting the wrong controller type may crash
your system.
Support For ACS MCB-4 Motor Controller
Preliminary hardware support is available for the Advanced
Control System MCB-4 stepping motor controllers over RS-232 and
GPIB interfaces.
Support For NSLS MMC32 Motor Controller
Preliminary hardware support is available for the MMC32
stepping motor controller (produced locally at NSLS) over a GPIB
interface.
Support For Oriel Encoder Mike 18011 Motor Controller
Preliminary hardware support is available for the Oriel
Encoder Mike 18011 controller over an RS-232 interface.
Support For Klinger Motion Master 2000
Preliminary hardware support is available for the Klinger
Motion Master 2000 DC and stepper motor controller over a GPIB
interface. See the kl2000 help file for more details.
Support For the kappa Geometry
Preliminary support for the kappa diffractometer
geometry is included.
Support For ESRF
Support for the distributed computing, VME-based hardware
environment of the European Synchrotron Radiation Facility (ESRF)
is now included. A general hardware control function
esrf_io() has been added to spec
(see the esrf help file) and support for the ESRF motor
controllers is available.
Allowing For Slop In E500 Motor Positions
An experimental new feature is available to deal with small
discrepancies between the E500 controller and
spec. The function
motor_par(motor, "slop",
steps) sets a threshold value for the
selected motor for which spec will automatically
use the E500 value as the correct position. A message is printed
if such a correction occurs. The values set are saved in the
state file.
CHANGED FEATURES
New Definition For the scan_plot Macro
The scan_plot macro is now defined in the
standard macros as _plot, which is a newly
introduced name. The setplot macro will change the
definition of _plot, rather than
scan_plot. Local sites that wish to redefine
scan_plot no longer need to redefine the
setplot macro.
New get_angles Macro
Occurrences of the built-in command getangles in
the standard macros have been replaced with the macro
get_angles. This new macro contains the
getangles command, along with invocation of a new
macro named user_getangles. The latter is initially
defined as a null macro.
New get_counts Macro
The built-in command getcounts in the standard
macros has been replaced with the macro get_counts,
which calls getcounts and a new macro named
user_getcounts, which is initially defined as a null
macro. The purpose of this change is to allow the user to insert
code, if necessary, after the call to getcounts
either to postprocess the the counter values, or to implement
user-level counters. For one particular configuration, the
distance of the detector from the sample varies with the cosine
of an angle, so user_getcounts is defined to
multiply S[DET] by the appropriate factor.
New count_em Macro
A new count_em macro replaces all the code and
immediate logic surrounding calls to mcount() and
tcount(). Included in count_em are
calls to new macros named user_precount and
user_postcount. By default, these macros are
defined as null macros. They can be given definitions by users
for various purposes, including implementation of user-level
counters. See the count.mac source file for details.
Orientation Matrix Code Accommodates Six Angles
The maximum number of angles used by the orientation-matrix
code to describe each reflection has been increased from five to
six, to accommodate the new six-circle geometry.
Increase In the Number Of Data Groups
The number of data groups has been increased from eight to
256. A limit has been placed on the total number of points
allowed for all groups. That limit is currently 65,536 points,
but can be increased by CSS if requested.
Data Groups Can Be Deleted
Calling data_grp() with the number-of-elements
argument set to zero will now delete the group.
Renaming Of Background-Flag Variable
The flag for background subtraction in the macros, defined in
the source file plot.mac, has been renamed
BG. Previously the name of the flag was
PG.
New Measure Macros
The measuretemp macro, called after counting in
the _loop macro, has been replaced with two new
macros called measure1 and measure2.
Initially, measure1 is defined as
measuretemp to maintain compatibility with prior
usage. Also introduced in the _loop macro is a new
measure0 macro that is called before counting. Both
measure0 and measure2 are initially
defined as null macros.
Macros Work Without A Monitor Counter
The standard scan and counting macros have been modified so
that they can still be used if there is no monitor counter
configured. Set the global variable MON to -1 if
you don't have a monitor counter.
IMPROVED FEATURES
No More Need For So Many Underscores
The initial underscores in the names of many of the local
symbols in the standard macros have been removed in order to
improve the readability of the macros. The underscores no longer
serve a purpose due to the improvements in the functionality of
the local keyword.
Improvements To Output File Handling
A number of changes have been made to improve the handling of
output files.
- 1) spec now keeps track of the
current working directory when each file is opened. If you exit
spec and then restart it from a different
directory, the existing output files will be reopened in their
correct directories.
- 2) If you restart spec using an
existing state file and there is an output file present in the
state file that has disappeared from the file system,
spec now prints a warning message. If possible,
spec will create a new file using the previous
name and directory, though.
- 3) The
on() and open()
functions, when used without arguments, now also print the full
path name of the files, along with the name by which each was
opened.
- 4) When the
close() function is used with
an unopened file, spec no longer prints an error
message.
- 5) Previously, if you removed a spec
output file while spec still had it open, all
subsequent output to the file would be lost until the file was
closed, either through the
close() function, by
exiting and restarting spec or through the
fixstate command. spec will now
detect when you attempt to write to an open file that has been
removed from the file system. spec will print a
warning message, close the old file descriptor, create a new
version of the file and open that file for writing. As a general
rule, it is a bad idea to use any other UNIX utility to change a
file currently opened for writing by any program, including
spec.
- 6) The previous versions of the
newfile
macro opened the data file in a directory named ./data if
it existed. A new global variable named DATA_DIR is
now used to hold the name of the optional data directory.
DATA_DIR is initially set to ./data, so the
default behavior is as before.
- 7) If the file you enter in the
newfile
macro has the same name as the current data file, but if you have
changed directory, the previous file will be closed and a new one
opened in the current directory.
- 8) If the
newfile macro can't open the
file asked for, the DATAFILE variable is set to
"/dev/null".
- 9) The
newfile macro now prints warning
messages if the file already exists, if the file exists and
doesn't have the #F characters at the start of the
file or if the file name given is the same as the current
DATAFILE but doesn't exist. This feature uses a
program called chk_file, which is installed in the
SPECD directory.
Monochromator Support Revamped
The monochromator support has been revamped. All of the
functionality is now in macro code. The geo_mono.c module
has been eliminated. All of the monochromator macros are in the
macro source file macros/energy.mac. One-, three- and
four-motor monochromators are supported. The macros
automatically detect which type of monochromator is being used
based on the motor mnemonics present in the config file.
The get_E, set_E and
move_E macros have been renamed getE,
setE and moveE, respectively. See the
new mono help file for details.
CAMAC Info In install_data File
The -C flag to the Install program has been
replaced with a line in the install_data file that keeps
track of whether or not to include CAMAC support.
Non-Super User Installation
The -S option to the Install program that lets
you install spec without being super user as
long as you have write permission on all the relevant files has
been fixed to work on most, if not all, systems. Previously, the
call of the chown UNIX command caused problems on some
systems where it was only available to the super user. Now, the
-S option disables all calls to chown.
Driver Files Can Be Installed Without Kernel Rebuild
The driver install scripts for the 386 systems now accepts a
-n option to indicate not to rebuild the kernel after
installing the driver files.
Improvements to surf Geometry Code
The code in geo_surf.c that determines which version
of the available surface diffractometer configurations to use
based on the configured motor mnemonics has been improved to
check that all the necessary mnemonics are present, rather than
just looking for one or two of them. Also, the code now does
better error checking for mathematical singularities. In
addition, the calculations between motor positions and reciprocal
space now work correctly in all the available modes.
Improvements To fourc and fivec Code
The fourc and fivec geometry code has a few
more checks for unobtainable reflections in the azimuthal
modes.
Changes To twoc Internals
The numbering of the Q[] parameters for the
twoc geometry has been changed to be consistent with the
other geometries. The indices of the LAMBDA,
ALPHA and BETA parameters have all been
increased by one. Q[2], formerly
LAMBDA, is now unused.
Improvements to bug Macro
The bug macro now uses the value of the new
global variable MAIL for the name of the mail
program to run. The default value is the string
mail.
Faster, More Robust High-Res Graphics
The interface code to the high-resolution graphics filters
has been rewritten for improved speed and robustness.
X11 Graphics Automatically Brought To Front
The x11filt program will now automatically raise the
window to the front each time its contents are changed. This
feature can be disabled in your .Xdefaults file by setting
the spec.AutoRaise parameter to off.
X11 Graphics Checks For Backing Store
The x11filt code has been fixed to automatically
detect whether "backing store" is available. If
backing store is requested when it is not available, the code
switches automatically to retained pixmap mode.
Am9513 Counting Improved
The code for the Am9513 based counting boards for the PC has
been improved. The maximum count has been increased from from
10.9 minutes to 71.5 minutes. When counting to time, the time
base resolution (in seconds) is now set according to the
following table:
|