([r2],[alignsh],[prj-radius]) ; Shows aligment radius on central slice of volume
 ;
 ; SOURCE:  refine-show-r2.spi
 ;                                          
 ; PURPOSE: Shows aligment radius on central slice of volume.
 ; 
 ; USAGE:   spider spi/dat @refine-show-r2 
 ;
 ; I/O PARAMETERS AND FILES ARE SET HERE:
 ;
 ; Input Variables   -------------------------------------
 ;
 ; [r2]            ; Aligment radius 
 ; [alignsh]       ; Alignment shift
 ; [prj-radius]    ; Projection radius
 ;
 ; ------------------ Input files -------------------------------------

 ; [invol]    = Read input volume name from caller, e.g.: 'final/vol_02_all'  

 ; ---------------  Output files  -------------------------------------

 [centout]  = '[invol]_cent_slice'   ; Annotated central slice from volume

 ; -------------- END BATCH HEADER ------------------------------
 
 FR                : Read input volume name from caller, e.g.: 'final/vol_02_all'
   ?Input volume? [invol]       

  ; Find location of central slice in volume
 FI CEN [xc],[yc],[zc]  
   [invol]         ; Volume file    (input)

 ; Extract central slice from volume
 PS Z              ; Pick central slice
   [invol]         ; Volume file   (input)
   [centout]       ; Central Image (output)
   [zc]            ; Slice

 !SYS
 !  echo "  Alignment radius: {%f6.1%[r2]} Shift: {%f6.1%[alignsh]}" ; echo

 [r2sh] = [r2] + [alignsh]   ; Add the alignment shift

 PT                ; Create Pattern or Mask File
   [centout]       ; Image file    (input/output)
   CLS             ; Outlined circle
   [xc],[yc]       ; Center
   [r2]            ; Radius
   Yes             ; Make another object?
   CLS             ; Outlined circle
   [xc],[yc]       ; Center
   [r2sh]          ; Radius
   Yes             ; Make another object?
   CLS             ; Outlined circle
   [xc],[yc]       ; Center
   [prj-radius]    ; Radius
   No              ; Make another object?

 ; Display filtered central image slice
 CP TO JPG         ; Copy to JPEG and display
   [centout]       ; Image file    (input)
   [centout]       ; JPEG Image    (invol)
 SYS
   display [centout].jpg  &

 SYS
   echo   

 RE
 ;