changes
Highlights for spec release 6.11
August 3, 2023 - RELEASE 6.11.07-2
HARDWARE
Improved Resynchronization For Tsuji Counter/Timers
The spec support for the Tsuji counter/timer models now does a much better job detecting when responses are out of sync with the commands and with the subsequent resynchronizing of the communication over both socket and serial interfaces.
July 19, 2023 - RELEASE 6.11.07-1
FIXES
Fix For Recent getline() Bug
A bug in the getline() update in the previous release that could result in a segmentation fault has been fixed.
Fix For chk_acq_using Macro
A small addition to the chk_acq_using macro, which is part of the new acq.mac package, eliminates a possible spurious error message. See the acq help file.
Fix For USB-CTR "set_bits" Option
A bug introduced in spec release 6.10.01 that broke the "set_bits" counter_par() option for the Measurement Computing USB-CTR has been fixed.
July 16, 2023 - RELEASE 6.11.07
IMPROVEMENTS
The getline() Function Now Tracks Multiple Open Files
Previously, getline() would only keep track of the current position of one input file. With this release, spec will remember the current position of each file until getline(file, "close") is called for each file.
Default Values Returned For "modules" and "hdw_roi?" Parameters
The "modules" parameter for MCA and image-type devices introduced in spec release 6.11.03 returns the number of distinct modules available on a device where each module can produce a data array. The "hdw_roi?" parameter has been recognized since spec release 6.10.01. A nonzero return value indicates the controller can return a value for a specified region of interest. If no hardware ROI available, spec will read the data array from the device to calculate a region of interest. Both of these parameters are used in the new acquisition macros. (See the acq help file.) This spec release insures that devices implemented using macro hardware or server hardware will now have sensible default return values if the user macros or server code ignore the parameter. The default for "modules" is one. The default for "hdw_roi?" is zero.
FIXES
The ^C Characters Appear On Screen Once Again
Sometime around spec release 6, the ^C characters could stop appearing on the terminal screen when a user typed a ^C to interrupt the current activity. This spec release should have the characters once again echoed to the screen.
Problem With Echo Off In unix() Subshells Fixed
An issue beginning with spec release 6.09.05 where the terminal session in a unix() subshell would often start in cbreak, no-echo mode has been fixed.
Issue With RCP Library Linking Fixed Yet Again
This spec release tries another approach to providing links to RPC library functions used by some of spec's supported hardware. Built-in support for these functions was removed at different release levels of glibc depending on what build flags different Linux platforms chose to include when building the library. Linux distributions provide an alternative libtirpc.a that includes the RPC functions, but that library usually needs to be manually installed. If the platform's glibc doesn't include RPC support, spec's install script will link with the alternative library if it is available. Otherwise, spec will link with a dummy library and print a message explaining the situation. This method should work on all Linux platforms.
Several Issues With the New acq Macros Fixed
Updates in both the acq macros and in C code address several issues. Bugs in the macros that prevented the "auto_run" and "soft_preset" parameters from being set for image devices and that produced spurious error messages about "unconfigured" devices are fixed. Problems with macro hardware or hardware server implementations didn't recognize the "modules" or "hdw_roi?" mca_par()/image_par() parameters have been resolved.
HARDWARE
Updated Support For Physik Instrumente GCS-2 Controllers
The spec support for the Physik Instrument GCS-2 controllers, such as the C-663.12 and C-863.11 models, has been updated to work with daisy-chained configurations. See the pi_gcs help file.
May 13, 2023 - RELEASE 6.11.06
FIXES
Issue With splot_cntl("open") Fixed
An issue introduced in spec release 6.11.01, where a splot_cntl("open") command could interfere with other function's "open" commands, such as implemented in plot_cntl(), getline() and h5_file() has been fixed.
HARDWARE
Fix For medet_setup Used With Multix Detectors
A bug in the configuration menu macro for the the Multix detectors that prevented setting the channels count correctly has been fixed. These detectors are implemented in spec as server hardware. See the multix and server_hdw help files.
eiger_server Arm Mode Reconsidered
The "arm_mode" parameter introduced in the previous release has been removed. Instead, spec's eiger_server will arm the detector at the start of a scan and issue trigger commands for each point. When counting for a single acquisition, spec will configure, arm and trigger the detector for each acquisition. This method allows users the flexibility in configuration they need, but still optimizes performance during scans.
April 11, 2023 - RELEASE 6.11.05
HARDWARE
Preliminary Support For Physik Instrumente GCS-2 Controllers
This spec release contains preliminary support for Physik Instrumente GCS-2 motor controllers. The code has been tested with models C-663.12 and C-863.11, but will likely work with additional models, although some fine tuning of the code may be needed. See the pi_gcs help file for details.
New "arm_mode" Parameter For eiger_server
The eiger_server included with spec for the Dectris Eiger 2D detector includes a new "arm_mode" parameter to choose between the Eiger's default "arm-then-trigger" mode for each image and a custom mode that offers improved performance by arming once and sending only a trigger for each acquisition. Previously, the custom mode was the only mode available. The "arm-once" mode is still the default for eiger_server. See the eiger help file for details.
FIXES
Fix For Missing Prompt Strings In Log Files
New code introduced in spec release 6.11.03 inadvertently prevented spec's command-line prompt strings from appearing in log files. That issue is resolved in this release.
April 5, 2023 - RELEASE 6.11.04
IMPROVEMENTS
Unlimited Length For unix(cmd, var) Strings
The unix() built-in function executes the command given as the first argument using the system shell. With a second argument, the output of the command is placed in that variable. Previously, the length of the output was limited either to 4096 bytes or to a length specified in an optional third argument. With this spec release, there is no limit to the length of the command output stored in var and no need for a third argument.
HARDWARE
Renamed Motor and Counter Channel Controller for MODOCA Devices
The controller types for motor and counter channels in the config file have been changed to MODOCA from SP-8_EM and SP-8_S (for motors) and from SP-8T_EM, SP-8C_EM, SP-8T_S and SP-8C_S (for counters). It was an oversight in the prior coding to have multiple names in each category. The unit number associated with the channel identifies which MADOCA controller the channel is using. The configuration editor (edconf) invoked by the config macro will automatically change the old names to the new names. The spec Install script also runs edconf -I to update the config file for any changes of this sort. New spec releases will work with config files with either the old or the new names. Prior spec releases will not recognize the new names.
Fixes For Tsuji Counter/Timer Configuration
A crash associated with using multiple Tsuji Counter controller with one a "counter/timer" and others as "counters only", where the "counter/timer" unit was not unit 0, has been fixed. In addition, spec will now display an error message that says the "counter/timer" must be unit 0 if it is not. Also, spec will once again increase the channel count by one to accommodate the phantom timebase channel associated with Tsuji timer/counters (channel 8 on an 8-channel counter, channel 16 on a 16-channel counter, etc.). Thus, the NUM field in the configuration editor no longer needs to be set to one plus the number of physical counter channels.
FIXES
Fix For Crash Using Parameter "address" With Macro Hardware
An old bug that could lead to a crash when trying to read the "address" parameter for macro hardware motors or counters has been fixed. The issue only occurred when the ADDR parameter was not set for the associated controller in the config file. The bug was introduced in spec release 6.08.04 for motor_par() and spec release 6.09.05 for counter_par().
March 24, 2023 - RELEASE 6.11.03
IMPROVEMENTS
New "active" Read-Only Parameter For MCA and Image Devices
The mca_par(), mca_spar() and image_par() functions now return a nonzero value for the new parameter "active" if the associated device is running. This parameter is used with the updated MCA and image device ROI and acquisition macros to support the "read during updated counting" option.
New "modules" Parameter For MCA and Image Devices
The mca_par(), mca_spar() and image_par() functions now recognize the new parameter "modules". If the device supports multiple modules at the same unit address, it will return the number of modules present. If the device doesn't support multiple modules, the function calls return the value one. This parameter is used with the updated MCA and image device ROI and acquisition macros to allow separate configuration of ROIs and read/save behavior for each module.
MCA and Image Macro Hardware Can Now Get Subaddress
The first argument to the MCA and image device macro hardware _cmd() and _par() functions will now encode a subaddress if the spec user-level function calls that generated the calls to the macro functions include a subaddress. Subaddresses are used if the unit has multiple modules. Within spec, subaddresses may be specified as 0.0, 0.1, 0.2, ..., or "0:0", "0:1", "0:2". In the latter case, the arguments must be strings. In both cases the first number is the unit number, and the second number is the module number. In the calls to the macro function, the first form will be used. The unit and module address can be extracted as:
def sim_mca_cmd(num, key, p1, p2, data) '{ local n, unit, module n = sscanf(num, "%d.%d", unit, module) ... }'
In the above, if n is one, there was no subaddress used in the spec command. If the macro hardware doesn't use multiple modules, there is no need even to look for a subaddress.
Note also, the new mca_par(), mca_spar() and image_par() parameter "modules" will be passed to the _par() macro function to set or get a value for the number of modules in the unit. If the _par() function ignores the "get" request, spec will assume there is only one module.
Install Script Improved For "Slash-less" "install" and "aux" Directories
If installing a test or private instance of spec using directories in the distribution directory for the bin and spec.d locations, the Install script will prepend the current working directory to the location when patching the installed scripts and programs that need to know the paths to certain other installed files. This action is only taken if the specified directory name doesn't contain a / character.
EXPERIMENTAL FEATURES
queue() Function To Schedule Commands
A new function named queue() is available to schedule commands to be run once at a fixed time in the future or to repeat at an interval. Commands from the queue will normally run while spec is waiting for keyboard input. If spec is otherwise occupied commands in the queue will be deferred until the next opportunity spec has to check the queue. However, a queue("check") can be issued within running statements to give commands that are due a chance to run. Note, moving and counting commands are currently not allowed. See the new queue help file for details.
Daemonize Mode To Run spec As a Background Server
New start-up options -S3 or -S4 place spec in a background server mode with no connection to the terminal session. All commands to daemon-mode spec must be through its server interface. See the daemon help file for details.
MACROS
ROI and MCA/Image Device Acquisition Macros Updated
The ROI and MCA/image device acquisition macros are now included in the single acq.mac distribution file. There is no longer an roi.mac file. In addition, the setup macro is now called acqsetup, although roisetup is included, but simply defined as acqsetup. The acqsetup macro "read and save" option now offers the choices to just read or to read and save the associated MCA or image device during scans. (One might want to just read the MCA in order to update the live-time spectra displayed in the splot utility.) There is also a new option to select between reading the device repeatedly during updated counting or to read only at the end of the count interval. The macros now offer configuration sections for each module when the device has multiple modules associated with the unit. In addition, the "soft_preset" option is now configurable for each MCA and image. See the acq help file.
Powder Mode Macros Updated
When powder mode is enabled, spec rocks a designated motor over a fixed distance at each point in scans involving other motors. The powder-mode macros now include an option to have the powder motor speed determined by the scan count time. In addition, that option, the option for unidirectional powder moves, the powder motor designation and rocking width can all be configured on the command line with a single invocation of the setpowder macro. See the powder help file for details.
Fix For df_array_xxx()
A misplaced parenthesis that broke the df_array_xxx() call in the df_array() macro function has been shifted into the correct position.
Motorless Fly Scan Updates
The motorless flyscan macro now interprets its first argument as the number of points, rather than the number of intervals. The scan heading shown on the screen and with the #S line of the standard spec data file shows the second argument as the time per bin, irrespective of whether the fly_setup configuration option is to give arguments as time per sweep or time per bin. This behavior is now the same as for fly scans with motors.
Typo In setor1 Fixed
A typo in the setor1 geometry macro introduced in spec release 6.11.02 has been fixed.
HARDWARE
Better Saving Of Runtime Parameters For Selected Acquisition Hardware
This spec release includes an updated method for saving runtime parameters for acquisition hardware. Several MCA devices now have parameters such as time presets, group size, settings for the "soft_preset", "auto_run" and "auto_clear" modes, etc., saved across reconfig calls, along with being saved in the state file. This feature is currently implemented for the Dectris Mythen, the Amptek DP5, the Measurement Computing USB-CTR (in MCS mode) and for the macro hardware MCA and image devices. Other devices will likely have this feature in future spec releases.
Eiger Server Updates
This spec release includes preliminary support for stream version 2 ("V2") firmware from Dectris for the Eiger 2D detectors. If "V2" is selected via the "stream_version" image_par() parameter, separate images can be saved based on the active threshold filters. See the eiger help file for details.
FIXES
Issue With RCP Library Linking Fixed
An issue where the RPC library functions were not linked into spec with C library versions earlier than glibc 2.32 has been fixed.
Possible Crash When Using New Runtime Counters With Certain Devices
The implementation of runtime counters by way of the new "add" parameter to counter_par() introduced in spec release 6.10.01 was flawed and could cause spec to crash if certain hardware timers were configured. The ROI macros introduced in the same spec release use runtime counters. That bug has been fixed. The hardware controllers with the issue were the ESRF VCT6, Labo NT-2400, NI 6601/2 and 63XX, Ortec 9XX, Detel S21DC, FST SMC2100, spec server counters, EPICS scalers and EPICS PV counters.
March 13, 2023 - RELEASE 6.11.02-2
FIXES
Fix For Broken MDrive and Siemens D5000 Controllers
A couple of editing errors in spec release 6.11.02 that made the MDrive motor controller and the Siemens D5000 counter/timer unusable have been fixed.
February 17, 2023 - RELEASE 6.11.02-1
FIXES
Fix For Bugs In calc() and setor0
The previous release introduced a bug in the calc() function that prevented the optional second argument to be recognized as any number other than zero. That broke the calcR macro used in the setlat macro associated with orientation matrix geometries. The USER_UB macro used in several orientation matrix macros also broke. In addition, a typo in the update to the setor0 macro is fixed. The bugs were introduced while implementing the new function to return an array of HKL values and while making changes to old standard macros to remove use of the _1, _2, etc. symbols.
February 3, 2023 - RELEASE 6.11.02
IMPROVEMENTS
New Auto-Save For State File Available
A new "auto_savstate" spec_par() parameter is available. When given a nonzero value, the state and history files will be written out automatically before the main spec prompt, but no more frequently than the value (in seconds) of this parameter. The feature may be useful in situations where the spec computer tends to crash. Otherwise, as has been the traditional behavior, the files are only written when spec exits or if the built-in savstate command is entered. See the spec_par help file.
Consistent Response For motor_par() Parameter "channel"
The return value for motor_par(mne, "channel") now consistently returns the channel number from the hardware config file. Previously, for most motor controllers that number channels from one (rather than from zero), the returned value was one less than the configured channel number. Affected motor controllers are those listed in the "MOTOR NUMBERING" section of the motors help file.
New Function To Return Array Of HKL Values For an Array Of Angles
For geometries that use an orientation matrix, a new calc() function is available to return an array of HKL values when passed an array of motor positions. If arr is a data array with the number of columns set to three plus the number of geometry motors (_numgeo), the call calc(9, arr) will place HKL values calculated from the motor positions into the last three columns of arr. Small changes were made to all of the 3D orientation-matrix associated geometry files (geo_fourc.c, geo_psic.c, etc.), making no_can_do a global variable and assigning a value to a new num_geo global variable to accommodate this feature.
New Option For array_dump() To Return a String
If the value of the initial optional argument to the array_dump() function is the empty string "", the function will return the formatted array output as a string, rather than write the output to the screen or to a file. See the arrays help file.
New "argc" Element In strdef() Optional Array
The strdef() function returns the string definition of the macro name passed as argument. If an optional associative array second argument is included, it is filled with parameters associated with the macro. For macro functions, a new associative array element, "argc" is created and assigned the value of the number of arguments in the macro function definition. See strdef in the funcs help file.
Debug Level Warning Now Shows Use Of Undeclared Variables
Best practice in spec is to declare variables explicitly global or local. The latter avoids unintentional name space conflicts, where a symbol used in one macro might have its value changed in another. If debug "warning" level 2048 (or 0x800) is enabled, spec will print messages each time an undeclared variable is referenced. Note, assigning values to a symbol at the main prompt will automatically make the symbol global and is equivalent to declaring it global. Assigning values to a symbol within curly brackets make the symbol implicitly local and would be the source of "undeclared" warnings. Note also, the "warning" debug level prints messages about using "unset" variables. However, such usage is generally acceptable, as one can rely on unset variables having a value of zero or null.
The undef Command Now Accepts Metacharacters In Arguments
Arguments to the undef command can now include the standard metacharacters *, ? and []. As usual, * matches anything, ? matches any single character, and [] enclose a range of characters to be matched. To avoid inadvertent removal of a large number of macros, if the number of matching macro names exceeds a threshold, keyboard confirmation is required. The default threshold is 10, but can be changed with the new "undef_threshold" option to spec_par(). See the spec_par help file. Also, if an argument contains only * or ? characters, confirmation is required (to avoid an accidental undef ?, for example). Note, the previous behavior where undef with no arguments would produce a syntax error is gone. Instead, undef with no arguments is accepted as input, but does nothing.
Install Script Updates
The spec installation requires a C compiler to create the spec executable based on site configuration parameters. If the C compiler package was not installed, the resulting error messages did not clearly indicate the problem. The Install script now checks for the compiler and if missing, requests that one be installed.
In addition, a new -C option is available to remove compiled files from a previous run of Install. The files will be recreated as the installation proceeds.
Finally, the test for the presence of the Sun RPC libraries is improved. If the support is missing, the spec installation will continue with just a message warning that the several hardware devices that require RPC support will not be available. Note, the GNU C library officially removed RPC as of glibc version 2.32 (August 2020). An alternative library, libtirpc, is available, but no longer required by spec if RPC hardware is not being used.
MACROS
New calcHKL_A() Macro Function To Calculate HKL Arrays
The calcHKL_A() macro function takes an array where each row contains a set of geometry motor positions and returns an array where each row contains the corresponding HKL values. If the array argument has _numgeo + 3 columns, the HKL values will also be assigned to those last three columns.
Updated savmac and cplot_plot Macros
The savmac and cplot_plot macros have been updated so they no longer use the deprecated file on() and off() functions. Instead, the macros use fprintf() to write to a single output file or device.
Improved Use Of df_print() In Standard Macros
Use of the df_print() in the standard macros, introduced in spec release 6.10.06, has been tuned so that in more instances each call is for one line of output. The introduction of df_print() is to make it easier to filter or redirect output intended for the spec data file. Previously, the #S and #D scan header lines were both included in one call to df_print(). The lines now are passed in distinct calls. Also, the header block containing motor and counter names and mnemonics is now passed to df_print() one line at a time. Finally, the comment and qcomment macros have been modified to overcome the limitation on the number of arguments allowed with df_print().
Updated Macros For Showing Scan Data Points
The sdata_dump() macro, called by pts, now takes an additional optional argument to specify a file in which to save the points. The arguments to pts have the same meaning as the arguments to the splot macro (see the splot help file). The arguments determine which array to use, which columns to use for the independent variable, the dependent variable(s) and the rows (points) to show. The macros default to displaying the data in SCAN_D from the last scan. In addition, a new sdata_pts() macro function is included that behaves as pts, but with a first argument that is passed to sdata_dump() as the optional file argument. If the file argument is the null string, sdata_dump() and sdata_pts() return the list of points as a string.
Fix For plotselect With Arguments
When invoked with arguments, plotselect will assign the counters given as arguments as the counters to be plotted in the first plot window. Also, plotting in secondary windows (if configured) will be cancelled. The feature to assign the counters once worked, but hasn't for some time.
Fix For Fly Scan Pre-Scan Limit Checks
The pre-scan limit checks in the fly scans were not effective if scanning from a higher value to a lower value, as the macros did not check the start position against the high limit or the final position against the low limit. In addition, the limit checks did not account for the half-interval offset added to the start and final positions. Both issues are now fixed.
General Tidying Up
Minor clean up of the standard macros includes making sure local variables are explicitly declared and using the more robust motor_num() function rather than motor_mne() to check whether a particular motor mnemonic has been configured.
FIXES
Fix For array_dump() Continuation Lines
An error where backslash continuation indicators would appear in the output of array_dump() for a two-dimensional array when the "%#C" option was used been fixed. The number (#) designates the number of rows per line for a 2D array, but doesn't split lines. The "%W" options specifies the number of elements per line and if that splits a row of the array, a backslash continuation indicator will appear.
HARDWARE
New Acquisition Mode For Eiger Server
The hardware server for the Dectris Eiger 2D detector has been updated to include support for accumulation mode. This mode enables combining multiple images over a set count time into a single image to get around issues with pixel or read-out counter saturation. Either the maximum accumulation time for each individual image or the number of acquisitions to use in the final image can be specified. The final accumulated image will be the image that is saved and used for region-of-interest calculations. See the eiger help file.
October 5, 2022 - RELEASE 6.11.01
IMPROVEMENTS
New HDF5 Options To Test If a Group, Dataset Or Attribute Exist
The h5_attr() and h5_data() functions can now be used with two arguments to test whether a given object already exists in the HDF5 file. See the hdf5 help file for details.
Plotting and Analysis Now Handle One-Dimensional Arrays
The array_plot() function used for data plots and the array_op() function to calculate analysis values, such as full width at half max (FWHM) or center of FHWM (cFWHM), now work well with a one-dimensional array argument, such as an array containing an MCA spectrum. If the array has only one dimension, the index number of each element is used as the x independent variable, while the array element at each index is the y dependent variable. Both the internal C code and the standard macros have been updated. See array_op() in the arrays help file and the splot help file.
array_plot() Of One-Dimensional Sub-Array Now Uses Base Array Index
The array_plot() built-in function previously numbered the x-axis for plots of one-dimensional arrays from zero to the number of points. The function will now use the actual index number of the full array. For example, array_plot(arr[100:200]) will number the x-axis from 100 to 200, rather than 0 to 100, as was the previous behavior.
New "basename" Option For the Built-in OUTFILES Array
The built-in OUTFILES array introduced in spec release 6.02 now includes an additional element called "basename" which contains the last component of the file path. See the syms help file for more information on OUTFILES. Type print OUTFILES from spec to see the complete array for the current session.
syms Display Improved
The columns in the screen output with the syms command have been reorganized for better readability.
Unresponsive Now Included In "unusable" Status
The "unusable" test with mca_par(), mca_spar() and image_par() now returns non-zero if the MCA or image device has become unresponsive. With some devices that are initially usable and later become unresponsive, spec notices and sets an internal flag. Previously, a test for unusable status might print an error message indicating an unresponsive device. Now the "unusable" test will include a check for unresponsiveness in the return value without generating error messages.
New splot_cntl() Syntax For Sending Arrays
The splot_cntl() syntax for sending array data to the Python splot utility via socket communication (as opposed to shared data) is changed. The "send" keyword is still used, but rather than including the array name in the string argument, the array name follows as a second argument, as in
splot_cntl("open;send", SCAN_D)
or
splot_cntl("send", SCAN_D[100:200])
The standard plotting macros now use the new syntax. Only one array can be sent per call. This change was needed to support sending one dimensional arrays. When sending a one-dimensional array, the internal code will send a two-dimensional array with a first column (for a row-wise array) or first row (for a column-wise array) set to the index number of the base array. For example, if sending arr[12:20], where arr[] is a one-dimensional array, the index numbers will run from 12 to 20.
Improved splot_cntl() Behavior
The splot_cntl() function for sending commands via a socket interface to the Python splot utility using the spec server communication protocol has been rewritten to improve behavior. The function includes a feature where commands entered before the connection is complete are saved in a queue and sent when the connection is ready. Previously, only commands from the first splot_cntl() call would be queued. Now commands from multiple calls are queued. In addition, the function will now return the reply associated with the last command sent. For example
print splot_cntl("command_list")
will print a list of the available commands. In addition, a new command, splot_cntl("status") will return one of three strings: "not connected", "trying to connect" or "connected" to indicate the current state. This command joins the "open", "kill" and "send" commands that are executed within spec, although the "send" command to send an array generates an "adddata" message to splot followed by the array data.
MACROS
Standard Macros Can Now Read and Save MCA and Image Data
A scheme for automatic reading and saving of MCA and/or image data at each point of standard scans is included in this release. Calls of new standard macros, acq_head, acq_precount, get_acqdev and save_acqdev have been included in low-level standard macros as follows. The behavior of these new macros is somewhat preliminary, but the locations and purposes of the macros themselves is unlikely to change. By default, the macros are empty, but if roisetup is used to define region-of-interest counters or configured MCA or image devices to be read and the data saved, the macros are redefined to standard macros that perform the tasks.
The standard _head macro now includes a call of acq_head, a macro that will write header information associated with enabled MCA or image-type acquisition devices to the data file. The lowest level counting macro, count_em, now includes a call of acq_precount that does any special preparation for the acquisition devices. The standard count macro, called by the scans to count to monitor or time, and the standard _upd_count macro, called during updated counting, now each include a call of get_acqdev to read the enabled the acquisition devices. For _upd_count, get_acqdev is only called once when the counting has finished. The standard _loop macro now includes a call of save_acqdev which will write MCA or image data to a file.
Currently, the roisetup macro is used to configure which MCA and image devices should be read and have data saved. Also, data will be saved as ASCII to the standard spec data file. A forthcoming spec release should include a scheme for automatically saving such data to binary files. The above macros are in the new distribution file macros/acq.mac.
New vEscan Macro For Variable-Spaced Energy Scans
A new vEscan macro for variable-spaced energy scans is included with the vscan macros. As with the other vscan macros, the start and finish arguments have an added focus argument inserted. Like the standard Escan macro, an optional fixQ argument is available to adjust the geometry motors to maintain a fixed reciprocal space position as the energy changes. See the vscan help file.
Plotting Macros Require Row-Wise Arrays
The standard plotting macros have generally only supported row-wise arrays (where rows correspond to data points and columns to the independent variables, such as motor positions, and dependent variables, such as counters). Some of the macros attempted to accommodate column-wise arrays, but probably not well. The macros now officially only support row-wise arrays. Note, though, the built-in functions, such as array_plot() and array_op(), work with either type of array.
Scan Data Array Now Zeroed At Start Of Scans
The scan_data_init() macro called at the first point of a scan now assigns SCAN_D = 0. Previously, a scan with fewer points than a prior scan but with the same number of motors and counters would contain left over data beyond the last data point from the prior scan. Note, a new SCAN_D would be and is still allocated if the number of columns changed, which happens for example, if the number of motors being scanned changes.
New Fly Scan user_flyscan_post_sweep Macro Hook
user_flyscan_post_sweep is a cdef() defined macro called just before channels are normalized (if that option is enabled) and written to the data file and screen. It would be a good place to add to SCAN_D data that depends on channel number, but is not from the MCS. It is an empty macro by default. See the flyscan help file.
Fix For splot Macro With Range Of Counters In Arguments
The feature of the splot macro where the range of y-axis counters or array columns can be specified using start:end now works as described.
Fix For Motorless Fly Scans
Updates to the fly scan macros in the previous release (associated with the feature to configure how many lines of output display on the screen for fly scans) broke the screen output for motorless fly scans. That issue is fixed.
Fix For Scan Number When No Data File
A bug introduced in spec release 6.10.06 where the scan number (SCAN_N) would be incremented twice if there was no data file (DATAFILE == "") has been fixed.
Removed Obsolete _hkl_lim From Geometry Macros
The _hkl_lim macro definition has been removed from all the geometry files, as it is no longer used with the newer array-based scanning.
FIXES
Even Better Test On RPC Library With Install
During spec installation, the Install script tests for whether libtirpc.a is required for SUN RPC function calls used by certain supported hardware. The improved test in spec release 6.10.04 looked for specific words in compiler error messages. Those words might not be present if the system language was other than English. The test has been rewritten to remove the language dependency.
Now Use Scale Factor With Normalized Counter Option
The "normalize_to_time" implementation introduced in the previous release that enabled spec to automatically normalize counters to the elapsed time did not use the counter's scale factor on the resulting value. That issue is now fixed.
Fix For Crash When Debugging TANGO Functions
When the TANGO error stack contained very long message strings (on the order of 1 Kb), the code to format messages displayed with DEBUG level 128 would result in a segmentation fault due to a buffer overrun. That issue, associated with the tango_io(), tango_get() and tango_put() functions, has been fixed.
HARDWARE
Reworked EPICS Scaler Events
The EPICS standard scaler record support has been revised to use events on the process variable VAL rather than CNT to detect when counting is finished. In some configurations, the CNT "done" event sometimes arrived before events associated with the final values of the associated counters. VAL posts after all the final counter values have posted.
Updated Defaults and Latest Firmware Recognition For Tsuji Counters
spec now recognizes Tsuji counters with firmware CT16-01F. In addition, the code now uses the most likely default values for parameters that depend on firmware version. Parameters such as the number of bits available in the counter channels, the number of bits available for the time preset and the channel used for the monitor preset vary with firmware version. However, recent models tend to use the same values. If spec doesn't recognize the firmware version, spec will default to values used by the recent models.