Skip to content

Conversation

@chris-langfield
Copy link
Collaborator

@chris-langfield chris-langfield commented May 13, 2022

#622

Also addresses #633

Features added to ctf_estimator

  • estimate_ctf() now returns a dictionary of dictionaries as results. This is of the form:
}
      "micrograph_name1" : {"pixel_size": 1, "voltage": 300 ...},
      "micrograph_name2" : {"pixel_size": 1, "voltage": 300 ...},
       ....
}
  • estimate_ctf() now has default CTF options, the same as in the estimate-ctf commands, including output_dir
  • estimate_ctf() now has the option save_ctf_images=False, which turns on or off saving the CTF itself to a .ctf (.mrc) file.
  • estimate_ctf() now has the option save_noise_images=False, which turns on or off saving the noise as a .mrc

Features added to CoordinateSource

Testing

  • test_CtfEstimate modified to match new output of estimate_ctf()
  • test_coordinate_source now has testing for the new import_ctf() method, which also ensures that the source's filters and metadata are correct.

garrettwrong and others added 30 commits February 23, 2022 14:41
Merge pull request #584 from ComputationalCryoEM/develop
…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.
Copy link
Collaborator

@j-c-c j-c-c left a 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?

Copy link
Collaborator

@garrettwrong garrettwrong left a 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).

@chris-langfield chris-langfield marked this pull request as ready for review August 10, 2022 15:21
Copy link
Collaborator

@janden janden left a 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.

@chris-langfield
Copy link
Collaborator Author

Refactored! Note that filter_indices requires special handling (as well as unique_filters) due to #687 just posted. Sorry for the delay @janden

@chris-langfield chris-langfield requested a review from janden August 31, 2022 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cleanup enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CTFEstimator Default Values Integrate estimate_ctf, CTFFilter, and CoordinateSources

5 participants