Picking power score definition?

Hi,

Basic/naive question, apologies, but how is the local power score defined, precisely?

In the guide, it is stated:

“The power score is a measure of pixel intensity at a particular location; the value is equal to the squared amplitude of the signal, after background subtraction.”

Presumably in the case of blob picker, the location is the center of the box; but is there some radius within which the signal is measured, and outside of which the background is defined? Is this set by the particle diameter used in picking?

Cheers
Oli

Hi @olibclarke!

The blob picker calculates the power score (squared background-subtracted amplitude) at each pixel, so in a sense they are calculated at the center of what eventually becomes a box, as you say.

The background is defined by the windowing applied to the templates. This windowing is the same across all templates in a given Blob Picking job and is based on the maximum particle diameter.

I hope that’s helpful!

1 Like

That is very helpful, thanks Rich! What defines the background radius out of interest? A circle 20% larger than the window radius? Or is the background calculated per micrograph?

Just to understand a bit further @rposert - the power score is calculated at each pixel, then averaged within the circle defined by the particle diameter, is that right?

So that means even if two particles have different maximum power on a per pixel level, as long as it averages to the same value across the particle, they will have the same power? E.g. these two classes have particles with roughly the same power:

Is there any way then to access the maximum power, as opposed to the mean power value? This would be useful I think in conjunction with Subset by Statistics for removing small, high contrast contaminants, like gold particles, prior to 2D classification.

EDIT:
Final (I promise!) related question - is there a measure of the background variance, and/or the absolute background level? I am assuming the background is calculated per particle? This could be helpful for reducing picks on aggregated/crowded regions.

Hi @olibclarke, good questions!

Here’s a more formal, thorough explanation of how we calculate the power score. First, let’s set up a few things:

  • First, take the background-subtracted micrograph and square its values. The background estimation is performed during Patch Motion Correction. For convenience, I will call this squared, background-subtracted micrograph the “intensity micrograph”.
  • Create a soft, circular mask. The inner radius is the minimum particle diameter, the outer radius is the maximum particle diameter.

Now, to calculate the power score for a given pixel (that is, a potential pick location) we calculate the sum of the pixel values in the intensity micrograph centered at the given pixel, weighted by the mask.

With that out of the way:

What defines the background radius out of interest? A circle 20% larger than the window radius? Or is the background calculated per micrograph?

I think I confused things a bit in my first post, apologies. The background is the background estimated during Patch Motion Correction. So yes, it’s calculatd per micrograph.

the power score is calculated at each pixel, then averaged within the circle defined by the particle diameter, is that right?

Yes, the power score is calculated at each pixel. Since the score is a (weighted) sum of nearby values, it behaves a bit like an average, but formally it is just a sum as described above.

So that means even if two particles have different maximum power on a per pixel level, as long as it averages to the same value across the particle, they will have the same power? E.g. these two classes have particles with roughly the same power

is there a measure of the background variance, and/or the absolute background level? I am assuming the background is calculated per particle? This could be helpful for reducing picks on aggregated/crowded regions.

Yes, an image with 100 pixels of intensity 1 and an image with 10 pixels of intensity 10 will have the same power score. We do not currently record the per-particle “max power score”, nor do we record the per-particle background.

If you were interested in finding these numbers, you could, with cs-tools, calculate:

  • the per-particle max power by performing the power score calculation described above, centered at the particle’s pick position, but instead of a weighted sum simply take the maximum
  • the per-particle background by extracting the value at the correct pixel of the background micrograph. You can find the path for a particle’s background MRC in the background_blob/path field.

Note that the background MRC is binned by the value found in background_blob/binfactor and is padded to be square. You can use the trimarray function to undo this padding, and you can find the micrograph’s original (not square, but also not binned) size in background_blob/shape.

I know that’s a lot of detail, but I hope that answers your questions!

2 Likes

That is very helpful, thanks so much Rich!!

If I calculate a new derived per particle parameter - e.g. max power score - is there a simple way to write it out in a format that can then be read by subset by statistic? Presumably just adding it in a new custom field in the particles.cs file will do the trick?

I think I confused things a bit in my first post, apologies. The background is the background estimated during Patch Motion Correction. So yes, it’s calculatd per micrograph.

So that I understand this correctly - it is calculated per micrograph, but in a per pixel manner, as recorded in the background.mrc, is that right?

Hi @olibclarke!

If you calculate a new derived per particle parameter and want to use subset by statistics, you’ll have to write it into one of the fields already included in the drop down menu (ie overwriting the values of alignments2D/error with your custom values).

Yes, that is correct!
– Katherine

1 Like

Just one (maybe obvious) note here - this applies to the raw power scores, but by default the power scores visualized in Inspect Picks are calibrated to defocus - meaning that one can end up with negative power scores, which puzzled me for a second!