; SOURCE: dage2spi.tom ; ; PURPOSE: Converts 900x900 Dage images to SPIDER format. ; The film should be scanned with the long axis horizontal. ; Corrects images to make the pixels square. ; Windows & pads images to square. ; (The images must be square for double tilt.) ; Rotates images 90 degrees to make the tilt axis vertical. x22 = 122 ; Number of tilt images ; ----------------------- Input files --------------------------- FR G [input]rawinput/raw_*** ; Image filename template ; ---------------------- Output files ---------------------------- FR G [output]rotated/rot_*** ; Rotated windowed output file template ; ----------------- END BATCH HEADER ---------------------------- ; For 900x900 Dage scanned images x30 = 900 ; Input size x31 = 1014 ; Window size X x32 = 1014 ; Window size Y x33 = 5 ; Window left border x34 = 5 ; Window right border x35 = ; Output image size DO LB1 x11=1,x22 CP FROM RAW ; Convert to SPIDER format (8) ; 8 Bits input file format [input]x11 ; Raw input images filename (input) (x30,x30) ; Raw image size (0 ) ; Header offset _1 ; Temp. file (output) x23=x30*1.0144427 ; Compute DAGE pixel squaring transformation x24=x30/1.0144427 IP ; Interpolate to square pixels _1 ; SPIDER file (input) _2 ; Interpolated file (output) (x23,x24) ; Square pixel size WI ; Window image _2 ; Interpolated file (input) _1 ; Interpolated, windowed file (output) (x30,x24) ; Output size (1,1) ; Cut off margin PD ; Pad image _1 ; Interpolated, windowed file (input) _2 ; Padded, interpolated, windowed file (output) (x30,x30) ; Output size Y ; Border is image average (1,1) ; Padded image location RT 90 ; Rotate 90 degress to align tilt axis _2 ; Temp. file (input) [output]x11 ; Rotated windowed file (output) ; All columns ; All rows ; All slices (1) Z ; Rotation axis (90) ; 90 degrees LB1 DE _1 DE _2 EN