pytme 0.2.9__cp311-cp311-macosx_15_0_arm64.whl → 0.2.9.post1__cp311-cp311-macosx_15_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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pytme
3
- Version: 0.2.9
3
+ Version: 0.2.9.post1
4
4
  Summary: Python Template Matching Engine
5
5
  Author: Valentin Maurer
6
6
  Author-email: Valentin Maurer <valentin.maurer@embl-hamburg.de>
@@ -18,6 +18,7 @@ Requires-Dist: pyfftw>=0.13.1
18
18
  Requires-Dist: pytest>=6.2.5
19
19
  Requires-Dist: PyYAML>=6.0
20
20
  Requires-Dist: scikit-image>=0.19.0
21
+ Requires-Dist: scikit_learn>=1.2.1
21
22
  Requires-Dist: pybind11
22
23
  Requires-Dist: psutil
23
24
  Requires-Dist: h5py
@@ -1,9 +1,9 @@
1
- pytme-0.2.9.data/scripts/estimate_ram_usage.py,sha256=R1NDpFajcF-MonJ4a43SfDlA-nxBYwK7D2quzCdsVFM,2767
2
- pytme-0.2.9.data/scripts/match_template.py,sha256=k_PACJyQfVBwB7zJiFvkurTtsnej_h6LEnvajZjJkus,39558
3
- pytme-0.2.9.data/scripts/postprocess.py,sha256=Wlbn284vN-Jjo2qpzNNsnW0zOHHHGLQEMeQp5RQJjZk,22759
4
- pytme-0.2.9.data/scripts/preprocess.py,sha256=7NJRUmPGaSFpGSA5C8f4JUzajRo6alMJ4aEprIyS0oo,6512
5
- pytme-0.2.9.data/scripts/preprocessor_gui.py,sha256=2b_xqZwEdB7GKmwWGu5Z4qewN71XZcEa1OVTe-15YF0,41789
6
- pytme-0.2.9.dist-info/licenses/LICENSE,sha256=K1IUNSVAz8BXbpH5EA8y5FpaHdvFXnAF2zeK95Lr2bY,18467
1
+ pytme-0.2.9.post1.data/scripts/estimate_ram_usage.py,sha256=R1NDpFajcF-MonJ4a43SfDlA-nxBYwK7D2quzCdsVFM,2767
2
+ pytme-0.2.9.post1.data/scripts/match_template.py,sha256=k_PACJyQfVBwB7zJiFvkurTtsnej_h6LEnvajZjJkus,39558
3
+ pytme-0.2.9.post1.data/scripts/postprocess.py,sha256=Wlbn284vN-Jjo2qpzNNsnW0zOHHHGLQEMeQp5RQJjZk,22759
4
+ pytme-0.2.9.post1.data/scripts/preprocess.py,sha256=7NJRUmPGaSFpGSA5C8f4JUzajRo6alMJ4aEprIyS0oo,6512
5
+ pytme-0.2.9.post1.data/scripts/preprocessor_gui.py,sha256=2b_xqZwEdB7GKmwWGu5Z4qewN71XZcEa1OVTe-15YF0,41789
6
+ pytme-0.2.9.post1.dist-info/licenses/LICENSE,sha256=K1IUNSVAz8BXbpH5EA8y5FpaHdvFXnAF2zeK95Lr2bY,18467
7
7
  scripts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
8
  scripts/estimate_ram_usage.py,sha256=rN7haobnHg3YcgGJIp81FNiCzy8-saJGeEurQlmQmNQ,2768
9
9
  scripts/match_template.py,sha256=8OkGMpvJe35mNVP9EMRd1KOTTrvMm9xB0OHLVkNlTV4,39559
@@ -15,7 +15,7 @@ tests/test_analyzer.py,sha256=fMuY0WCh1_D1XdzaryKzq3Mj9Q3pJFpWCNeEO-DYY20,7949
15
15
  tests/test_backends.py,sha256=29HlacgrX4fRjFXfzNNh3yDjqHRd7WvCFpTpRQwAsmA,17541
16
16
  tests/test_density.py,sha256=vzzy0Gk3uUR096aZgA-e5gOfLnw9qG3RH-xyXtHCO_I,18971
17
17
  tests/test_extensions.py,sha256=1Zv9dG_dmmC2mlbX91YIPyGLSToPC0202-ffLAfVcr4,5203
18
- tests/test_matching_cli.py,sha256=oX8d4QrMJfVu9IJN1BnEeSLvbd4T9iioiidCcrGp5Mk,9307
18
+ tests/test_matching_cli.py,sha256=VoGVi4QhakccVbC3pIQzEwaL97Zgi2Ll4np1zVqdpvo,9345
19
19
  tests/test_matching_data.py,sha256=TyvnSJPzdLPiXYWdz9coQ-m4H1tUS_cbD0WaBdvrevg,6062
20
20
  tests/test_matching_exhaustive.py,sha256=2_uG8Ir8QUyvGXMHcsBRdvr27j83cgpd53FnRyIkF8M,4055
21
21
  tests/test_matching_memory.py,sha256=XrBGRi4cIp3-4nN6s7tj0pBbFJrvJaG3vQdtK-6uzY0,1151
@@ -58,7 +58,7 @@ tme/matching_data.py,sha256=hhtjQl_EimGGmyR2DHiZi82Aeq3xmNF98koevZT7mKc,31238
58
58
  tme/matching_exhaustive.py,sha256=VXWOMaLF9m_31d9Hy3mn-PuUBJ0zgsTRb5v4sdRvJPU,18817
59
59
  tme/matching_optimization.py,sha256=wQ8k1VBK74twymogr_1LIOjNlhr_Nyl8CN4XxjEADHQ,45688
60
60
  tme/matching_scores.py,sha256=A8558Yj1lCEbcLYeevoVXMfhO3jILZeO3ztgp8gA9Xo,41023
61
- tme/matching_utils.py,sha256=nNOyVs-V8R63P3ma5tXiBS7vDLoNdLv_a0kil43gMTM,37405
61
+ tme/matching_utils.py,sha256=Oa7ytvvaSyck6PSci3XBoakgz8-9tL8Qtv2Sx7P3pVo,36362
62
62
  tme/memory.py,sha256=gRKOsputjOjpVhqgrLn2q8JfSCiXGtRdV8wd9XG_Fho,9687
63
63
  tme/orientations.py,sha256=yQKJaYQWkBqDOIYFmVDP47rjdvqwoAHBCvmpu36qoOo,21023
64
64
  tme/parser.py,sha256=bqgJ9FPecbnvqFF-xZhRZOwPxawtMqs69SEGS3oaxWQ,21565
@@ -68,8 +68,8 @@ tme/structure.py,sha256=EktAzR_t0cK5J0iBiWlDDGw1okFoiEQgwACAIRDNdgY,72143
68
68
  tme/types.py,sha256=NAY7C4qxE6yz-DXVtClMvFfoOV-spWGLNfpLATZ1LcU,442
69
69
  tme/analyzer/__init__.py,sha256=DgEulEr9nERtXttTpmEeL8pNLCW-OxGWB4PMMCQ0INs,48
70
70
  tme/analyzer/_utils.py,sha256=ioG90NdGGyjC1bXLu9cdBSPFStOG2n5GlPOeS_0SFGs,6083
71
- tme/analyzer/aggregation.py,sha256=uFE5YNEn2RqOdbTIaTR3KshSp1TTe_6E7mNZ1_HNXW4,21103
72
- tme/analyzer/peaks.py,sha256=pyoYyt_9k8BcK5hFuxW5ENA8yH0P7DD_GgAwZdHJOOo,32955
71
+ tme/analyzer/aggregation.py,sha256=NYk9EWr670GmYO0gTJ5AalpCbDh30SEAfoA59m6IMGA,21104
72
+ tme/analyzer/peaks.py,sha256=dVIJ1zCT7XPJSVK368uFdVcj7DcwRJYKJQbG9VhEDbQ,33028
73
73
  tme/backends/__init__.py,sha256=iGTq1c9CR0ZCAj9uOY6DzqPePYG0ZVvv637FukH-I7I,5257
74
74
  tme/backends/_cupy_utils.py,sha256=tzfoR-WyHViSY1E39mKoO5os-1L8zpChIdbf52QN0t4,24650
75
75
  tme/backends/_jax_utils.py,sha256=Bo47XU338rNdJ-BNLR4XKmbnnlAz8zxeLQomTNhgLmk,5907
@@ -112,8 +112,8 @@ tme/filters/ctf.py,sha256=ymOi90sf-bSPfHFpdvMPeEsoDHgOerMjH6q1sRNlNiY,14801
112
112
  tme/filters/reconstruction.py,sha256=oomYOtWGiw7DXs_NVnQxPVv8zK8hwXZTONiwaFQNTE8,5436
113
113
  tme/filters/wedge.py,sha256=t9LKPydjyuhtY9NtkiQug-S5bGt2DDTBAaeNDbH5T9E,17583
114
114
  tme/filters/whitening.py,sha256=Rhr-sxxvAVp60yUieiyL96iJcDasbdgq9q1iTtCxS1w,6324
115
- pytme-0.2.9.dist-info/METADATA,sha256=h8JMb_AIfivw8nUntzAw48jKUaVDvsgmQkojRk3NOZk,5333
116
- pytme-0.2.9.dist-info/WHEEL,sha256=SPbiHAOPLnBtml4sk5MIwvWF6YnGfOfy9C__W6Bpeg4,109
117
- pytme-0.2.9.dist-info/entry_points.txt,sha256=ff3LQL3FCWfCYOwFiP9zatm7laUbnwCkuPELkQVyUO4,241
118
- pytme-0.2.9.dist-info/top_level.txt,sha256=ovCUR7UXXouH3zYt_fJLoqr_vtjp1wudFgjVAnztQLE,18
119
- pytme-0.2.9.dist-info/RECORD,,
115
+ pytme-0.2.9.post1.dist-info/METADATA,sha256=iRWxbDR6p4Lq4q2PbfXzscjDDxGjMe46KItWTvdbTHA,5374
116
+ pytme-0.2.9.post1.dist-info/WHEEL,sha256=SPbiHAOPLnBtml4sk5MIwvWF6YnGfOfy9C__W6Bpeg4,109
117
+ pytme-0.2.9.post1.dist-info/entry_points.txt,sha256=ff3LQL3FCWfCYOwFiP9zatm7laUbnwCkuPELkQVyUO4,241
118
+ pytme-0.2.9.post1.dist-info/top_level.txt,sha256=ovCUR7UXXouH3zYt_fJLoqr_vtjp1wudFgjVAnztQLE,18
119
+ pytme-0.2.9.post1.dist-info/RECORD,,
@@ -252,6 +252,7 @@ class TestPostprocessing(TestMatchTemplate):
252
252
  }
253
253
  cmd = argdict_to_command(argdict, executable="postprocess.py")
254
254
  ret = subprocess.run(cmd, capture_output=True, shell=True)
255
+ print(ret.stdout, ret.stderr)
255
256
 
256
257
  match output_format:
257
258
  case "orientations":
@@ -398,6 +398,7 @@ class MaxScoreOverRotations:
398
398
  """Boolean indicating whether class instance can be shared across processes."""
399
399
  return True
400
400
 
401
+
401
402
  class MaxScoreOverTranslations(MaxScoreOverRotations):
402
403
  """
403
404
  Determine the translation maximizing the score over all possible rotations.
tme/analyzer/peaks.py CHANGED
@@ -197,6 +197,9 @@ class PeakCaller(ABC):
197
197
  self.rotations = be.full(
198
198
  (num_peaks, ndim, ndim), fill_value=0, dtype=be._float_dtype
199
199
  )
200
+ for i in range(ndim):
201
+ self.rotations[:, i, i] = 1.0
202
+
200
203
  self.scores = be.full((num_peaks,), fill_value=0, dtype=be._float_dtype)
201
204
  self.details = be.full((num_peaks,), fill_value=0, dtype=be._float_dtype)
202
205
 
tme/matching_utils.py CHANGED
@@ -15,7 +15,6 @@ from concurrent.futures import ThreadPoolExecutor
15
15
  from typing import Tuple, Dict, Callable, Optional
16
16
 
17
17
  import numpy as np
18
- from tqdm import tqdm
19
18
  from scipy.spatial import ConvexHull
20
19
  from scipy.ndimage import gaussian_filter
21
20
 
@@ -1151,38 +1150,3 @@ def compute_extraction_box(
1151
1150
  keep = be.multiply(keep, clamp_change == 0)
1152
1151
 
1153
1152
  return obs_beg_clamp, obs_end_clamp, cand_beg, cand_end, keep
1154
-
1155
-
1156
- class TqdmParallel(Parallel):
1157
- """
1158
- A minimal Parallel implementation using tqdm for progress reporting.
1159
-
1160
- Parameters:
1161
- -----------
1162
- tqdm_args : dict, optional
1163
- Dictionary of arguments passed to tqdm.tqdm
1164
- *args, **kwargs:
1165
- Arguments to pass to joblib.Parallel
1166
- """
1167
-
1168
- def __init__(self, tqdm_args: Dict = {}, *args, **kwargs):
1169
- super().__init__(*args, **kwargs)
1170
- self.pbar = tqdm(**tqdm_args)
1171
-
1172
- def __call__(self, iterable, *args, **kwargs):
1173
- self.n_tasks = len(iterable) if hasattr(iterable, "__len__") else None
1174
- return super().__call__(iterable, *args, **kwargs)
1175
-
1176
- def print_progress(self):
1177
- if self.n_tasks is None:
1178
- return super().print_progress()
1179
-
1180
- if self.n_tasks != self.pbar.total:
1181
- self.pbar.total = self.n_tasks
1182
- self.pbar.refresh()
1183
-
1184
- self.pbar.n = self.n_completed_tasks
1185
- self.pbar.refresh()
1186
-
1187
- if self.n_completed_tasks >= self.n_tasks:
1188
- self.pbar.close()