; ; mkstack : make a stack for selected particles from each micrograph ; ; ----------- Input files -------------- FR G [FILENUMS]../filenums ; micrograph numbers FR G [good]good/ngood{****x12} ; doc files specifying selected particles FR G [ser]win/ser{******x55} ; particle images ; ----------- Output files -------------- FR G [stk]stk{****x12}@{****x14} ; output stack, one for each micrograph ; -------------- END BATCH HEADER -------------------------- UD N,x20 ; number of micrographs [FILENUMS] DO LB1 x11=1,x20 ; loop over micrographs ud x11,x12 [FILENUMS] ; x12 = micrograph number VM echo processing micrograph {***x12} UD N,x30 ; x30 number of particles for this micrograph [good] x14 = 1 ; counter for stack index DO LB2 x13 = 1,x30 ; loop over particles UD IC, x13,x55 ; get particle number in x55 [good] CP ; copy it to the stack, at index x14 [ser] [stk] x14 = x14 + 1 ; increment the stack index LB2 UD ICE [good] LB1 EN D