Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gain ref different size than tifs #1089

Closed
cgisriel opened this issue Mar 4, 2024 · 3 comments
Closed

Gain ref different size than tifs #1089

cgisriel opened this issue Mar 4, 2024 · 3 comments

Comments

@cgisriel
Copy link

cgisriel commented Mar 4, 2024

Hello, I recently collected a data set and upon attempting motion correction, I get the error below. The physical pixel size is 0.825 for the tifs, but in the header of the gain reference, I see that the superresolution pixel size is 0.429 (rather than the expected 0.4125 which is half of 0.825). When I look at the gain reference and a micrograph image in imod, I can see that they are different sizes by a factor of two (see attached image). How can I correct the gain reference?

image (20)

Here is the full error message:

fn_mic: tifs/FoilHole_29283866_Data_29284692_29284694_20240229_120829_fractions.tiff nx = 5760 ny = 4092 gain nx = 11520 gain ny = 8184
in: /dev/shm/ms725/build/RELION/3.1.4/fosscuda-2020b/relion-3.1.4/src/motioncorr_runner.cpp, line 1065
ERROR:
The size of the image and the size of the gain reference do not match. Make sure the gain reference has been rotated if necessary.
=== Backtrace ===
/vast/palmer/apps/avx2/software/RELION/3.1.4-fosscuda-2020b/bin/relion_run_motioncorr(_ZN11RelionErrorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_l+0x63) [0x4cf463]
/vast/palmer/apps/avx2/software/RELION/3.1.4-fosscuda-2020b/bin/relion_run_motioncorr() [0x44d07e]
/vast/palmer/apps/avx2/software/RELION/3.1.4-fosscuda-2020b/bin/relion_run_motioncorr(_ZN16MotioncorrRunner3runEv+0x3db) [0x512c7b]
/vast/palmer/apps/avx2/software/RELION/3.1.4-fosscuda-2020b/bin/relion_run_motioncorr(main+0x42) [0x4c50f2]
/lib64/libc.so.6(__libc_start_main+0xe5) [0x1471732d0d85]
/vast/palmer/apps/avx2/software/RELION/3.1.4-fosscuda-2020b/bin/relion_run_motioncorr(_start+0x2e) [0x4c7e9e]

ERROR:
The size of the image and the size of the gain reference do not match. Make sure the gain reference has been rotated if necessary.

@cgisriel
Copy link
Author

cgisriel commented Mar 4, 2024

It turns out that the data were accidently not collected in super resolution mode, which explains the problem.

@biochem-fan
Copy link
Member

You have to downsample the super-resolution gain reference into the physical size.

You must take harmonic mean, not simple binning or Fourier cropping. This can be done with e2proc2d from EMAN2 but I forgot the command line. If I remember correctly, this was discussed on the CCPEM mailing list before.

Alternatively, you can use relion_estimate_gain to estimate gain from movie frames. Probably this is easier.

@cgisriel
Copy link
Author

cgisriel commented Mar 4, 2024

I was able to make relion_estimate_gain work. Thanks so much for your help!

@cgisriel cgisriel closed this as completed Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants