CG - Center of Gravity

(5/04/13)

PURPOSE

Compute coordinates of center of gravity of an image/volume with respect to the SPIDER image/volume center: (NX/2 + 1, NY/2 + 1, NZ/2 + 1). Also computes radius of gyration for volumes.   Example.

SEE ALSO

CG PH [Center of Gravity - Phase approximation ||]
CENT PH [Center image/volume using phase approximation]
SH [Shift - using bilinear/trilinear interpolation ||]

USAGE

.OPERATION: CG [x],[y],[z],[rg]

[This operation can return up to 4 optional register variables:

Variable Example Receives
First [x] Sub-pixel X center of gravity relative to center
Second [y] Sub-pixel Y center of gravity relative to center

Third (Volumes only) [z] Sub-pixel Z center of gravity relative to center

Fourth (Volumes only) [rg] Radius of gyration

.INPUT FILE: PIC001
[Enter name of image/volume.]

.THRESHOLD: 0.23
[Only data above this threshold will be used in computation.]

NOTES

  1. The center of gravity determination is very poor with typical high noise cryo-em particle images without an appropriate threshold. This threshold is hard to determine apriori. Try 'CG PH' for such images, but even that alternative central measure may have problems. ]

  2. For definition of the radius of gyration, see: International Tables of Crystallography, vol. III, p327.

  3. COG Algorithm (1D analog): Sum product of all pixel values by their position, Then divide by sum of all pixel values.

  4. USAGE EXAMPLE: To shift an image to its center of gravity computed for a threshold of T=0.23, one could use the following operation sequence:

    CG [x],[y]
      PIC001
      .23

    SH
      PIC001
      SHI001
      -[x], -[y]

SUBROUTINES

CENGR3

CALLER

UTIL1