dcnum 0.25.9__py3-none-any.whl → 0.25.10__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.

Potentially problematic release.


This version of dcnum might be problematic. Click here for more details.

dcnum/_version.py CHANGED
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '0.25.9'
21
- __version_tuple__ = version_tuple = (0, 25, 9)
20
+ __version__ = version = '0.25.10'
21
+ __version_tuple__ = version_tuple = (0, 25, 10)
@@ -3,6 +3,8 @@ import pathlib
3
3
  import re
4
4
  from typing import Dict
5
5
 
6
+ import numpy as np
7
+
6
8
  from ...meta import paths
7
9
 
8
10
  from ..segmenter import Segmenter, SegmenterNotApplicableError
@@ -116,10 +118,15 @@ class TorchSegmenterBase(Segmenter):
116
118
  """
117
119
  key = item["key"]
118
120
  if key in data_dict:
119
- regexp = re.compile(item["regexp"])
120
- matched = bool(regexp.match(data_dict[key]))
121
- negate = item.get("regexp-negate", False)
122
- valid = matched if not negate else not matched
121
+ valid = True
122
+ if "regexp" in item:
123
+ re_match = bool(re.search(item["regexp"], data_dict[key],
124
+ re.MULTILINE))
125
+ negate = item.get("regexp-negate", False)
126
+ valid = valid and (re_match if not negate else not re_match)
127
+ if "value" in item:
128
+ valid = valid and np.allclose(item["value"], data_dict[key],
129
+ atol=0, rtol=0.01)
123
130
  if not valid:
124
131
  reasons_list.append(item.get("reason", "unknown reason"))
125
132
  elif not item.get("allow-missing-key", False):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dcnum
3
- Version: 0.25.9
3
+ Version: 0.25.10
4
4
  Summary: numerics toolbox for imaging deformability cytometry
5
5
  Author: Maximilian Schlögel, Paul Müller, Raghava Alajangi
6
6
  Maintainer-email: Paul Müller <dev@craban.de>
@@ -1,5 +1,5 @@
1
1
  dcnum/__init__.py,sha256=p0mYg01FQ6nsERYmx_FfVxqqHvYcSMEyIAMBIivAmO8,1206
2
- dcnum/_version.py,sha256=lcAUa6uFmnm8xHO8GS8Xd2LE1e4-BcAMDWwWwgiDo-I,513
2
+ dcnum/_version.py,sha256=2u4bWaMdcZXyf4_yxgykEAXNXcEaVQumowHKcuxLJUI,515
3
3
  dcnum/os_env_st.py,sha256=4psq-gPuWTTQ118kCiTx0Mhoyads4Irn6JSUzZk8gyc,3052
4
4
  dcnum/feat/__init__.py,sha256=jUJYWTD3VIoDNKrmryXbjHb1rGwYtK4b7VPWihYgUoo,325
5
5
  dcnum/feat/event_extractor_manager_thread.py,sha256=6D3RVYBuH7gOoGZ4Kz74n6fhq7MtlTY26kpSwZRqg3M,7972
@@ -41,7 +41,7 @@ dcnum/segm/segmenter_manager_thread.py,sha256=vMZFBa18oO8OyVB3niy_mtEfKkGOWHEga4
41
41
  dcnum/segm/segmenter_mpo.py,sha256=O6G4xzHKNMSmyX9HDXTfl-3f9Fk2filxvVrRIO2D9hg,14117
42
42
  dcnum/segm/segmenter_sto.py,sha256=C55orEAZtMowNwtAT_WdSv46n5CzgLFuGq9kwdHc97I,3963
43
43
  dcnum/segm/segm_torch/__init__.py,sha256=DtUqJTbj7ybrTbXlwHq1Y4SCzi22rMW9Cus6wX-iU-A,822
44
- dcnum/segm/segm_torch/segm_torch_base.py,sha256=Z2c9_lZI4qEljQEMXuN_6CpBti57PbbjlDq0NGX3-EU,4514
44
+ dcnum/segm/segm_torch/segm_torch_base.py,sha256=wPt5QAmBDQxAA3Zxrdj3l9di0nIQmlUmKVJWtEpahH8,4814
45
45
  dcnum/segm/segm_torch/segm_torch_mpo.py,sha256=GOva6o-6_SppxWD4BeBB3ap1TR-6rIYHavtfIstaYvc,2643
46
46
  dcnum/segm/segm_torch/segm_torch_sto.py,sha256=PTOJrP_FkaxZZul8lM4VA2HL3KyxrheDDWWdJbmJdiw,3393
47
47
  dcnum/segm/segm_torch/torch_model.py,sha256=5aL6SwSvg1N2gATEGBhP3aA4WTHlvGzQVYuizmh0LrU,3187
@@ -51,8 +51,8 @@ dcnum/write/__init__.py,sha256=sK79IlvCFIqf2oFABVeyYedMnHOsEIQpxAauEeNO-Tw,273
51
51
  dcnum/write/deque_writer_thread.py,sha256=ao7F1yrVKyufgC4rC0Y2_Vt7snuT6KpI7W2qVxcjdhk,1994
52
52
  dcnum/write/queue_collector_thread.py,sha256=-p5vrk9cDhtaIMFIu_cCmvlZJafrFkW68uONonMURYo,11617
53
53
  dcnum/write/writer.py,sha256=JkVb4KDBV3oo9r3p2yy9wECO1REx7FG0PRBmVWTxJdk,20577
54
- dcnum-0.25.9.dist-info/licenses/LICENSE,sha256=rX7tNSxP-EhLz-yYUyoBGwjJheA2fiZpT1Iw0LXnJ2M,1069
55
- dcnum-0.25.9.dist-info/METADATA,sha256=ZIlsz6SBct_bYtVxfz5gaNrKRRVNPUe7zC5LM3rNSfM,2354
56
- dcnum-0.25.9.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
57
- dcnum-0.25.9.dist-info/top_level.txt,sha256=Hmh38rgG_MFTVDpUDGuO2HWTSq80P585Het4COQzFTg,6
58
- dcnum-0.25.9.dist-info/RECORD,,
54
+ dcnum-0.25.10.dist-info/licenses/LICENSE,sha256=rX7tNSxP-EhLz-yYUyoBGwjJheA2fiZpT1Iw0LXnJ2M,1069
55
+ dcnum-0.25.10.dist-info/METADATA,sha256=twT_YXAb4Xxt24EKrjxEg8-4UgkHDHYOfzS-prFCXTM,2355
56
+ dcnum-0.25.10.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
57
+ dcnum-0.25.10.dist-info/top_level.txt,sha256=Hmh38rgG_MFTVDpUDGuO2HWTSq80P585Het4COQzFTg,6
58
+ dcnum-0.25.10.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (78.1.0)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5