-
Notifications
You must be signed in to change notification settings - Fork 26
Description
CTF Estimator
The estimate_ctf method (which creates a CTFEstimator object internally) takes in a directory containing micrographs and outputs results, a list of tuples containing CTF parameters for each micrograph:
ASPIRE-Python/src/aspire/ctf/ctf_estimator.py
Lines 697 to 713 in c2cd98f
| def estimate_ctf( | |
| data_folder, | |
| pixel_size, | |
| cs, | |
| amplitude_contrast, | |
| voltage, | |
| num_tapers, | |
| psd_size, | |
| g_min, | |
| g_max, | |
| output_dir, | |
| dtype=np.float32, | |
| ): | |
| """ | |
| Given paramaters estimates CTF from experimental data | |
| and returns CTF as a mrc file. | |
| """ |
The first 3 items here correspond to defocus_u, defocus_v, and defocus_angle.
ASPIRE-Python/src/aspire/ctf/ctf_estimator.py
Lines 819 to 828 in c2cd98f
| result = ( | |
| cc_array[ml, 0], | |
| cc_array[ml, 1], | |
| cc_array[ml, 2], # Radians | |
| cs, | |
| voltage, | |
| pixel_size, | |
| amp, | |
| name, | |
| ) |
CTF Filter
CTFFilter initialization has a different order, but this should be easily fixed.
ASPIRE-Python/src/aspire/operators/filters.py
Lines 374 to 387 in c2cd98f
| class CTFFilter(Filter): | |
| def __init__( | |
| self, | |
| pixel_size=10, | |
| voltage=200, | |
| defocus_u=15000, | |
| defocus_v=15000, | |
| defocus_ang=0, | |
| Cs=2.26, | |
| alpha=0.07, | |
| B=0, | |
| ): | |
| """ | |
| A CTF (Contrast Transfer Function) Filter |
Coordinate Sources
BoxesCoordinateSource and CentersCoordinateSource objects are initialized with empty unique_filters (this variable is designed to store CTF filters)
ASPIRE-Python/src/aspire/source/coordinates.py
Lines 126 to 133 in c2cd98f
| # Create filter indices for the source. These are required in order to | |
| # pass through the filter eval code. | |
| # Bypassing the filter_indices setter in ImageSource allows us | |
| # create this source with absolutely *no* metadata. | |
| # Otherwise, six default Relion columns are created w/defualt values | |
| self.set_metadata("__filter_indices", np.zeros(self.n, dtype=int)) | |
| self.unique_filters = [IdentityFilter()] |