Beamline Instrument Software Support |
|
SPEC Macro documentation:
[ Macro Index |
BCU Home ]
|
GHSCANS.MAC | ||||||
[ source code | installed at | configured at ] | ||||||
See other macros in category: All | ||||||
Description:
| ||||||
Documentation:
Ghost scans are motor scans that don't make use of any of the resources employed by the standard spec scans. They don't write neither in the data file nor on the screen, they don't modify the variables used by the standard scans and if they plot, that is optional, they do it in a different window. The purpose behind ghost scans is to provide a method to perform motor scans during the execution of other scans without perturbing them. By using ghost scans one can trigger alignement operations when a ordinary scan is running. The typical application is to realign some critical component, like a monochromator, either periodically or when an intensity drop is detected. The scanning macros require the same parameters that the equivalent standard scans. One exception is the ghlineup macro that in addition to the parameters of the standard %dscan% macro accepts an optional threshold value. One can set other options (counters to record, plotting window, etc.) by using the ghopt and ghoptadd macros. Once some options are set in this way they affect all the following ghost scans until they are reset or modified. The available options are: One can retrieve information about the last ghost scan in the global array GHRES[]. The information that is generally available is the following: The scan data is stored in the global array GHDATA[npoints][1+ncounters]. These macros are intended to be used inside other macros and not from the command line. However they should work if used from the command line for testing purposes (see the "verbose" option). They could be also used by people who want to do some alignment without modifying the current data file. EXAMPLE | ||||||
Macros:
Usage: ghascan <motor> <star> <finish> <intervals> <time> Ghost version of ascan. ghdscan Usage: ghdscan <motor> <rel_star> <rel_finish> <intervals> <time> Ghost version of dscan. If the macro is interrupted with Ctrl-C, the motor is not moved to the initial position. The initial motor position is stored in GHRES["prev_pos"]. ghlineup Usage: ghlineup <motor> <rel_star> <rel_finish> <intervals> <time> [<threshold>] Ghost version of lineup. The scan runs as a dscan but if a peak is found when the scan is completed, the motor is moved to the peak position. The definition of the peak position can be selected with ghopt or ghoptadd among the following: If <threshold> is set to a positive value is it is interpreted as a relative value and the actual threshold is calculated as this value multiplied by the counts at the current position (the counters are run once before starting the scan). If <threshold> is a negative value, its absolute value is taken as actual threshold. If not specified, the threshold is set to zero. The macro provides information about the alignment in the global array GHRES. The following elements are available: ghopt Usage: ghopt [<option> | <option>=<value>] ... Initializes the current option set to the options in the parameter list. Previously defined options are deleted. The available options are: ghoptadd Usage: ghoptadd [<option> | <option>=<value>] ... Adds options the parameter list to the current set. ghoptremove Usage: ghoptremove [<option>] ... (Not yet implemented). | ||||||
Internal Macros: | ||||||
Usage: _ghcheck0 <motor> this is here to complie with _check0 redefinition on id28 that is used for hexapode mihexz backlash correction. _ghchkopt Usage: _ghchkopt () Checks the options in the current option set and initializes some values. _ghscan Usage: _ghscan (<motor_mne>, <start>, <finish>, <inetrvals>, <time>) The macro that does the actual scan. ghplot Usage: ghplot (<motor>, <start>, <finish>, <npts>, <label>) _ghoptadd Usage: _ghoptadd (<option_string>) Adds the options in <option_string> to the current set. gh_MIN Usage: gh_MIN gh_MAX Usage: gh_MAX gh_xMIN Usage: gh_xMIN gh_xMAX Usage: gh_xMAX gh_SUM Usage: gh_SUM gh_SUMSQ Usage: gh_SUMSQ gh_FWHM Usage: gh_FWHM gh_CFWHM Usage: gh_CFWHM gh_COM Usage: gh_COM gh_LHMX Usage: gh_LHMX gh_UHMX Usage: gh_UHMX gh_plot_res Usage: gh_plot_res(lab_len) | ||||||
|