SUB - Subtract images/volumes

(11/02/12)

PURPOSE

Subtracts one or more images or volumes from first input iamge. All inputs must have same dimensions.   Example.

SEE ALSO

SUB 2 [Pairwise subtract series of real or complex images]
ADD [Add images]
AR [Arithmetic operation]

USAGE

.OPERATION: SUB

.INPUT FILE: PIC001
[Enter the name of the file from which the following files are to be subtracted. (Header positions from this file are transferred to output.)]

.SUBTRACTED FILE: PIC002
[Enter the name of the file to be subtracted from the first file. Can be same as the first input file.]

.OUTPUT FILE: PIC999
[Enter the name of the output file. Can be same as either input file.]

SPIDER will ask:

.SUBTRACTED FILE: PIC003
[Enter a '*' if no more subtractions are desired.]

[PIC002 is subtracted from PIC001, and the result is kept in PIC999. PIC003 is then subtracted from the new PIC001, and the result is again put into PIC999.]

NOTES

  1. If multiple 'SUBTRACTED FILES' (e.g. PIC002, PIC003, PIC004...) are used the final output corresponds to serial subtraction: PIC999 = PIC001 - PIC002 - PIC003 - PIC004 ...

  2. To subtract a series of images within a procedure you can use the following set of operations:
     
     [num] = 1 
     CP                ; Create constant value file 
       inp{***[num]}   ; First  file                 (input) 
       out999          ; File name                 (output) 
     DO  [num]=2,4     ; Creates running subtraction 
       SUB             ; Add files operation  
         out999        ; First  file               (input)  
         inp{***[num]} ; Second file               (input) 
         out999        ; Resulting file            (output) 
         *             ; Put asterick here  
     ENDDO 
    

SUBROUTINES

ADD

CALLER

UTIL2