-
Notifications
You must be signed in to change notification settings - Fork 26
estimate_ctf integration with CoordinateSource
#623
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
Conversation
Merge pull request #584 from ComputationalCryoEM/develop
BFSReddyChetterji k Bug
…imators (#550) * changed self.L and self.n to self.src.L and self.src.n for estimators * extraneous comma
…o second-level API access (#565) * utils.coor_trans methods accessible from second level * crop_2d method * crop2d test * clarify flooring behavior for centering and add apdding * tests finished * isort shenanigans * fix even to odd n->n+1 padding bug * slightly better comment * better behavior for dtype * remove mistaken characters * fixes after merge * last ensure removed * rect tests * padding tests and fill value test * better comments * even better comments * np.diag * crop_pad_2d * clarifying comment when padding
* downsample tests * cleanup and deleting test downsample from preprocess_pipeline * remove hardcoded ds / whiten test * flake8 * 3d volume downsample test * remove redundant test from tests/test_preprocess.py * remove unused import * remove numbered tests for uniformity * typo * skip one of the ds tests * use gaussian_3d to generate test volume * isort * checkCenterPoint * max_resolution -> L_ds * parametrize ds tests
* docstring for besselj_zeros * rest of docstrings * remove pdb import * second order differences comment * comments and docstring for num_besselj_zeros * formatting * tiny fixes; * docstring fixes * NumPy * NumPy again * sanity check * parentheses inside sentence
* fix size checking bug * fb2d * fb3d and pswf2d * dirac * fpswf * polar * format * sz -> size * test init with int * docstring * typo * the same typo
Cast `Images` to arrays when needed.
j-c-c
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, looks great. I definitely get an involuntary twitch when i see the very similar lines in _populate_ctf_from_relion and _populate_ctf_from_list. Is there a way to package the Relion ctf info in the same form as ASPIRE's to pass into a single _populate_ctf() method? Or do you think that would be too confusing?
garrettwrong
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey Chris, this is quite a bit of work, thank you for putting it together.
I put a couple very small things, and one actual design question in import_ctf (maybe I'm just missing detail there).
I didn't leave comments about it inline, but there might be a different way to do the test ranges for the unit tests. However, I think that would just be busy work. (so don't worry about it).
janden
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some minor things.
5454fee to
6456595
Compare
#622
Also addresses #633
Features added to
ctf_estimatorestimate_ctf()now returns a dictionary of dictionaries asresults. This is of the form:estimate_ctf()now has default CTF options, the same as in theestimate-ctfcommands, includingoutput_direstimate_ctf()now has the optionsave_ctf_images=False, which turns on or off saving the CTF itself to a.ctf(.mrc) file.estimate_ctf()now has the optionsave_noise_images=False, which turns on or off saving the noise as a.mrcFeatures added to
CoordinateSourceCoordinateSources now have theB=0option when initializing, which is required for the CTFCoordinateSources now have theimport_ctf()method, which uses new methods_populate_ctf_from_relion(),_populate_ctf_from_list()and utility_read_ctf_star(), which reads the input ctf files, construct theCTFFilters, and update thefilter_indicesand metadata.micrograph_ctf.starfile generated by RELION's wrapper of CTFFind for both v3.1 and v4.0 https://relion.readthedocs.io/en/latest/SPA_tutorial/Preprocessing.html#ctf-estimationhttps://relion.readthedocs.io/en/release-3.1/SPA_tutorial/Preprocessing.html#
Testing
test_CtfEstimatemodified to match new output ofestimate_ctf()test_coordinate_sourcenow has testing for the newimport_ctf()method, which also ensures that the source's filters and metadata are correct.