Skip to content

Manipulating images

Michael A. Cianfrocco edited this page Jun 7, 2018 · 1 revision

The following commands assuming you have an imagic stack.

  1. [Binning particles in a stack] (https://github.com/temproconsulting/Manual-processing/wiki/Manipulating-images#binning)

  2. [Change box size of particles in a stack] (https://github.com/temproconsulting/Manual-processing/wiki/Manipulating-images#changing-box-size)

  3. [Normalizing a particle stack] (https://github.com/temproconsulting/Manual-processing/wiki/Manipulating-images#normalization)

  4. [Filtering a particle stack] (https://github.com/temproconsulting/Manual-processing/wiki/Manipulating-images#filtering)

  5. [Applying a circular mask to the particles] (https://github.com/temproconsulting/Manual-processing/wiki/Manipulating-images#applying-a-circular-mask)

  6. [Remove 'bad' particles from a stack] (https://github.com/temproconsulting/3D-refinement/wiki/Random-Conical-Tilt#extract-particles--edit-particle-stacks)

Binning

Use the meanshrink option with proc2d. Works with factors of 2 binning.

Example

proc2d input.img output.img meanshrink=2
  • meanshrink=2 Bins stack by a factor of 2

Changing box size

Use the clip=[x],[y] command to make a window around a particle stack smaller.

(Side note: If you want to increase the window size of your particles, you should re-extract your particles from the micrographs with a larger box inside. If you were to use the following method by indicating a larger box size than the input stack, you will get particles that have 0's around the edge of the image.)

Example

proc2d input.img output.img clip=128,128
  • clip=128,128 Windows stack to a box size of 128x128

Normalization

Normalize particle stack to an average value of 0 and a standard deviation of 1:

proc2d input.img output.img norm=0,1

Filtering

Filter IMAGIC particle stack using a low pass filter of 10 and a high pass filter of 500 with a pixel size of 4.3 A/pix:

proc2d input.img output.img apix=4.3 lp=10 hp=500

Low pass filtering SPIDER particle stack using a low pass filter of 20:

$ spider spi @lowpass_filter_stack                                                                                                                                                  
 .?Input stack?: start
 .?Number of particles?: 2000
 .?Pixel size (A/pix)?: 3.1
 .?Input resolution to which the particles will be filtered?: 20

High & Low pass filtering stack while also applying a soft circular mask around particles:

$ /path/to/Manual-Processing/prep_stack_for_2DAlignment.py -i stack_00_sel.img --num=562 --apix=4 --lp=15 --hp=250 --mask=60
  • stack.img - input imagic stack
  • stack_prep.img - output imagic stack, filtered and masked
  • apix=4 - pixel size of images (4 A/ pix in this example)
  • hp=250 - high pass filter (Angstroms)
  • lp=15 - low pass filter (Angstroms)
  • mask=60 - circular mask applied to particles (pixel radius)

Applying a circular mask

Mask particle stack using a mask with a radius of 50 pixels:

proc2d input.img output.img mask=60
Clone this wiki locally