StochasticAnalytics / emClarity

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

ctf 3d always tries to erase the beads. #140

Closed thomasfrosio closed 3 years ago

thomasfrosio commented 3 years ago

Hi,

On vs1.5.3. ctf 3d always tries to erase the beads, either before or after CTF multiplication: https://github.com/bHimes/emClarity/blob/f06204208e0617fc69e94696f8825d0077cdd637/ctf/BH_ctf_Correct3d.m#L673-L693

However, masking/BH_eraseBeads.m might not be able to handle all situations. For instance, for dataset without beads, ctf 3d will fail after tomoCPR runs because it calls BH_eraseBeads with mapBackIter > 0 and without a .erase file: https://github.com/bHimes/emClarity/blob/f06204208e0617fc69e94696f8825d0077cdd637/masking/BH_eraseBeads.m#L16-L44

There's also a small inconsistency between ctf estimate/3d and ctf update on the default value of erase_beads_after_ctf:

https://github.com/bHimes/emClarity/blob/f06204208e0617fc69e94696f8825d0077cdd637/ctf/BH_ctf_Estimate.m#L403-L407

https://github.com/bHimes/emClarity/blob/f06204208e0617fc69e94696f8825d0077cdd637/ctf/BH_ctf_Correct3d.m#L26-L30

https://github.com/bHimes/emClarity/blob/f06204208e0617fc69e94696f8825d0077cdd637/ctf/BH_ctf_Updatefft.m#L325-L329

This might create unexpected behaviour, e.g. by default, ctf update will erase the beads and then ctf 3d will try to erase them once again after CTF multiplication.

Thomas