pytme 0.2.9__tar.gz → 0.2.9.post1__tar.gz

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.
Files changed (115) hide show
  1. {pytme-0.2.9 → pytme-0.2.9.post1}/PKG-INFO +2 -1
  2. {pytme-0.2.9 → pytme-0.2.9.post1}/pyproject.toml +2 -1
  3. {pytme-0.2.9 → pytme-0.2.9.post1}/tests/test_matching_cli.py +1 -0
  4. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/analyzer/aggregation.py +1 -0
  5. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/analyzer/peaks.py +3 -0
  6. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/matching_utils.py +0 -36
  7. {pytme-0.2.9 → pytme-0.2.9.post1}/LICENSE +0 -0
  8. {pytme-0.2.9 → pytme-0.2.9.post1}/MANIFEST.in +0 -0
  9. {pytme-0.2.9 → pytme-0.2.9.post1}/README.md +0 -0
  10. {pytme-0.2.9 → pytme-0.2.9.post1}/pytme.egg-info/SOURCES.txt +0 -0
  11. {pytme-0.2.9 → pytme-0.2.9.post1}/scripts/__init__.py +0 -0
  12. {pytme-0.2.9 → pytme-0.2.9.post1}/scripts/estimate_ram_usage.py +0 -0
  13. {pytme-0.2.9 → pytme-0.2.9.post1}/scripts/match_template.py +0 -0
  14. {pytme-0.2.9 → pytme-0.2.9.post1}/scripts/postprocess.py +0 -0
  15. {pytme-0.2.9 → pytme-0.2.9.post1}/scripts/preprocess.py +0 -0
  16. {pytme-0.2.9 → pytme-0.2.9.post1}/scripts/preprocessor_gui.py +0 -0
  17. {pytme-0.2.9 → pytme-0.2.9.post1}/setup.cfg +0 -0
  18. {pytme-0.2.9 → pytme-0.2.9.post1}/setup.py +0 -0
  19. {pytme-0.2.9 → pytme-0.2.9.post1}/tests/__init__.py +0 -0
  20. {pytme-0.2.9 → pytme-0.2.9.post1}/tests/data/Blurring/blob_width18.npy +0 -0
  21. {pytme-0.2.9 → pytme-0.2.9.post1}/tests/data/Blurring/edgegaussian_sigma3.npy +0 -0
  22. {pytme-0.2.9 → pytme-0.2.9.post1}/tests/data/Blurring/gaussian_sigma2.npy +0 -0
  23. {pytme-0.2.9 → pytme-0.2.9.post1}/tests/data/Blurring/hamming_width6.npy +0 -0
  24. {pytme-0.2.9 → pytme-0.2.9.post1}/tests/data/Blurring/kaiserb_width18.npy +0 -0
  25. {pytme-0.2.9 → pytme-0.2.9.post1}/tests/data/Blurring/localgaussian_sigma0510.npy +0 -0
  26. {pytme-0.2.9 → pytme-0.2.9.post1}/tests/data/Blurring/mean_size5.npy +0 -0
  27. {pytme-0.2.9 → pytme-0.2.9.post1}/tests/data/Blurring/ntree_sigma0510.npy +0 -0
  28. {pytme-0.2.9 → pytme-0.2.9.post1}/tests/data/Blurring/rank_rank3.npy +0 -0
  29. {pytme-0.2.9 → pytme-0.2.9.post1}/tests/data/Maps/.DS_Store +0 -0
  30. {pytme-0.2.9 → pytme-0.2.9.post1}/tests/data/Maps/emd_8621.mrc.gz +0 -0
  31. {pytme-0.2.9 → pytme-0.2.9.post1}/tests/data/README.md +0 -0
  32. {pytme-0.2.9 → pytme-0.2.9.post1}/tests/data/Raw/em_map.map +0 -0
  33. {pytme-0.2.9 → pytme-0.2.9.post1}/tests/data/Structures/.DS_Store +0 -0
  34. {pytme-0.2.9 → pytme-0.2.9.post1}/tests/data/Structures/1pdj.cif +0 -0
  35. {pytme-0.2.9 → pytme-0.2.9.post1}/tests/data/Structures/1pdj.pdb +0 -0
  36. {pytme-0.2.9 → pytme-0.2.9.post1}/tests/data/Structures/5khe.cif +0 -0
  37. {pytme-0.2.9 → pytme-0.2.9.post1}/tests/data/Structures/5khe.ent +0 -0
  38. {pytme-0.2.9 → pytme-0.2.9.post1}/tests/data/Structures/5khe.pdb +0 -0
  39. {pytme-0.2.9 → pytme-0.2.9.post1}/tests/data/Structures/5uz4.cif +0 -0
  40. {pytme-0.2.9 → pytme-0.2.9.post1}/tests/preprocessing/__init__.py +0 -0
  41. {pytme-0.2.9 → pytme-0.2.9.post1}/tests/preprocessing/test_compose.py +0 -0
  42. {pytme-0.2.9 → pytme-0.2.9.post1}/tests/preprocessing/test_frequency_filters.py +0 -0
  43. {pytme-0.2.9 → pytme-0.2.9.post1}/tests/preprocessing/test_preprocessor.py +0 -0
  44. {pytme-0.2.9 → pytme-0.2.9.post1}/tests/preprocessing/test_utils.py +0 -0
  45. {pytme-0.2.9 → pytme-0.2.9.post1}/tests/test_analyzer.py +0 -0
  46. {pytme-0.2.9 → pytme-0.2.9.post1}/tests/test_backends.py +0 -0
  47. {pytme-0.2.9 → pytme-0.2.9.post1}/tests/test_density.py +0 -0
  48. {pytme-0.2.9 → pytme-0.2.9.post1}/tests/test_extensions.py +0 -0
  49. {pytme-0.2.9 → pytme-0.2.9.post1}/tests/test_matching_data.py +0 -0
  50. {pytme-0.2.9 → pytme-0.2.9.post1}/tests/test_matching_exhaustive.py +0 -0
  51. {pytme-0.2.9 → pytme-0.2.9.post1}/tests/test_matching_memory.py +0 -0
  52. {pytme-0.2.9 → pytme-0.2.9.post1}/tests/test_matching_optimization.py +0 -0
  53. {pytme-0.2.9 → pytme-0.2.9.post1}/tests/test_matching_utils.py +0 -0
  54. {pytme-0.2.9 → pytme-0.2.9.post1}/tests/test_orientations.py +0 -0
  55. {pytme-0.2.9 → pytme-0.2.9.post1}/tests/test_parser.py +0 -0
  56. {pytme-0.2.9 → pytme-0.2.9.post1}/tests/test_rotations.py +0 -0
  57. {pytme-0.2.9 → pytme-0.2.9.post1}/tests/test_structure.py +0 -0
  58. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/__init__.py +0 -0
  59. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/__version__.py +0 -0
  60. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/analyzer/__init__.py +0 -0
  61. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/analyzer/_utils.py +0 -0
  62. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/backends/__init__.py +0 -0
  63. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/backends/_cupy_utils.py +0 -0
  64. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/backends/_jax_utils.py +0 -0
  65. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/backends/cupy_backend.py +0 -0
  66. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/backends/jax_backend.py +0 -0
  67. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/backends/matching_backend.py +0 -0
  68. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/backends/mlx_backend.py +0 -0
  69. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/backends/npfftw_backend.py +0 -0
  70. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/backends/pytorch_backend.py +0 -0
  71. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/data/__init__.py +0 -0
  72. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/data/c48n309.npy +0 -0
  73. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/data/c48n527.npy +0 -0
  74. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/data/c48n9.npy +0 -0
  75. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/data/c48u1.npy +0 -0
  76. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/data/c48u1153.npy +0 -0
  77. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/data/c48u1201.npy +0 -0
  78. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/data/c48u1641.npy +0 -0
  79. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/data/c48u181.npy +0 -0
  80. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/data/c48u2219.npy +0 -0
  81. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/data/c48u27.npy +0 -0
  82. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/data/c48u2947.npy +0 -0
  83. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/data/c48u3733.npy +0 -0
  84. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/data/c48u4749.npy +0 -0
  85. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/data/c48u5879.npy +0 -0
  86. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/data/c48u7111.npy +0 -0
  87. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/data/c48u815.npy +0 -0
  88. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/data/c48u83.npy +0 -0
  89. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/data/c48u8649.npy +0 -0
  90. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/data/c600v.npy +0 -0
  91. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/data/c600vc.npy +0 -0
  92. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/data/metadata.yaml +0 -0
  93. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/data/quat_to_numpy.py +0 -0
  94. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/data/scattering_factors.pickle +0 -0
  95. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/density.py +0 -0
  96. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/external/bindings.cpp +0 -0
  97. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/filters/__init__.py +0 -0
  98. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/filters/_utils.py +0 -0
  99. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/filters/bandpass.py +0 -0
  100. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/filters/compose.py +0 -0
  101. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/filters/ctf.py +0 -0
  102. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/filters/reconstruction.py +0 -0
  103. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/filters/wedge.py +0 -0
  104. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/filters/whitening.py +0 -0
  105. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/matching_data.py +0 -0
  106. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/matching_exhaustive.py +0 -0
  107. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/matching_optimization.py +0 -0
  108. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/matching_scores.py +0 -0
  109. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/memory.py +0 -0
  110. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/orientations.py +0 -0
  111. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/parser.py +0 -0
  112. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/preprocessor.py +0 -0
  113. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/rotations.py +0 -0
  114. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/structure.py +0 -0
  115. {pytme-0.2.9 → pytme-0.2.9.post1}/tme/types.py +0 -0
@@ -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
@@ -7,7 +7,7 @@ name="pytme"
7
7
  authors = [
8
8
  { name = "Valentin Maurer", email = "valentin.maurer@embl-hamburg.de" },
9
9
  ]
10
- version="0.2.9"
10
+ version="0.2.9.post1"
11
11
  description="Python Template Matching Engine"
12
12
  readme="README.md"
13
13
  requires-python = ">=3.11"
@@ -19,6 +19,7 @@ dependencies=[
19
19
  "pytest>=6.2.5",
20
20
  "PyYAML>=6.0",
21
21
  "scikit-image>=0.19.0",
22
+ "scikit_learn>=1.2.1",
22
23
  "pybind11",
23
24
  "psutil",
24
25
  "h5py",
@@ -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.
@@ -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
 
@@ -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()
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes