LI PIC00I 1-5
[Enter the batch runstream.]
LB25 [Enter the label that corresponds to the label in the DO statement.]
The syntax of the DO loop is as follows: DO LB<N> <VAR>=<LOWER>,<UPPER>
LB<N>
Where: 1. N is an integer between 0 and 99 which identifies the label of the DO loop. 2. VAR is the corresponding one-letter variable of the DO loop. (Any letter of the alphabet may be used, unless you plan to use the 'SD' or 'UD' operations, in which case "X" may not be used.) 3. LOWER is a constant that specifies the lower bound of the DO loop, between 1 and 99999. 4. UPPER is a constant that specifies the upper bound of the DO loop, between 1 and 99999.
In the above example, DO will list out to the results file the first 5 rows of the files PIC005 through PIC017.
Note that nesting of DO loops is allowed. For example: DO LB1 I=2,3
DO LB2 J=9,11
LB2
LB1 will perform the operations within the LB2 loop 6 times, and the operations within the LB1 loop 2 times.
Variable Value Input In DO-Loops:
NOTE: IF THIS FEATURE IS NOT TO BE USED, THEN (almost) ALL INPUT VALUES TO EACH OPERATION ARE TO BE ENCLOSED IN PARENTHESES. (exemptions are those operations that ask for a sequence of possibly more than 2 numbers like 'MN' which asks: .ENTER FILE NUMBERS: 1-3,5,8,10 internally in SPIDER the subroutine RDPRAI is used, whereas for single and two-variable input RDPRM,RDPRM2, and RDPRMI are used, which look for parentheses.
The same sequence of operations can be applied with different parameter values to the same image.
For variable parameter input values may be entered in sequence, to be picked according to the DO-loop count. Example:
DO LB1 I=1,3 SH PIC00I OUT00I 4., 5., 2.3, 1.2, -7.1, 8.2 LB1
In this example, 'SH' uses the shift vector (4.,5.) with the picture PIC001, (2.3,1.2) with PIC002, and (-7.1,8.2) with PIC003.
In the case of operations requiring a pair of numbers (e.g., shift coordinates), one pair has to be provided for each run of the DO-loop. However, if the same floating point number or pair of numbers should be used for each run of the DO-loop, this may be specified by using a single number (or pair of numbers) enclosed in parentheses. Example:
DO LB7 I=5,9 SH ALL00I SHI00I (15,8) LB7
In this case, the shift parameter values 15,8 are applied to each image, starting with ALL005 and ending with ALL009.
NOTES