Feature #5146
closedLocal CTF estimation with GCTF
0%
Description
Added option to run local CTF estimation with GCTF. Creates a raster and estimates CTF across an image. Generates an image with contour lines displaying the estimated local CTF.
Next step is to use these values to assign per-particle CTF values.
Files
Updated by Anchi Cheng about 7 years ago
- Status changed from New to Assigned
- Assignee set to Gabriel Lander
What version of matplotlib are you using ?
I got an error:
File "/home/acheng/myami/appion/bin/gctf.py", line 480, in generateLocalCTFmap plt.imshow(GD1, extent=(0, imgx, 0, imgy),cmap=cm.plasma) AttributeError: 'module' object has no attribute 'plasma'
Updated by Gabriel Lander about 7 years ago
We're at 2.02
I can try to figure out what the coloring scheme is for the plasma color map, and set it manually in the script. Or we could use a different color map.
Updated by Anchi Cheng about 7 years ago
I can get "hot" in version 0.99.1.1 (on CentOS 6) and 1.2 (on CentOS 7). Is that o.k ?
Updated by Gabriel Lander about 7 years ago
"hot" won't work since one end of the spectrum is black, so the contour lines and text won't be visible. I'll just put in the gradient manually. I'll do this tonight.
Updated by Gabriel Lander about 7 years ago
- Assignee changed from Gabriel Lander to Anchi Cheng
okay if cm.plasma isn't found, gctf.py creates a custom gradient that looks similar (but not as good).
Updated by Anchi Cheng about 7 years ago
The contour show up only at a corner. Looks like scaling problem.
Updated by Anchi Cheng about 7 years ago
- Assignee changed from Anchi Cheng to Gabriel Lander
Updated by Gabriel Lander about 7 years ago
Can you attach an image? We don't have any issues at our end, so I'm not sure how I'll reproduce this to troubleshoot.
Updated by Anchi Cheng about 7 years ago
I thought I did attached.
Anyway, how about another approach by changing the contour line and text color when using cm.hot ?
I think #009999 should work well for that, but I did not have chance to try today.
The custom color map is not as nice.
Updated by Gabriel Lander about 7 years ago
- Assignee changed from Gabriel Lander to Anchi Cheng
Okay I just added an option to specify the size of the output contour plot (extent=(0, dimx, 0, dimy)), hopefully this works. Can you try now?
Updated by Anchi Cheng about 7 years ago
Finally get to try it. I don't like the color effect so I just changed the line and text color to be a complementary light blue-green color when it needs to use "hot". It works well.
I also found that CentOS 6 uses scipy 0.7. I have worked out a work-around using ndimg.interpolation.zoom. Will commit that later.
Updated by Anchi Cheng about 7 years ago
- Assignee changed from Anchi Cheng to Gabriel Lander
Gabe, you should check if I have broken your newer version of matplotlib.
Updated by Gabriel Lander about 7 years ago
- Status changed from Assigned to Closed
Works fine at this end.
Updated by Anchi Cheng about 7 years ago
- Status changed from Closed to In Test
2dd71999 use ndimage.interploation.zoom to scale grid map to display size.
Gabe, please check that I have not break your part. One thing I did notice is that your mapping distorts the map to fit 512x512 grid. Also the orientation may be upside down. Please check. From what I can tell, gctf output coordinate is that of the data. I need no flip nor rotate if I make my numpy array axis 0 be row (y) and axis 1 be column (x).
Updated by Gabriel Lander about 7 years ago
- Status changed from In Test to Closed
Works fine, just a minor bug fix. The flipping for the display is a mystery to me, but I double checked that the image display for the local CTF and the micrograph display match using images taken on a cross grating, where the troughs and plateaus were easily identifiable and had very different local CTF values.
Updated by Gabriel Lander over 5 years ago
Sped up local particle extraction with local values by binning the matrix of values.