torch-ctf-estimation 0.6.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- torch_ctf_estimation/__init__.py +78 -0
- torch_ctf_estimation/estimate_ctf.py +663 -0
- torch_ctf_estimation/estimate_ctf_1d/__init__.py +23 -0
- torch_ctf_estimation/estimate_ctf_1d/equiphase_ctf_1d.py +505 -0
- torch_ctf_estimation/estimate_ctf_1d/estimate_ctf_1d.py +358 -0
- torch_ctf_estimation/estimate_ctf_1d/estimate_ctf_1d_utils.py +886 -0
- torch_ctf_estimation/estimate_ctf_1d/estimate_gof_resolution_1d.py +361 -0
- torch_ctf_estimation/estimate_ctf_1d/estimate_thickness_1d.py +170 -0
- torch_ctf_estimation/estimate_ctf_1d/refine_defocus_and_thickness_1d.py +254 -0
- torch_ctf_estimation/estimate_ctf_2d/__init__.py +27 -0
- torch_ctf_estimation/estimate_ctf_2d/ctf_loss_2d.py +283 -0
- torch_ctf_estimation/estimate_ctf_2d/estimate_background_2d.py +62 -0
- torch_ctf_estimation/estimate_ctf_2d/estimate_ctf_2d.py +227 -0
- torch_ctf_estimation/estimate_ctf_2d/estimate_ctf_2d_utils.py +333 -0
- torch_ctf_estimation/estimate_ctf_2d/estimate_defocus_2d_grid.py +489 -0
- torch_ctf_estimation/estimate_ctf_2d/estimate_defocus_2d_linear.py +836 -0
- torch_ctf_estimation/estimate_ctf_2d/estimate_thickness_2d.py +303 -0
- torch_ctf_estimation/estimate_ctf_2d/phase_shift_2d.py +246 -0
- torch_ctf_estimation/estimate_ctf_2d/refine_defocus_and_thickness_2d.py +332 -0
- torch_ctf_estimation/metrics/__init__.py +11 -0
- torch_ctf_estimation/metrics/fit_metrics.py +56 -0
- torch_ctf_estimation/models/__init__.py +49 -0
- torch_ctf_estimation/models/input_models.py +198 -0
- torch_ctf_estimation/models/output_models.py +80 -0
- torch_ctf_estimation/models/results_models.py +341 -0
- torch_ctf_estimation/py.typed +0 -0
- torch_ctf_estimation/utils/__init__.py +1 -0
- torch_ctf_estimation/utils/data_io.py +223 -0
- torch_ctf_estimation/utils/defocus_field_from_1d.py +200 -0
- torch_ctf_estimation/utils/early_stopping.py +44 -0
- torch_ctf_estimation/utils/fitting_bounds.py +61 -0
- torch_ctf_estimation/utils/laser_axis_mask.py +110 -0
- torch_ctf_estimation/utils/normalize.py +33 -0
- torch_ctf_estimation/utils/patches.py +119 -0
- torch_ctf_estimation/utils/plotting.py +490 -0
- torch_ctf_estimation/utils/prepare_image.py +54 -0
- torch_ctf_estimation/utils/tilt_corrected_ps.py +380 -0
- torch_ctf_estimation-0.6.0.dist-info/METADATA +95 -0
- torch_ctf_estimation-0.6.0.dist-info/RECORD +41 -0
- torch_ctf_estimation-0.6.0.dist-info/WHEEL +4 -0
- torch_ctf_estimation-0.6.0.dist-info/licenses/LICENSE +29 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"""Contrast transfer function estimation for cryo-EM images in PyTorch."""
|
|
2
|
+
|
|
3
|
+
from importlib.metadata import PackageNotFoundError, version
|
|
4
|
+
|
|
5
|
+
try:
|
|
6
|
+
__version__ = version("torch-ctf-estimation")
|
|
7
|
+
except PackageNotFoundError:
|
|
8
|
+
__version__ = "uninstalled"
|
|
9
|
+
__author__ = "Alister Burt"
|
|
10
|
+
__email__ = "alisterburt@gmail.com"
|
|
11
|
+
|
|
12
|
+
from torch_ctf_estimation.estimate_ctf import (
|
|
13
|
+
CTFEstimationResult,
|
|
14
|
+
estimate_ctf,
|
|
15
|
+
estimate_ctf_and_thickness,
|
|
16
|
+
)
|
|
17
|
+
from torch_ctf_estimation.estimate_ctf_1d import (
|
|
18
|
+
estimate_ctf_1d,
|
|
19
|
+
estimate_thickness_1d,
|
|
20
|
+
fit_background_spline_1d,
|
|
21
|
+
refine_defocus_and_thickness_1d,
|
|
22
|
+
)
|
|
23
|
+
from torch_ctf_estimation.estimate_ctf_2d import (
|
|
24
|
+
estimate_ctf_2d,
|
|
25
|
+
estimate_defocus_2d_at_1x1,
|
|
26
|
+
estimate_thickness_2d,
|
|
27
|
+
refine_defocus_and_thickness_2d,
|
|
28
|
+
)
|
|
29
|
+
from torch_ctf_estimation.models import (
|
|
30
|
+
CTFFittingParams,
|
|
31
|
+
Defocus1DResults,
|
|
32
|
+
Defocus2DResults,
|
|
33
|
+
LaserParams,
|
|
34
|
+
OpticalParams,
|
|
35
|
+
Thickness1DResults,
|
|
36
|
+
Thickness2DResults,
|
|
37
|
+
ThicknessParams,
|
|
38
|
+
)
|
|
39
|
+
from torch_ctf_estimation.utils.defocus_field_from_1d import defocus_field_from_1d_fits
|
|
40
|
+
from torch_ctf_estimation.utils.laser_axis_mask import (
|
|
41
|
+
apply_laser_axis_mask,
|
|
42
|
+
build_laser_axis_mask,
|
|
43
|
+
)
|
|
44
|
+
from torch_ctf_estimation.utils.patches import (
|
|
45
|
+
compute_patch_power_spectra,
|
|
46
|
+
extract_ctf_patches,
|
|
47
|
+
normalised_patch_positions,
|
|
48
|
+
)
|
|
49
|
+
from torch_ctf_estimation.utils.prepare_image import prepare_image_for_ctf
|
|
50
|
+
|
|
51
|
+
__all__ = [
|
|
52
|
+
"CTFEstimationResult",
|
|
53
|
+
"CTFFittingParams",
|
|
54
|
+
"Defocus1DResults",
|
|
55
|
+
"Defocus2DResults",
|
|
56
|
+
"LaserParams",
|
|
57
|
+
"OpticalParams",
|
|
58
|
+
"Thickness1DResults",
|
|
59
|
+
"Thickness2DResults",
|
|
60
|
+
"ThicknessParams",
|
|
61
|
+
"apply_laser_axis_mask",
|
|
62
|
+
"build_laser_axis_mask",
|
|
63
|
+
"compute_patch_power_spectra",
|
|
64
|
+
"defocus_field_from_1d_fits",
|
|
65
|
+
"estimate_ctf",
|
|
66
|
+
"estimate_ctf_1d",
|
|
67
|
+
"estimate_ctf_2d",
|
|
68
|
+
"estimate_ctf_and_thickness",
|
|
69
|
+
"estimate_defocus_2d_at_1x1",
|
|
70
|
+
"estimate_thickness_1d",
|
|
71
|
+
"estimate_thickness_2d",
|
|
72
|
+
"extract_ctf_patches",
|
|
73
|
+
"fit_background_spline_1d",
|
|
74
|
+
"normalised_patch_positions",
|
|
75
|
+
"prepare_image_for_ctf",
|
|
76
|
+
"refine_defocus_and_thickness_1d",
|
|
77
|
+
"refine_defocus_and_thickness_2d",
|
|
78
|
+
]
|