Apply Alignments
- first the alignments found must be converted from local (image to image) to global (overall)
- use xftoxg
> xftoxg rawstack.xf rawstack.xg
- next use newstack to apply these alignments
>newstack -xform rawstack.xg rawstack.mrc alstack.mrc
For data collected at a non-orthogonal viewing angle (e.g. 38 degrees), use -n 0 option to eliminate sample drift
- afterwards, view the beginning and the end of the file to determine how much padding will need to be added in y to allow for drift
> xftoxg -n 0 rawstack.xf rawstack.xg
- Use newstack to apply these alignments, with final size adjustment due to shifting of images
- Example: if top image has shift of -400, and bottom image has shift +400, need to adjust y-size by 800. 3536 + 800 = 4336
>newstack -size 4096,4336 -xform rawstack.xg rawstack.mrc alstack.mrc
- other options are to invert the contrast at this point, though generally images are collected with contrast inverted
Manual alignment using MIDAS
> midas rawstack.mrc rawstack.xf
- In midas find slice and move, save as rawstack.xfm
> xftoxg -n 0 rawstack.xfm rawstack.xgm
- for data collected at 38 degree converted from local (image to image) to global (overall) alignment
Squeeze Volume
- Images taken at non-orthogonal viewing angle will have non-equal x and y pixels
- Specifically, -38 degrees imaging angle corresponds to y-pixel = x-pixel/(cos 38) = 1.269 * y-pixel
- Use squeezevol to stretch y-pixels
> squeezevol -e 1 -x 1 -y 0.788 -z 1 stack1m_al.mrc stack1_alsq.mrc
- Note that z-pixel size will still likely be different
Shrink Volume
- Final step is often to shrink by a factor of 2, to make data easier to handle and because full (2-pixel) resolution may not have been obtained
- -shrink option in newstack does this well, using filter to avoid artifact effects
> newstack -shrink 2 stack1_alsq.mrc stack1_alsqsh.mrc
Crop volume
- Top or bottom of image may contain no data
- to remove use the resize process in clip
- following example resizes in y using an different output y size (oy) and a defined center (cy)
> clip resize -oy 660 -cy 330 40_cell1_sm.mrc 40_cell1_sm_clipped.mrc
Montaging
- Montage pairs can be collected
- Save each set to a separate stack
- Align each stack individually
- After aligning, interleave stacks with script interleave.pl
- the leftmost image must be the SECOND stack (so out stack will be R1,L1,R2,L2,...)
- Determine alignment by cc:
- make newtsacks by selecting 600 pixels ov overlapping edges from each stack
- shrink stacks by factor of 2
- get edges
newstack -size 600,1768 -offset -800,0 stack1malsh0.mrc s1.mrc
newstack -size 600,1768 -offset 800,0 stack2malsh0.mrc s2.mrc
- interleave stacks into a third stack
- get alignments of pairs:
xfalign -reduce 1 -params 2 -bilinear -bpair s3.mrc s3.xf
- xfalign may not work well; use midas to check (or do it all in midas)
midas s3.mrc s3.xf
- With above params, assuming stack is 2048 pixels across, 800 will needed to be added to the offsets in the output
- combinemrc.pl will apply these alignments to make a new stack
- Use the original 2 stacks as input, the xf file as xf file, and 800 as the offset when prompted
- For adding noise to blank regions, box out a cube of pure noise and determine the stats on it with header or equivalent
Vertical Montaging
- Some sets also have a third or fourth image
- Join the top 2 images as described above
- If there are 2 images on the bottom, join them as well
- for the protocol, call the top stack "top.mrc" and the bottom "bottom.mrc"
step 1: get a rough alignment
- Get the first dozen or so images from each stack and interleave them:
newstack -secs 0-11 top.mrc top12.mrc
newstack -secs 0-11 bottom.mrc bottom12.mrc
/cryoem/script/interleave.pl top11.mrc bottom11.mrc il11.mrc
- Manually determine a rough alignment using midas:
midas il11.mrc il11.xf
- Using this initial alignment, make a full initial alignment for all sections:
/cryoem/script/make_init_xf.pl
---+++ step 2: get a full alignment
- interleave the full stacks
/cryoem/script/interleave.pl top.mrc bottom.mrc il_full.mrc
- Align using xfalign starting with roughly determined alignments
- options to try: -reduce 1 ; -bilinear
xfalign -initial initial.xf -bpair -params 2 -bilinear il_full.mrc il_full.xf
- test the alignment on the first severa sections to see if it is good and if mag needs adjustment
- first,apply it to a subset, then check in midas
newstack -secs 0-23 -xform il_full.xf il_full.mrc il_full_ali.mrc
midas il_full_ali.mrc
Step 3: magnification correction
- if the images align but then differ towards edge, mag of bottom image needs adjustment
- first, image the aligned interleaved stack with 3dmod and determine the x and y ranges which cover the overlap
- next, make a full interlevaed file and box out the overalpping areas
newstack -xform il_full.xf il_full.mrc il_full_ali.mrc
clip resize -x N,N -y N,N full_ali.mrc full_overlap.mrc
Handedness
- In the above scheme, the first image is the "top" of the physical sample, but it is located at the bottom of the stack
- MRC convention: the first Z slice in a stack is the bottom slice
- Therefore the stacks must be swapped in one dimension to preserve correct chirality
- following will reverse the Z-order of stacks:
clip flipz stack_al.mrc stack_al_flipped.mrc
- This can also be done in Amira by using the cropping tool
Curtain Removal
- Curtaining seems to be caused by surface damage, or milling a rough surface
- Best way is to prevent them from happening at all by minimizing viewing with ion-beam, particularly at high current (>80 pA)
- Also pre-coat with Pt using e-beam, then coat with ion beam at minimum reasonable current (>10 min per area)
To remove using ImageJ?:
- Manually design a filter
- Do FFT of a sample image in stack
- In FFT, box out small rectangles along middle of image
- Example: FFT is 2048x2048: box out x-sixe=374, y-size= 14; xcenter = 1116 or 578; ycenter=1016
- Need to box both sides
- For each box, choose to Fill with black
- Do inverse FFT
- Should see reduction in curtains. Will need to play with size and positioning to optimize curtain removal and minimize artifacts
- Make the filter
- Make a new blank image: 8 bit; white background. Size should be 2Kx2K (all dimensions <2K pixels)or 4K x 4K (if any dimension > 2K pixels)
- Mark out same boxes as above. If scale doubled, adjust accordingly
- Save as Filter.tif * sample decurtaining filter:
- Apply Filter:
- Choosr Proxess -> FFT --> Cursotm filter
- Choose Ffilter.tif as input
- BUG: Choose to process entire stack. Only one image is processed. Then choose again, deselect entire stack. Entire stack will be processed
- NOTE: top and bottom edges will not be filtered, so it is best to do this on an uncropped image
-- BillRice - 20 Nov 2012 |