Project

General

Profile

Actions

Bug #5133

open

picks not centered

Added by Scott Stagg over 7 years ago. Updated over 7 years ago.

Status:
In Code Review
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
08/07/2017
Due date:
% Done:

0%

Estimated time:
Affected Version:
Appion/Leginon 3.2
Show in known bugs:
No
Workaround:

Description

We have having an issue where our template-based picks are systematically off center. It is particularly apparent when making a stack as the summary average is off center. Is anyone else having these problems? We are seeing it in multiple different sessions with multiple different users. We're on myami trunk.


Files

average.png (10.1 KB) average.png Scott Stagg, 08/07/2017 03:33 PM

Related issues 2 (2 open0 closed)

Related to Appion - Bug #6530: Particle picks off center with K3 New01/11/2019

Actions
Related to Appion - Bug #4904: FindEM produces artifacts when image dimensions have a large prime factorIn TestBridget Carragher04/14/2017

Actions
Actions #1

Updated by Neil Voss over 7 years ago

It is probably related to my fix for #4904.

If this is the case then, you should only see problems on micrographs with weird dimensions. True 4k and 8k images would not have a centering problem.

Actions #2

Updated by Scott Stagg over 7 years ago

Our images are true 8K images, 8192 x 8192

Actions #3

Updated by Neil Voss over 7 years ago

Hmm, then the image size should not be changed by the script.

Is this happening only from FindEM or other particle pickers (DoG) as well?

Actions #4

Updated by Scott Stagg over 7 years ago

Just FindEM. DoG is fine.

Actions #5

Updated by Thomas Klose over 7 years ago

I was looking into the same issue, although in our case the images are from a K2. Removing the fix for #4904 solves the problem for us, but is probably not a good long-term solution.

Actions #6

Updated by Scott Stagg over 7 years ago

The plot thickens. Here is a line from a template correlator run:

trimming image from 1024x1024 to 1020x1020 for findem

Looks like that script needs an if statement to prevent the trimming.

Actions #7

Updated by Gabriel Lander over 7 years ago

We've been seeing this issue for ages, always figured it had something to do with FindEM and K2 images.

Actions #8

Updated by Scott Stagg over 7 years ago

  • Status changed from New to In Code Review
  • Assignee set to Anchi Cheng

That was it. I edited the code, and it's working for me know. I'm going to assign this to Anchi, for code review to see what you think about my fix.

Actions #9

Updated by Thomas Klose over 7 years ago

For what it is worth, FindEM2 does not seem to have any problems with large prime factors and works fine with our K2 images without any additional cropping.

Actions #10

Updated by Thomas Klose over 7 years ago

Sorry to hijack this one more time. A fix for those people with odd image dimensions would be to add a new function to appion/appionlib/apImage/imagefilter.py like:

def frame_cut_border(a, newshape):
        mindimx = int(0)
        maxdimx = int(newshape[0])
        mindimy = int(0)
        maxdimy = int(newshape[1])
        return a[mindimx:maxdimx, mindimy:maxdimy]

and substitute this in appion/appionlib/apTemplateCorrelator.py at line 183


                                filtarray = apImage.imagefilter.frame_cut_border(filtarray, newshape)

This will remove some pixels at the bottom right of the image used for the correlation, which will likely not be boxed out in any case, but would preserve the coordinates/centers of the boxed particles from the cropped images.

Actions #11

Updated by Anchi Cheng over 7 years ago

Can not test it now. Maybe I will do this during Hackathon

Actions #12

Updated by Scott Stagg over 7 years ago

No need to test, I just wanted to see what you thought about the code. It's sort of brute force, but I think it's the right way.

Actions #13

Updated by Neil Voss almost 6 years ago

  • Related to Bug #6530: Particle picks off center with K3 added
Actions #14

Updated by Neil Voss almost 6 years ago

  • Related to Bug #4904: FindEM produces artifacts when image dimensions have a large prime factor added
Actions

Also available in: Atom PDF