.SYSTEM COMMAND: ls *.OMM (e.g.)
[Enter the command you want executed. This may also
be a command file.
Substitution of do-loop indices and register
contents for characters within {} is allowed anywhere in
the command line (not just in filenames). In addition
it is now possible to substitute register contents in
floating point format, see NOTE: 5 below]
NOTES
x11=34.56
VM ; To write out the following: x11 is now= 34.5600
echo x11 is now= {%F7.4%x11}
VM ; To write out the following: x11 is now= 3.4560E+01
echo x11 is now= {%ES11.4%x11}
Place the FORTRAN format within '%' symbols followed by the register whose contents are to be substituted. All of this has to be enclosed within the wavy brackets.
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-- sample loop for converting series of 1024 x 512 raw images
-- to SGI rgb format
X11 = 1024 ; nsam
X12 = 512 ; nrow
DO LB1 I=1,1 ; loop
VM ; use "imgcopy" to convert images
frombin raw{***i}.$DATEXT sgi{***i}.rgb {****x11} {***X12}
LB1 ; end loop
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
--sample loop for renaming/renumbering series of SPIDER images
X33=33
DO LB2 I=1,4 ; loop
VM ; system call for renumbering
cp jnk{***X33}.vms jnk444{***I}.vms
X33=X33+1
LB2 ; end loop
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
--sample loop for consecutively renaming/renumbering series of SPIDER
-- while skipping any missing image numbers
X11=0 ; initialize output file number counter
DO LB3 I=1,4 ; loop
FI N ; use "FI N" to see if file exists
jnk{***I} ; filename
IF(X2.LE.0)GOTO LB3 ; skip if file not found
X11=X11+1 ; increment output file number counter
VM ; system call for renaming/renumbering SPIDER images
cp jnk{***I}.vms jnk444{***X11}.vms
LB3 ; end loop
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
--Sample showing symbolic parameter substitution within
a procedure
X11=55 ; set register 11 outside of procedure
; (binding time for parameter substitution is
; before procedure is executed!)
@testvm ; invoke <I>testvm</I> SPIDER procedure
doc ; value given to FILENAME PATTERN solicited
; in <I>testvm</I> procedure
Contents of invoked procedure <I>testvm</I>:
FR
?ENTER FILENAME PATTERN?<1>
VM
rm <1>{***X11}.$DATEXT
Result of invoked procedure:
rm doc055.DAT
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
© Copyright Notice / Enquiries: spider@wadsworth.org