Skip to content

Commit 00b73c8

Browse files
authored
Merge pull request #104 from Lucaslab-Berkeley/jd_movie_refine_template
Add ability to refine_template from a movie
2 parents 9cd3fa8 + deaa831 commit 00b73c8

32 files changed

+2877
-704
lines changed

programs/refine_template/refine_template_example_config.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,11 @@ preprocessing_filters:
3737
low_freq_cutoff: null
3838
computational_config:
3939
gpu_ids: 0
40-
num_cpus: 1
40+
num_cpus: 1
41+
apply_global_filtering: true
42+
movie_config:
43+
enabled: false
44+
movie_path: path/to/aligned_movie.mrc
45+
deformation_field_path: path/to/deformation_field.csv
46+
pre_exposure: 0.0
47+
fluence_per_frame: 1.0

pyproject.toml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,16 @@ dependencies = [
4848
"types-PyYAML",
4949
"roma",
5050
"tqdm",
51-
"torch-fourier-slice>=v0.2.0",
51+
"torch-fourier-slice>=v0.4.0",
5252
"torch-fourier-filter>=v0.2.6",
5353
"torch-so3>=v0.2.0",
5454
"ttsim3d>=v0.4.0",
5555
"lmfit",
5656
"zenodo-get",
57+
"torch-fourier-shift",
58+
"torch-motion-correction>=0.0.4",
59+
"torch-grid-utils>=v0.0.9",
60+
"torch-ctf"
5761
]
5862

5963
[tool.hatch.metadata]
@@ -153,7 +157,10 @@ pretty = true
153157
[tool.pytest.ini_options]
154158
minversion = "7.0"
155159
testpaths = ["tests"]
156-
filterwarnings = ["error"]
160+
filterwarnings = [
161+
"error",
162+
"ignore::FutureWarning",
163+
]
157164
addopts = "-m 'not slow'" # Skip slow tests on default
158165
markers = ["slow: marks test as slow"]
159166

src/leopard_em/analysis/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66
match_template_peaks_to_dict,
77
)
88
from .pvalue_metric import extract_peaks_and_statistics_p_value
9-
from .zscore_metric import extract_peaks_and_statistics_zscore, gaussian_noise_zscore_cutoff
9+
from .zscore_metric import (
10+
extract_peaks_and_statistics_zscore,
11+
gaussian_noise_zscore_cutoff,
12+
)
1013

1114
__all__ = [
1215
"MatchTemplatePeaks",

src/leopard_em/backend/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
"""Submodule for computationally intensive backend functions."""
22

3+
from .core_differentiable_refine import core_differentiable_refine
34
from .core_match_template import core_match_template
45
from .core_refine_template import core_refine_template, cross_correlate_particle_stack
56

67
__all__ = [
78
"core_match_template",
89
"core_refine_template",
910
"cross_correlate_particle_stack",
11+
"core_differentiable_refine",
1012
]

0 commit comments

Comments
 (0)