Differences between revisions 2 and 8 (spanning 6 versions)
Revision 2 as of 2010-01-06 21:38:22
Size: 734
Editor: SteveLudtke
Comment:
Revision 8 as of 2010-09-09 14:09:58
Size: 2515
Editor: SteveLudtke
Comment:
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:

''For those who don't like to read, here is the list of good box sizes:''

32, 33, 36, 40, 42, 44, 48, 50, 52, 54, 56, 60, 64, 66, 70, 72, 81, 84, 96, 98, 100, 104, 105, 112, 120, 128

130, 132, 140, 150, 154, 168, 180, 182, 192, 196, 208, 210, 220, 224, 240, 250, 256

260, 288, 300, 330, 352, 360, 384, 416, 440, 448, 450, 480, 512
----
Line 3: Line 13:

Please also remember that for accurate CTF correction, the box size should be 1.5 - 2x the largest dimension of your particle.
Line 8: Line 20:
[[attachment:rel_time.jpg|]] Clearly there are some good box sizes, and some very bad box sizes.

A better way to plot this is with respect to anticipated speed for an N^2 algorithm. This is the reciprocal of the same plot divided by box size squared,
normalized so 512 is 1. That is, larger values indicate better relative speeds. Of course, 103 is still faster than 512, but if you look in a local neighborhood
for a peak, that will correspond to a good box size to use.

{{attachment:rel_speed.jpg}}

Of course, that plot is very difficult to read actual values off of. The original timing data can be downloaded as [[attachment:profile.txt]]

From this plot, we can compute when using a larger box-size is better. ie - if you have a box size of 482, your refinement would actually run faster with a box
size of 512, even though it's larger. So, when picking a box size, you can optimize your speed by rounding up to a value from this list :

32, 33, 36, 40, 42, 44, 48, 50, 52, 54, 56, 60, 64, 66, 70, 72, 81, 84, 96, 98, 100, 104, 105, 112, 120, 128, 130, 132, 140, 150, 154, 168, 180, 182, 192, 196, 208, 210, 220, 224, 240, 250, 256, 260, 288, 300, 330, 352, 360, 384, 416, 440, 448, 450, 480, 512

Also note that if you are using shrink= it's a good idea to also confirm that your box size divided by the shrink value is in this list.

Particle Box Size and Speed

For those who don't like to read, here is the list of good box sizes:

32, 33, 36, 40, 42, 44, 48, 50, 52, 54, 56, 60, 64, 66, 70, 72, 81, 84, 96, 98, 100, 104, 105, 112, 120, 128

130, 132, 140, 150, 154, 168, 180, 182, 192, 196, 208, 210, 220, 224, 240, 250, 256

260, 288, 300, 330, 352, 360, 384, 416, 440, 448, 450, 480, 512


Various algorithms in EMAN2 will depend non-linearly on the box size of the particle. Sometimes (such as the case with FFTs), this behavior will appear bizzare. For example refinements with a box size of 45 pixels will run roughly twice as fast as those with a box size of 47, and 44 is about 20% faster than 45.

Please also remember that for accurate CTF correction, the box size should be 1.5 - 2x the largest dimension of your particle.

The following plot shows how long it takes to compute one similarity matrix element for a noisy particle aligned to a noise-free reference with the rotate-translate-flip aligner, refine alignment enabled with the dot comparator, and a phase residual for a similarity metric. ie - typical options for a real refinement:

rel_time.jpg

Clearly there are some good box sizes, and some very bad box sizes.

A better way to plot this is with respect to anticipated speed for an N^2 algorithm. This is the reciprocal of the same plot divided by box size squared, normalized so 512 is 1. That is, larger values indicate better relative speeds. Of course, 103 is still faster than 512, but if you look in a local neighborhood for a peak, that will correspond to a good box size to use.

Of course, that plot is very difficult to read actual values off of. The original timing data can be downloaded as profile.txt

From this plot, we can compute when using a larger box-size is better. ie - if you have a box size of 482, your refinement would actually run faster with a box size of 512, even though it's larger. So, when picking a box size, you can optimize your speed by rounding up to a value from this list :

32, 33, 36, 40, 42, 44, 48, 50, 52, 54, 56, 60, 64, 66, 70, 72, 81, 84, 96, 98, 100, 104, 105, 112, 120, 128, 130, 132, 140, 150, 154, 168, 180, 182, 192, 196, 208, 210, 220, 224, 240, 250, 256, 260, 288, 300, 330, 352, 360, 384, 416, 440, 448, 450, 480, 512

Also note that if you are using shrink= it's a good idea to also confirm that your box size divided by the shrink value is in this list.

EMAN2/BoxSize (last edited 2021-10-15 17:30:25 by SteveLudtke)