StochasticAnalytics / emClarity

GNU Lesser General Public License v3.0
41 stars 6 forks source link

ctf estimation #65

Closed bHimes closed 5 years ago

bHimes commented 6 years ago

Work on background subtraction

Add resampling for astigmatism in producing the diagnostic image.

SimoneMattei commented 5 years ago

Hi Ben,

I am running the tutorial on the EMPIAR-10045 dataset using emClarity version 1.1.2. I was testing the ctf estimation following the tutorial suggestions. If I am not wrong, now you have hard-coded the astigmatism parameters in _BH_ctfEstimate.m. The astigmatism estimation is correct and properly saved in the _tiltXXastig.txt file but those values are not saved anymore in the _tiltXX_ali1ctf.tlt (in a comment of _BH_ctfEstimate.m it says that columns 12 and 13 are not used anymore). Also, differently from the tutorial and the youtube video, I am getting 3 output files about the fit to the power spectrum: _tiltXX_psRadial1.pdf, _tiltXX_psRadial2.pdf, and _tiltXX_psRadial3.pdf.

Is _tiltXX_psRadial1.pdf the estimation without astigmatism while _tiltXX_psRadial2.pdf and _tiltXX_psRadial3.pdf are the two values after astigmatism correction? Are the astigmatism values now taken directly from the _tiltXXastig.txt file without the need to save them in _tiltXX_ali1ctf.tlt?

Best,

Simone

bHimes commented 5 years ago

Hi Simone,

Great catch!

The reason 3 files are now saved is to evaluate the handedness. They are as below

tiltXX_psRadial_1.pdf - "Normal" global defocus estimate/ PS fit tiltXX_psRadial_2.pdf - defocus estimate from data offset by ~ 150 nm in Z tiltXX_psRadial_3.pdf - defocus estimate from data offset by ~ -150 nm in Z

The latter two are then used to check the handedness, which for now is only printed out as a warning. This seems to be quite reliable, so I think i am going to change it from a warning to an error when the wrong hand is detected.

To your question on the astigmatism. When I introduced the handedness check, I put a flag in to skip the astigmatism measurement for the offsets, since this is not needed. I inadvertently put this flag a few lines too early, and hadn't noticed the astigmatism was not being written out!

I've fixed this in the release branch, and will include it in the next release.

For the time being, I've attached a script you can run in your fixedStacks/ctf directory to patch in the astigmatism values. If you are doing this for an existing project, edit the parameter nTomoCPRcompleted in the script to match the number of cycles you have run, followed by ctf update and ctf 3d.

Thanks for the heads up.

Ben

Benjamin Himes

cryoEM methods development Grigorieff lab https://mail.hhmi.org/owa/redir.aspx?C=SbsCefkcbOt75jDyr05lpd3OifVN_utmfvnhZrtXS7Bl2i2eOXXVCA..&URL=http%3a%2f%2fgrigoriefflab.janelia.org%2f, HHMI Janelia Research Campus

cryoSTAC development @ emClarity https://mail.hhmi.org/owa/redir.aspx?C=8yDzXj54yTidMevTB7q5m3liEVwqAZ9LxuXQ4iYOVvtl2i2eOXXVCA..&URL=https%3a%2f%2fgithub.com%2fbHimes%2femClarity%2fwiki


On Thu, Feb 21, 2019 at 5:50 AM SimoneMattei notifications@github.com wrote:

Hi Ben,

I am running the tutorial on the EMPIAR-10045 dataset using emClarity version 1.1.2. I was testing the ctf estimation following the tutorial suggestions. If I am not wrong, now you have hard-coded the astigmatism parameters in BH_ctf_Estimate.m. The astigmatism estimation is correct and properly saved in the tiltXX_astig.txt file but those values are not saved anymore in the tiltXX_ali1_ctf.tlt (in a comment of BH_ctf_Estimate.m it says that columns 12 and 13 are not used anymore). Also, differently from the tutorial and the youtube video, I am getting 3 output files about the fit to the power spectrum: tiltXX_psRadial_1.pdf, tiltXX_psRadial_2.pdf, and tiltXX_psRadial_3.pdf.

Is tiltXX_psRadial_1.pdf the estimation without astigmatism while tiltXX_psRadial_2.pdf and tiltXX_psRadial_3.pdf are the two values after astigmatism correction? Are the astigmatism values now taken directly from the tiltXX_astig.txt file without the need to save them in tiltXX_ali1_ctf.tlt?

Best,

Simone

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/bHimes/emClarity/issues/65#issuecomment-465953700, or mute the thread https://github.com/notifications/unsubscribe-auth/AC71mMdN-Ii9_6BnGo5gJohnyRWz6eSZks5vPnnygaJpZM4Uyv5m .

SimoneMattei commented 5 years ago

Hi Ben,

Thanks for the info. I am not finding the attached script (I'm new to github so I might not see the obvious...)

Best,

Simo

bHimes commented 5 years ago

Sorry Simone, I thought I was replying to the list - I didn't notice your message originated on github.

I've approved your application to the emClarity list, and attached the script to a message there. You are also copied directly so you may see it twice.

Cheers,

Ben

Benjamin Himes

cryoEM methods development Grigorieff lab https://mail.hhmi.org/owa/redir.aspx?C=SbsCefkcbOt75jDyr05lpd3OifVN_utmfvnhZrtXS7Bl2i2eOXXVCA..&URL=http%3a%2f%2fgrigoriefflab.janelia.org%2f, HHMI Janelia Research Campus

cryoSTAC development @ emClarity https://mail.hhmi.org/owa/redir.aspx?C=8yDzXj54yTidMevTB7q5m3liEVwqAZ9LxuXQ4iYOVvtl2i2eOXXVCA..&URL=https%3a%2f%2fgithub.com%2fbHimes%2femClarity%2fwiki


On Thu, Feb 21, 2019 at 11:03 AM SimoneMattei notifications@github.com wrote:

Hi Ben,

Thanks for the info. I am not finding the attached script (I'm new to github so I might not see the obvious...)

Best,

Simo

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/bHimes/emClarity/issues/65#issuecomment-466056456, or mute the thread https://github.com/notifications/unsubscribe-auth/AC71mK2ecHVd9cWs34MkAwKRMfJULtqbks5vPsNcgaJpZM4Uyv5m .

bHimes commented 5 years ago

Bug is fixed in 1.1.7