pytme 0.2.1__cp311-cp311-macosx_14_0_arm64.whl → 0.2.3__cp311-cp311-macosx_14_0_arm64.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.
- {pytme-0.2.1.data → pytme-0.2.3.data}/scripts/match_template.py +219 -216
- {pytme-0.2.1.data → pytme-0.2.3.data}/scripts/postprocess.py +86 -54
- pytme-0.2.3.data/scripts/preprocess.py +132 -0
- {pytme-0.2.1.data → pytme-0.2.3.data}/scripts/preprocessor_gui.py +181 -94
- pytme-0.2.3.dist-info/METADATA +92 -0
- pytme-0.2.3.dist-info/RECORD +75 -0
- {pytme-0.2.1.dist-info → pytme-0.2.3.dist-info}/WHEEL +1 -1
- pytme-0.2.1.data/scripts/preprocess.py → scripts/eval.py +1 -1
- scripts/extract_candidates.py +20 -13
- scripts/match_template.py +219 -216
- scripts/match_template_filters.py +154 -95
- scripts/postprocess.py +86 -54
- scripts/preprocess.py +95 -56
- scripts/preprocessor_gui.py +181 -94
- scripts/refine_matches.py +265 -61
- tme/__init__.py +0 -1
- tme/__version__.py +1 -1
- tme/analyzer.py +458 -813
- tme/backends/__init__.py +40 -11
- tme/backends/_jax_utils.py +187 -0
- tme/backends/cupy_backend.py +109 -226
- tme/backends/jax_backend.py +230 -152
- tme/backends/matching_backend.py +445 -384
- tme/backends/mlx_backend.py +32 -59
- tme/backends/npfftw_backend.py +240 -507
- tme/backends/pytorch_backend.py +30 -151
- tme/density.py +248 -371
- tme/extensions.cpython-311-darwin.so +0 -0
- tme/matching_data.py +328 -284
- tme/matching_exhaustive.py +195 -1499
- tme/matching_optimization.py +143 -106
- tme/matching_scores.py +887 -0
- tme/matching_utils.py +287 -388
- tme/memory.py +377 -0
- tme/orientations.py +78 -21
- tme/parser.py +3 -4
- tme/preprocessing/_utils.py +61 -32
- tme/preprocessing/composable_filter.py +7 -4
- tme/preprocessing/compose.py +7 -3
- tme/preprocessing/frequency_filters.py +49 -39
- tme/preprocessing/tilt_series.py +44 -72
- tme/preprocessor.py +560 -526
- tme/structure.py +491 -188
- tme/types.py +5 -3
- pytme-0.2.1.dist-info/METADATA +0 -73
- pytme-0.2.1.dist-info/RECORD +0 -73
- tme/helpers.py +0 -881
- tme/matching_constrained.py +0 -195
- {pytme-0.2.1.data → pytme-0.2.3.data}/scripts/estimate_ram_usage.py +0 -0
- {pytme-0.2.1.dist-info → pytme-0.2.3.dist-info}/LICENSE +0 -0
- {pytme-0.2.1.dist-info → pytme-0.2.3.dist-info}/entry_points.txt +0 -0
- {pytme-0.2.1.dist-info → pytme-0.2.3.dist-info}/top_level.txt +0 -0
scripts/extract_candidates.py
CHANGED
@@ -108,6 +108,12 @@ def parse_args():
|
|
108
108
|
type=int,
|
109
109
|
help="Box size for extraction, defaults to two times the template.",
|
110
110
|
)
|
111
|
+
extraction_group.add_argument(
|
112
|
+
"--translation_uncertainty",
|
113
|
+
required=False,
|
114
|
+
type=int,
|
115
|
+
help="Sets box size for extraction to template box plus this value.",
|
116
|
+
)
|
111
117
|
extraction_group.add_argument(
|
112
118
|
"--keep_out_of_box",
|
113
119
|
action="store_true",
|
@@ -150,6 +156,9 @@ def main():
|
|
150
156
|
box_size = args.box_size
|
151
157
|
if box_size is None:
|
152
158
|
box_size = np.multiply(template.shape, 2)
|
159
|
+
if args.translation_uncertainty is not None:
|
160
|
+
box_size = np.add(template.shape, args.translation_uncertainty)
|
161
|
+
|
153
162
|
box_size = np.array(box_size)
|
154
163
|
box_size = np.repeat(box_size, template.data.ndim // box_size.size).astype(int)
|
155
164
|
|
@@ -195,8 +204,6 @@ def main():
|
|
195
204
|
)
|
196
205
|
dens.data[:] = target.metadata["mean"]
|
197
206
|
|
198
|
-
print(target.data.shape)
|
199
|
-
# There appears to be an isseu with the stack creation. Trace this further
|
200
207
|
data_subset = np.zeros(extraction_shape, dtype = target.data.dtype)
|
201
208
|
pbar = ProgressBar(message = "Orientation ", nchars = 80, total = len(obs_slices))
|
202
209
|
for index, (obs_slice, cand_slice) in enumerate(zip(obs_slices, cand_slices)):
|
@@ -219,13 +226,13 @@ def main():
|
|
219
226
|
)
|
220
227
|
target_subset.pad(box_size, center=True)
|
221
228
|
|
222
|
-
target_value = target.data[tuple(orientations.translations[index].astype(int))]
|
223
|
-
center = np.divide(target_subset.data.shape, 2).astype(int ) + np.mod(target_subset.shape, 2)
|
224
|
-
print(np.where(target_subset.data == target_value), center)
|
225
|
-
print(target_subset.data[tuple(center.astype(int))],
|
226
|
-
target_value,
|
227
|
-
target_subset.data[tuple(center.astype(int))] == target_value
|
228
|
-
)
|
229
|
+
# target_value = target.data[tuple(orientations.translations[index].astype(int))]
|
230
|
+
# center = np.divide(target_subset.data.shape, 2).astype(int ) + np.mod(target_subset.shape, 2)
|
231
|
+
# print(np.where(target_subset.data == target_value), center)
|
232
|
+
# print(target_subset.data[tuple(center.astype(int))],
|
233
|
+
# target_value,
|
234
|
+
# target_subset.data[tuple(center.astype(int))] == target_value
|
235
|
+
# )
|
229
236
|
|
230
237
|
dens.data[index] = target_subset.data
|
231
238
|
print("")
|
@@ -241,10 +248,10 @@ def main():
|
|
241
248
|
f"{splitext(args.output_file)[0]}_aligned.tsv",
|
242
249
|
file_format="text"
|
243
250
|
)
|
244
|
-
orientations.to_file(
|
245
|
-
|
246
|
-
|
247
|
-
)
|
251
|
+
# orientations.to_file(
|
252
|
+
# f"{splitext(args.output_file)[0]}_aligned.star",
|
253
|
+
# file_format="relion"
|
254
|
+
# )
|
248
255
|
|
249
256
|
if __name__ == "__main__":
|
250
257
|
main()
|