The Q Scan Menu

Q scans are invoked by:
ONLINE> scan/q

These are the qualifiers for the SCAN/Q command.

 /_auto_return
/display
/execute
/generic_macro_name, alias: /gmn
/generic_macro_name_gra, alias: /gmng
/noalpha
/notext
/nocls
/_ssa
/_ssa_nbs=0_or_1 (if 1, selects 'no-background-subtraction')
/update_cycle = n_up
The qualifiers are already known from general scans. See section [*] for a descritption.

 /_param
This qualifier overwrites the UB queue element item param, which is used for the fixed-phi, fixed-phi and fixed-(omega-two_theta/2) modes.

 /_auto_filter
/_sample_time, alias: /_st
/_scan_name
/_start_h
/_start_k
/_start_l
/_stop_h
/_stop_k
/_stop_l
The initial values of the scan parameters. They are described below.

The menu is displayed in table 8.2


Table 8.2: The Q Scan Menu
 

                            ----- Q Scan -----
   SPECTRA>  |                                                            |
   A-Move            h:             k:                 l:
-------------------------------------------------------------------------------
   Position:        -7.1842        0.9079             1.6045
   Start:           -7.1842        0.9079             1.6045
   Stop:            -7.1842        0.9079             1.6045
-------------------------------------------------------------------------------
   N_Points:        100            Sample_time:       1
   SSA:             YES
   Auto-return:     (1) YES        Auto Filter        NO
   Scan mode:       Bisecting      Param.  :          0
-------------------------------------------------------------------------------
   Scan_Name:
   Generic Scan Name:
   Comment:
-------------------------------------------------------------------------------
   Edit com-files
    <~.prog>before_xps_w1_q.gra                                       NO
    <~.prog>during_xps_w1_q.gra                                       NO
    <~.prog>after_xps_w1_q.gra                                        NO

-------------------------------------------------------------------------------
 PF1 - Start Scan, PF2 - Continue scan, PF4 - EXIT, Space bar to stop move


ONLINE searches for the GQE UB_MATRIX for the transformation to q space.

The explanations of the menu item:

 h , k , l
Input fields for a movement. It is started by pressing the <ret> key.

 start_h, start_k, start_l
The starting point of the q scan, the default is the current position, the translations of start_$i$ ($i=h,k,l$) or the qualifiers /_start_$i$.

START_Q$i$ is created when the scanning routine is exited.

 stop_h, stop_k, stop_l
The end point of the q scan, the default is the current position, the translation of stop_$i$ ($i=h,k,l$) or the qualifiers /_stop_$i$.

 n_points
The number of points per scan. The default is 100, the translation of n_points_q or the qualifier /_n_points.

 ssa
A flag that determines whether or not a simple scan analysis is performed automatically. SSA is done before after_q_scan.gra is called. The default is 0, the translation of ssa_q or the qualifier /_ssa. The user may specify that there is no background subtraction by issuing the /_ssa_nbs=1 qualifier.

 sample_time
The sample time can be used in during_q_scan. The default is 1, the translation of sample_time_q or the qualifier /_sample_time.

 auto_return
If this flag is set, ONLINE moves the motors after the scan back to their initial positions. The default is 1, the translation of auto_return_q of the qualifier /_auto_return. If the flag is set to 2, 3 or 4 and SSA completed successfully, the motors are moved to the MIDPOINT, the CMS or the peak.

If AUTO_RETURN is set to 5, the motors return to the start-of-scan values.

 auto_filter
If this flag is set, there will be an automatic attenuation of the beam. The routine that adjusts the absorber uses the symbol signal as the input and moves the motor diff_absorber (not all beamlines need definitions of diff_absorber, e.g.: E2), if it is necessary: If the current signal is above filter_max, it increases the current absorber position by filter_delta. Likewise, if the signal is below filter_min the absorber position is reduced by filter_delta. The default is 0, the translation of auto_filter_q or the qualifier /_auto_filter.

 Scan mode
This is an item from the UB matrix. It can have the values "Bisecting", "Const. plane", "Fixed PSI" “Fixed Phi” or “Fixed Om2” (omega-two_theta/2).

 Param.
The value that is used for the "Fixed Psi", “Fixed Phi” or “Fixed Om2” mode.

 Scan_name
The scan name. ONLINE creates this scan, clears it. The x-values run from 0 to 1. The default scan name is scan_name_q or the the qualifier /_scan_name. If the scan name is empty when the scan starts, ONLINE chooses scan_q_date_time.

 Comment
A comment line. It is copied to the first comment line of scan_name.

 before_q_scan
The command file which is executed before a scan is started. The default name is the translation of before_q_scan or before_q_scan.gra.

 during_q_scan
The command file that is executed at every stop. It contains a list of commands that is read once for each scan. Statement blocks (if, for, case) are not allowed in this file in order to save CPU time. If such constructs cannot be avoided, during_q_scan must call a file with a run command. Note that there is a single line if-statement. This may appear in during_q_scan.

during_type_scan may set the symbol interrupt_scan to tell online to interrupt the scan.

The default name is the translation of during_q_scan or during_q_scan.gra.

 after_q_scan
The command file which is executed after a scan is finished. after_q_scan may use the symbol interrupt_scan to decide whether the scan has come to a normal end or not. The default name is the translation of after_q_scan or after_q_scan.gra.

A scan is started by pressing PF1. A scan that has been interrupted can be continued with PF2. PF4 or Ctrl-X exit the scan menu. Supplying PF$i$ in the command line has the same effect as pressing the corresponding key.

The following symbols are created by the scan routine in order to have them available in the command files:

 auto_filter
current_qx, current_qy, current_qz
n_points_q
psi_q
q_scan
sample_time_q
scan_name
scan_type
sindex
The current number of stops. The symbol sindex is created after before_type_scan has been called.
 ssa_q
start_qx, start_qy, start_qz
stop_qx, stop_qy, stop_qz

An example for a Q scan, including a complete set of macros, can be found in 15.7.