dclab 0.64.1__cp310-cp310-win_amd64.whl → 0.65.0__cp310-cp310-win_amd64.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 dclab might be problematic. Click here for more details.
- dclab/_version.py +2 -2
- dclab/definitions/feat_logic.py +27 -28
- dclab/downsampling.cp310-win_amd64.pyd +0 -0
- dclab/external/skimage/_find_contours_cy.cp310-win_amd64.pyd +0 -0
- dclab/external/skimage/_pnpoly.cp310-win_amd64.pyd +0 -0
- dclab/external/skimage/_shared/geometry.cp310-win_amd64.pyd +0 -0
- dclab/rtdc_dataset/core.py +3 -3
- dclab/rtdc_dataset/export.py +2 -2
- dclab/rtdc_dataset/feat_basin.py +27 -15
- {dclab-0.64.1.dist-info → dclab-0.65.0.dist-info}/METADATA +1 -1
- {dclab-0.64.1.dist-info → dclab-0.65.0.dist-info}/RECORD +15 -15
- {dclab-0.64.1.dist-info → dclab-0.65.0.dist-info}/WHEEL +0 -0
- {dclab-0.64.1.dist-info → dclab-0.65.0.dist-info}/entry_points.txt +0 -0
- {dclab-0.64.1.dist-info → dclab-0.65.0.dist-info}/licenses/LICENSE +0 -0
- {dclab-0.64.1.dist-info → dclab-0.65.0.dist-info}/top_level.txt +0 -0
dclab/_version.py
CHANGED
dclab/definitions/feat_logic.py
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
|
+
import re
|
|
2
|
+
|
|
1
3
|
from . import feat_const
|
|
2
4
|
|
|
3
5
|
|
|
6
|
+
ML_SCORE_REGEX = re.compile(r"^ml_score_[a-z0-9]{3}$")
|
|
7
|
+
|
|
8
|
+
|
|
4
9
|
def check_feature_shape(name, data):
|
|
5
10
|
"""Check if (non)-scalar feature matches with its data's dimensionality
|
|
6
11
|
|
|
@@ -17,11 +22,15 @@ def check_feature_shape(name, data):
|
|
|
17
22
|
If the data's shape does not match its scalar description
|
|
18
23
|
"""
|
|
19
24
|
if len(data.shape) == 1 and not scalar_feature_exists(name):
|
|
20
|
-
raise ValueError(
|
|
21
|
-
|
|
25
|
+
raise ValueError(
|
|
26
|
+
f"Feature '{name}' is not a scalar feature, but "
|
|
27
|
+
"a 1D array was given for `data`!"
|
|
28
|
+
)
|
|
22
29
|
elif len(data.shape) != 1 and scalar_feature_exists(name):
|
|
23
|
-
raise ValueError(
|
|
24
|
-
|
|
30
|
+
raise ValueError(
|
|
31
|
+
f"Feature '{name}' is a scalar feature, but the "
|
|
32
|
+
"`data` array is not 1D!"
|
|
33
|
+
)
|
|
25
34
|
|
|
26
35
|
|
|
27
36
|
def feature_exists(name, scalar_only=False):
|
|
@@ -56,15 +65,9 @@ def feature_exists(name, scalar_only=False):
|
|
|
56
65
|
elif not scalar_only and name in feat_const.feature_names:
|
|
57
66
|
# non-scalar feature
|
|
58
67
|
valid = True
|
|
59
|
-
|
|
60
|
-
#
|
|
61
|
-
|
|
62
|
-
if (name.startswith("ml_score_")
|
|
63
|
-
and len(name) == len("ml_score_???")
|
|
64
|
-
and name[-3] in valid_chars
|
|
65
|
-
and name[-2] in valid_chars
|
|
66
|
-
and name[-1] in valid_chars):
|
|
67
|
-
valid = True
|
|
68
|
+
elif ML_SCORE_REGEX.match(name):
|
|
69
|
+
# machine-learning score feature ml_score_???
|
|
70
|
+
valid = True
|
|
68
71
|
return valid
|
|
69
72
|
|
|
70
73
|
|
|
@@ -93,8 +96,10 @@ def feature_register(name, label=None, is_scalar=True):
|
|
|
93
96
|
allowed_chars = "abcdefghijklmnopqrstuvwxyz_1234567890"
|
|
94
97
|
feat = "".join([f for f in name if f in allowed_chars])
|
|
95
98
|
if feat != name:
|
|
96
|
-
raise ValueError(
|
|
97
|
-
|
|
99
|
+
raise ValueError(
|
|
100
|
+
"`feature` must only contain lower-case characters, "
|
|
101
|
+
f"digits, and underscores; got '{name}'!"
|
|
102
|
+
)
|
|
98
103
|
if label is None:
|
|
99
104
|
label = f"User-defined feature {name}"
|
|
100
105
|
if feature_exists(name):
|
|
@@ -156,22 +161,16 @@ def get_feature_label(name, rtdc_ds=None, with_unit=True):
|
|
|
156
161
|
TODO: extract feature label from ancillary information when an rtdc_ds is
|
|
157
162
|
given.
|
|
158
163
|
"""
|
|
159
|
-
# TODO: Is there another way of avoiding this circular import?
|
|
160
|
-
from ..rtdc_dataset.feat_anc_core.ancillary_feature import AncillaryFeature
|
|
161
|
-
assert feature_exists(name)
|
|
162
164
|
if name in feat_const.feature_name2label:
|
|
163
165
|
label = feat_const.feature_name2label[name]
|
|
166
|
+
elif ML_SCORE_REGEX.match(name):
|
|
167
|
+
# use a generic name for machine-learning features
|
|
168
|
+
label = f"ML score {name[-3:].upper()}"
|
|
164
169
|
else:
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
labelid = af.data.outputs.index(name)
|
|
170
|
-
label = af.data.output_labels[labelid]
|
|
171
|
-
break
|
|
172
|
-
else:
|
|
173
|
-
# If that did not work, use a generic name.
|
|
174
|
-
label = "ML score {}".format(name[-3:].upper())
|
|
170
|
+
exists = feature_exists(name)
|
|
171
|
+
msg = f"Could not find label for '{name}'"
|
|
172
|
+
msg += " (feature does not exist)" if not exists else ""
|
|
173
|
+
raise ValueError(msg)
|
|
175
174
|
if not with_unit:
|
|
176
175
|
if label.endswith("]") and label.count("["):
|
|
177
176
|
label = label.rsplit("[", 1)[0].strip()
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
dclab/rtdc_dataset/core.py
CHANGED
|
@@ -835,9 +835,9 @@ class RTDCBase(abc.ABC):
|
|
|
835
835
|
identifier = self.config.get("experiment", {}).get("run identifier",
|
|
836
836
|
None)
|
|
837
837
|
if identifier is None:
|
|
838
|
-
time = self.config.get("experiment", {}).get("time", None)
|
|
839
|
-
date = self.config.get("experiment", {}).get("date", None)
|
|
840
|
-
sid = self.config.get("setup", {}).get("identifier", None)
|
|
838
|
+
time = self.config.get("experiment", {}).get("time", None) or None
|
|
839
|
+
date = self.config.get("experiment", {}).get("date", None) or None
|
|
840
|
+
sid = self.config.get("setup", {}).get("identifier", None) or None
|
|
841
841
|
if None not in [time, date, sid]:
|
|
842
842
|
# only compute an identifier if all of the above are defined.
|
|
843
843
|
hasher = hashlib.md5(f"{time}_{date}_{sid}".encode("utf-8"))
|
dclab/rtdc_dataset/export.py
CHANGED
|
@@ -334,8 +334,8 @@ class Export(object):
|
|
|
334
334
|
# Define a new measurement identifier, so that we are not running
|
|
335
335
|
# into any problems with basins being defined for filtered data.
|
|
336
336
|
ds_run_id = ds.get_measurement_identifier()
|
|
337
|
-
random_ap = str(uuid.uuid4())[:
|
|
338
|
-
meta["experiment"]["run identifier"] = f"{ds_run_id}
|
|
337
|
+
random_ap = f"dclab-{str(uuid.uuid4())[:7]}"
|
|
338
|
+
meta["experiment"]["run identifier"] = f"{ds_run_id}_{random_ap}"
|
|
339
339
|
|
|
340
340
|
if filtered:
|
|
341
341
|
filter_arr = ds.filter.all
|
dclab/rtdc_dataset/feat_basin.py
CHANGED
|
@@ -458,22 +458,30 @@ class Basin(abc.ABC):
|
|
|
458
458
|
if not self._measurement_identifier_verified:
|
|
459
459
|
if self.measurement_identifier is None:
|
|
460
460
|
# No measurement identifier was presented by the
|
|
461
|
-
# referencing dataset.
|
|
461
|
+
# referencing dataset. We are in the dark.
|
|
462
|
+
# Don't perform any checks.
|
|
462
463
|
self._measurement_identifier_verified = True
|
|
463
464
|
else:
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
465
|
+
# This is the measurement identifier of the basin.
|
|
466
|
+
basin_identifier = self.get_measurement_identifier()
|
|
467
|
+
if basin_identifier is None:
|
|
468
|
+
# Again, we are in the dark, because the basin dataset
|
|
469
|
+
# does not have an identifier. This is an undesirable
|
|
470
|
+
# situation, but there is nothing we can do about it.
|
|
471
|
+
self._measurement_identifier_verified = True
|
|
468
472
|
else:
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
473
|
+
if self.mapping == "same":
|
|
474
|
+
# When we have identical mapping, then the
|
|
475
|
+
# measurement identifier has to match exactly.
|
|
476
|
+
verifier = str.__eq__
|
|
477
|
+
else:
|
|
478
|
+
# When we have non-identical mapping (e.g. exported
|
|
479
|
+
# data), then the measurement identifier has to
|
|
480
|
+
# partially match.
|
|
481
|
+
verifier = str.startswith
|
|
482
|
+
self._measurement_identifier_verified = verifier(
|
|
483
|
+
self.measurement_identifier, basin_identifier)
|
|
484
|
+
|
|
477
485
|
check_rid = self._measurement_identifier_verified
|
|
478
486
|
else:
|
|
479
487
|
check_rid = True
|
|
@@ -538,8 +546,12 @@ class BasinProxy:
|
|
|
538
546
|
|
|
539
547
|
def __getitem__(self, feat):
|
|
540
548
|
if feat not in self._features:
|
|
541
|
-
|
|
542
|
-
|
|
549
|
+
if feat == "contour":
|
|
550
|
+
raise NotImplementedError("Feature 'contour' cannot be "
|
|
551
|
+
"handled by BasinProxy.")
|
|
552
|
+
else:
|
|
553
|
+
feat_obj = BasinProxyFeature(feat_obj=self.ds[feat],
|
|
554
|
+
basinmap=self.basinmap)
|
|
543
555
|
self._features[feat] = feat_obj
|
|
544
556
|
return self._features[feat]
|
|
545
557
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dclab
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.65.0
|
|
4
4
|
Summary: Library for real-time deformability cytometry (RT-DC)
|
|
5
5
|
Author: Benedikt Hartmann, Eoghan O'Connell, Maik Herbig, Maximilian Schlögel, Nadia Sbaa, Paul Müller, Philipp Rosendahl, Raghava Alajangi
|
|
6
6
|
Maintainer-email: Paul Müller <dev@craban.de>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
dclab/__init__.py,sha256=kSr6VI0UI-beS9beOEpERTUAV1NINHx_G6u1VmBm9D8,1624
|
|
2
|
-
dclab/_version.py,sha256=
|
|
2
|
+
dclab/_version.py,sha256=_mxGrRjXWiOF95UUEGVhRBBil-513LRs9VvSfA91XWs,534
|
|
3
3
|
dclab/cached.py,sha256=t01BYTf43VEsBYa0c-bMxgceF5vKoGV73b42UlLH6Lo,3014
|
|
4
|
-
dclab/downsampling.cp310-win_amd64.pyd,sha256=
|
|
4
|
+
dclab/downsampling.cp310-win_amd64.pyd,sha256=C4wSBuvQLqGUfuDmdiHKBTbGsN-oF9mQ5Cp4ybo3uao,174080
|
|
5
5
|
dclab/downsampling.pyx,sha256=Ez6MbNbzCUzs2IXXKtAYsjtYqP22kI8hdA1IE-3mqvY,7488
|
|
6
6
|
dclab/http_utils.py,sha256=aIW4ATmyk02AjQmoTm7mAWdsaQD1siEPLx47IlEcYls,11234
|
|
7
7
|
dclab/kde_contours.py,sha256=cYeBtvbBqLHCz5W8AiEAAd9O3yLsSBbLcRVj1WZ1pRo,288
|
|
@@ -21,7 +21,7 @@ dclab/cli/task_tdms2rtdc.py,sha256=5YjDCLl9NoZMbeZtl7csH5qx_8dvzF3p-8ndsneOhBI,8
|
|
|
21
21
|
dclab/cli/task_verify_dataset.py,sha256=OFy7aWHvA6NInndnMBg0MVZSBibvJeNHhc_C79_9PAk,2780
|
|
22
22
|
dclab/definitions/__init__.py,sha256=cubgnqpBbPgk_c1_uUPggRsmtUd-baV1haybLqbMf8k,2860
|
|
23
23
|
dclab/definitions/feat_const.py,sha256=I772sd6aSNv8PzhT9MHnNKbGhx6ZJt3z3_FVs5oxMtw,9836
|
|
24
|
-
dclab/definitions/feat_logic.py,sha256=
|
|
24
|
+
dclab/definitions/feat_logic.py,sha256=ZZlf3-uze5qFvRtlTHJQZmE9mTF3L7TMyk8YTnCCRzw,5561
|
|
25
25
|
dclab/definitions/meta_const.py,sha256=X3U3orhlY_i78TYN4DUBJaOGBltNnXaRsQauH1LxuJ0,13377
|
|
26
26
|
dclab/definitions/meta_logic.py,sha256=no6fTCmKFrwpmirs_9358-Ysh5aZeib1xJrL_30WkqU,4305
|
|
27
27
|
dclab/definitions/meta_parse.py,sha256=UtgSm7hkfqnyj6FAbDmctbXqfZOHU9d4uoMf3EcYWtQ,2487
|
|
@@ -35,14 +35,14 @@ dclab/external/packaging/version.py,sha256=NgEgv7me4UCvFMyiNYD-nc_28b9UHUvBVh8RD
|
|
|
35
35
|
dclab/external/skimage/LICENSE,sha256=Tdv08zzxYV32WRdYnco9P3nVyS5w17OTxIAFeRSd1wc,1480
|
|
36
36
|
dclab/external/skimage/__init__.py,sha256=icOIlThkyn_hxmnM_i7OpbU7fhvqYWNpGdNGD38qthU,74
|
|
37
37
|
dclab/external/skimage/_find_contours.py,sha256=auRMNfZg7B73DX7kPXxgD8gMXXB3Lk9QDWt4wlQnUWg,9556
|
|
38
|
-
dclab/external/skimage/_find_contours_cy.cp310-win_amd64.pyd,sha256=
|
|
38
|
+
dclab/external/skimage/_find_contours_cy.cp310-win_amd64.pyd,sha256=05dRdui2WfHhrDA1LjcOgq50458ezuqqQ_TlASgwUnY,136704
|
|
39
39
|
dclab/external/skimage/_find_contours_cy.pyx,sha256=c-EobLhKjZNCpuqWxmvrcH35uAY_Bu-_hZiUHbXODms,7349
|
|
40
|
-
dclab/external/skimage/_pnpoly.cp310-win_amd64.pyd,sha256=
|
|
40
|
+
dclab/external/skimage/_pnpoly.cp310-win_amd64.pyd,sha256=TcwABtRSlww31gsxwYGI-hMoUZm8hWFl_yCNlEDFqIY,150016
|
|
41
41
|
dclab/external/skimage/_pnpoly.pyx,sha256=eHV3DlIGcBhAQ12-Y58EYq8xcq0Sibyc4xTxzX9NJsk,2603
|
|
42
42
|
dclab/external/skimage/measure.py,sha256=rzyI0HCr9O9GJNieVW8pcqDjTGRAdSehDUawD8QkIAE,254
|
|
43
43
|
dclab/external/skimage/pnpoly.py,sha256=zB4rSxjHJyY1OsGZ7QfFQqxIEDLGK8CWPehwutoFqm4,1400
|
|
44
44
|
dclab/external/skimage/_shared/__init__.py,sha256=q29esTsNh0HfQxcd2EuwdYNbEBJwo_qY4dfv7RihzoA,38
|
|
45
|
-
dclab/external/skimage/_shared/geometry.cp310-win_amd64.pyd,sha256=
|
|
45
|
+
dclab/external/skimage/_shared/geometry.cp310-win_amd64.pyd,sha256=wfOnppHCysMnJF2X3RjNy38znrsHRJjMGwqzpq4FAHI,19968
|
|
46
46
|
dclab/external/skimage/_shared/geometry.pxd,sha256=3gJ7fbXXsxJunSN4biE0dzEbZpX9ZqzR4cUDDN0JnAU,352
|
|
47
47
|
dclab/external/skimage/_shared/geometry.pyx,sha256=b6hADE8chse63haO1Kdt13_oQ54J9tkBf7dVA22-s-M,1722
|
|
48
48
|
dclab/external/statsmodels/LICENSE,sha256=8D7nwukc6YgsZCdN9mG0psM3I9j-z8fuUgFyVhnMXpU,1672
|
|
@@ -87,9 +87,9 @@ dclab/rtdc_dataset/__init__.py,sha256=BuWKEUm7QUe-Kj1wMR0AXON_XN2mzXlbOgouHdnvAw
|
|
|
87
87
|
dclab/rtdc_dataset/check.py,sha256=l2QoIL3gno_Z2-e8RvYHAurHZP_oLGtZk8l6jUDiuTA,35908
|
|
88
88
|
dclab/rtdc_dataset/config.py,sha256=HVJiqKlqd-SpYqnNTKSr1yUsq2Bkfq5s5zluT-8PUc0,17965
|
|
89
89
|
dclab/rtdc_dataset/copier.py,sha256=imD0ijAz9BY0nksF2zUBeoGmeo_dUTUnBgY9TqRaD4g,14528
|
|
90
|
-
dclab/rtdc_dataset/core.py,sha256=
|
|
91
|
-
dclab/rtdc_dataset/export.py,sha256=
|
|
92
|
-
dclab/rtdc_dataset/feat_basin.py,sha256=
|
|
90
|
+
dclab/rtdc_dataset/core.py,sha256=jOE21lhOC3ViA68QiykGVOs437SlCotTYRTcA9Tk2MQ,35671
|
|
91
|
+
dclab/rtdc_dataset/export.py,sha256=tjJjP9Scg-ak0fI7wmmRuFEm4-h_1fkj9N6__VF8P44,34261
|
|
92
|
+
dclab/rtdc_dataset/feat_basin.py,sha256=nMDw5T_lvhbllG1SmCy6dBrOc5yeNp7eX0uWyTTE1tY,27618
|
|
93
93
|
dclab/rtdc_dataset/feat_temp.py,sha256=5QiF8Nc8MVoTtinYlvfoSuoopND-uvWVWKjMggBTHLw,3796
|
|
94
94
|
dclab/rtdc_dataset/filter.py,sha256=IRaEUt0tWtZGLKYvtqzfYO2kN5yhqx9eLoHd3VOLCTE,10286
|
|
95
95
|
dclab/rtdc_dataset/fmt_dict.py,sha256=-tlzOwsOCh4Vt3rSiBUvMKW7vBgrRNubU7ZHdGMB3gE,3112
|
|
@@ -134,9 +134,9 @@ dclab/rtdc_dataset/fmt_tdms/event_mask.py,sha256=cW-Tw2PIe6X1Hc4UZJ22-mI_qFaIMWA
|
|
|
134
134
|
dclab/rtdc_dataset/fmt_tdms/event_trace.py,sha256=ktWnXfMir1v5Wfeo7tOd0txSOe1bgsXotf9Ul5T5-B4,5361
|
|
135
135
|
dclab/rtdc_dataset/fmt_tdms/exc.py,sha256=FfxUY4LGIMPGJTYmGITmEm7X5iu8GBsj7OfZR8Zb-IE,850
|
|
136
136
|
dclab/rtdc_dataset/fmt_tdms/naming.py,sha256=SFeWiwIN7sg0qNe0Aya2bZshN1Zbw4YcOKunZ6kfIGM,5524
|
|
137
|
-
dclab-0.
|
|
138
|
-
dclab-0.
|
|
139
|
-
dclab-0.
|
|
140
|
-
dclab-0.
|
|
141
|
-
dclab-0.
|
|
142
|
-
dclab-0.
|
|
137
|
+
dclab-0.65.0.dist-info/licenses/LICENSE,sha256=Aq3cYb2xLk3Y_aIOhaoZxi8FlVeMVs3-3FMEBvAEixM,15643
|
|
138
|
+
dclab-0.65.0.dist-info/METADATA,sha256=uAUuKYkN9sH3Ii8cZsuM4bc5cL4p8ssKpTMZKFao00E,4913
|
|
139
|
+
dclab-0.65.0.dist-info/WHEEL,sha256=KUuBC6lxAbHCKilKua8R9W_TM71_-9Sg5uEP3uDWcoU,101
|
|
140
|
+
dclab-0.65.0.dist-info/entry_points.txt,sha256=eOpjgznu-eW-9utUpLU-77O5098YyUEgGF3ksGMdtec,273
|
|
141
|
+
dclab-0.65.0.dist-info/top_level.txt,sha256=irvwZMgs1edY1Zj60ZFk7Almb9Zhk4k6E6aC4YPFnnM,6
|
|
142
|
+
dclab-0.65.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|