dclab 0.64.0__cp312-cp312-musllinux_1_2_x86_64.whl → 0.64.1__cp312-cp312-musllinux_1_2_x86_64.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/downsampling.cpython-312-x86_64-linux-musl.so +0 -0
- dclab/external/skimage/_find_contours_cy.cpython-312-x86_64-linux-musl.so +0 -0
- dclab/external/skimage/_pnpoly.cpython-312-x86_64-linux-musl.so +0 -0
- dclab/external/skimage/_shared/geometry.cpython-312-x86_64-linux-musl.so +0 -0
- dclab/kde/base.py +84 -1
- dclab/statistics.py +27 -4
- {dclab-0.64.0.dist-info → dclab-0.64.1.dist-info}/METADATA +2 -2
- {dclab-0.64.0.dist-info → dclab-0.64.1.dist-info}/RECORD +13 -13
- {dclab-0.64.0.dist-info → dclab-0.64.1.dist-info}/WHEEL +1 -1
- {dclab-0.64.0.dist-info → dclab-0.64.1.dist-info}/entry_points.txt +0 -0
- {dclab-0.64.0.dist-info → dclab-0.64.1.dist-info}/licenses/LICENSE +0 -0
- {dclab-0.64.0.dist-info → dclab-0.64.1.dist-info}/top_level.txt +0 -0
dclab/_version.py
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
dclab/kde/base.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import warnings
|
|
2
2
|
|
|
3
3
|
import numpy as np
|
|
4
|
+
from scipy.interpolate import RegularGridInterpolator as RGI
|
|
4
5
|
|
|
5
6
|
from .methods import bin_width_doane_div5, get_bad_vals, methods
|
|
6
7
|
from .contours import find_contours_level, get_quantile_levels
|
|
@@ -316,6 +317,8 @@ class KernelDensityEstimator:
|
|
|
316
317
|
yscale="linear"):
|
|
317
318
|
"""Evaluate the kernel density estimate for scatter plots
|
|
318
319
|
|
|
320
|
+
The KDE is evaluated with the `kde_type` function for every point.
|
|
321
|
+
|
|
319
322
|
Parameters
|
|
320
323
|
----------
|
|
321
324
|
xax: str
|
|
@@ -332,7 +335,7 @@ class KernelDensityEstimator:
|
|
|
332
335
|
Additional keyword arguments to the KDE method
|
|
333
336
|
xscale: str
|
|
334
337
|
If set to "log", take the logarithm of the x-values before
|
|
335
|
-
computing the KDE. This is useful when data are
|
|
338
|
+
computing the KDE. This is useful when data are
|
|
336
339
|
displayed on a log-scale. Defaults to "linear".
|
|
337
340
|
yscale: str
|
|
338
341
|
See `xscale`.
|
|
@@ -374,3 +377,83 @@ class KernelDensityEstimator:
|
|
|
374
377
|
density = np.array([])
|
|
375
378
|
|
|
376
379
|
return density
|
|
380
|
+
|
|
381
|
+
def get_at(self, xax="area_um", yax="deform", positions=None,
|
|
382
|
+
kde_type="histogram", kde_kwargs=None, xscale="linear",
|
|
383
|
+
yscale="linear"):
|
|
384
|
+
"""Evaluate the kernel density estimate for specific events
|
|
385
|
+
|
|
386
|
+
The KDE is computed via linear interpolation from the output
|
|
387
|
+
of `get_raster`.
|
|
388
|
+
|
|
389
|
+
Parameters
|
|
390
|
+
----------
|
|
391
|
+
xax: str
|
|
392
|
+
Identifier for X axis (e.g. "area_um", "aspect", "deform")
|
|
393
|
+
yax: str
|
|
394
|
+
Identifier for Y axis
|
|
395
|
+
positions: list of two 1d ndarrays or ndarray of shape (2, N)
|
|
396
|
+
The positions where the KDE will be computed. Note that
|
|
397
|
+
the KDE estimate is computed from the points that
|
|
398
|
+
are set in `self.rtdc_ds.filter.all`.
|
|
399
|
+
kde_type: str
|
|
400
|
+
The KDE method to use, see :const:`.kde_methods.methods`
|
|
401
|
+
kde_kwargs: dict
|
|
402
|
+
Additional keyword arguments to the KDE method
|
|
403
|
+
xscale: str
|
|
404
|
+
If set to "log", take the logarithm of the x-values before
|
|
405
|
+
computing the KDE. This is useful when data are
|
|
406
|
+
displayed on a log-scale. Defaults to "linear".
|
|
407
|
+
yscale: str
|
|
408
|
+
See `xscale`.
|
|
409
|
+
|
|
410
|
+
Returns
|
|
411
|
+
-------
|
|
412
|
+
density : 1d ndarray
|
|
413
|
+
The kernel density evaluated for the filtered events.
|
|
414
|
+
"""
|
|
415
|
+
if kde_kwargs is None:
|
|
416
|
+
kde_kwargs = {}
|
|
417
|
+
xax = xax.lower()
|
|
418
|
+
yax = yax.lower()
|
|
419
|
+
kde_type = kde_type.lower()
|
|
420
|
+
if kde_type not in methods:
|
|
421
|
+
raise ValueError(f"Not a valid kde type: {kde_type}!")
|
|
422
|
+
|
|
423
|
+
# Get data
|
|
424
|
+
x = self.rtdc_ds[xax][self.rtdc_ds.filter.all]
|
|
425
|
+
y = self.rtdc_ds[yax][self.rtdc_ds.filter.all]
|
|
426
|
+
|
|
427
|
+
# Apply scale (no change for linear scale)
|
|
428
|
+
xs = self.apply_scale(x, xscale, xax)
|
|
429
|
+
ys = self.apply_scale(y, yscale, yax)
|
|
430
|
+
|
|
431
|
+
if positions:
|
|
432
|
+
xs = self.apply_scale(positions[0], xscale, xax)
|
|
433
|
+
ys = self.apply_scale(positions[1], yscale, yax)
|
|
434
|
+
|
|
435
|
+
if len(x):
|
|
436
|
+
xr, yr, density_grid = self.get_raster(xax=xax,
|
|
437
|
+
yax=yax,
|
|
438
|
+
kde_type=kde_type,
|
|
439
|
+
kde_kwargs=kde_kwargs,
|
|
440
|
+
xscale=xscale,
|
|
441
|
+
yscale=yscale)
|
|
442
|
+
|
|
443
|
+
# Apply scale (no change for linear scale)
|
|
444
|
+
xrs = self.apply_scale(xr, xscale, xax)
|
|
445
|
+
yrs = self.apply_scale(yr, yscale, yax)
|
|
446
|
+
|
|
447
|
+
# 'scipy.interp2d' has been removed in SciPy 1.14.0
|
|
448
|
+
# https://scipy.github.io/devdocs/tutorial/interpolate/interp_transition_guide.html
|
|
449
|
+
interp_func = RGI((xrs[:, 0], yrs[0, :]),
|
|
450
|
+
density_grid,
|
|
451
|
+
method="linear",
|
|
452
|
+
bounds_error=False,
|
|
453
|
+
fill_value=np.nan)
|
|
454
|
+
density = interp_func((xs, ys))
|
|
455
|
+
|
|
456
|
+
else:
|
|
457
|
+
density = np.array([])
|
|
458
|
+
|
|
459
|
+
return density
|
dclab/statistics.py
CHANGED
|
@@ -86,7 +86,7 @@ def flow_rate(ds):
|
|
|
86
86
|
return np.nan
|
|
87
87
|
|
|
88
88
|
|
|
89
|
-
def get_statistics(ds, methods=None, features=None):
|
|
89
|
+
def get_statistics(ds, methods=None, features=None, ret_dict=False):
|
|
90
90
|
"""Compute statistics for an RT-DC dataset
|
|
91
91
|
|
|
92
92
|
Parameters
|
|
@@ -96,13 +96,16 @@ def get_statistics(ds, methods=None, features=None):
|
|
|
96
96
|
methods: list of str or None
|
|
97
97
|
The methods wih which to compute the statistics.
|
|
98
98
|
The list of available methods is given with
|
|
99
|
-
|
|
99
|
+
:func:`.available_methods.keys`
|
|
100
100
|
If set to `None`, statistics for all methods are computed.
|
|
101
101
|
features: list of str
|
|
102
102
|
Feature name identifiers are defined by
|
|
103
|
-
|
|
103
|
+
:func:`dclab.definitions.feature_exists`.
|
|
104
104
|
If set to `None`, statistics for all scalar features
|
|
105
105
|
available are computed.
|
|
106
|
+
ret_dict: bool
|
|
107
|
+
Instead of returning ``(header, values)``, return a dictionary
|
|
108
|
+
with headers as keys.
|
|
106
109
|
|
|
107
110
|
Returns
|
|
108
111
|
-------
|
|
@@ -148,7 +151,10 @@ def get_statistics(ds, methods=None, features=None):
|
|
|
148
151
|
label = dfn.get_feature_label(ft, rtdc_ds=ds)
|
|
149
152
|
header.append(" ".join([mt, label]))
|
|
150
153
|
|
|
151
|
-
|
|
154
|
+
if ret_dict:
|
|
155
|
+
return dict(zip(header, values))
|
|
156
|
+
else:
|
|
157
|
+
return header, values
|
|
152
158
|
|
|
153
159
|
|
|
154
160
|
def mode(data):
|
|
@@ -191,7 +197,24 @@ def mode(data):
|
|
|
191
197
|
# Register all the methods
|
|
192
198
|
# Methods that require an axis
|
|
193
199
|
Statistics(name="Mean", req_feature=True, method=np.average)
|
|
200
|
+
# Premature-Optimization warning: `np.percentile` also accepts an array
|
|
201
|
+
# of percentiles as the `q` argument, which I would expect to yield better
|
|
202
|
+
# performance than computing percentiles individually. Implementing this
|
|
203
|
+
# would break the way we are defining statistical methods here (One
|
|
204
|
+
# `Statistics` instance per method) and thus requires a considerable
|
|
205
|
+
# amount of work (much more work than writing this text here). It would
|
|
206
|
+
# also make understanding the code more difficult. In addition, computing
|
|
207
|
+
# statistics is not done often and is extremely fast anyway for a few
|
|
208
|
+
# millions of events. Don't optimize this!
|
|
209
|
+
Statistics(name="10th Percentile", req_feature=True,
|
|
210
|
+
method=lambda data: np.percentile(data, 10))
|
|
211
|
+
Statistics(name="25th Percentile", req_feature=True,
|
|
212
|
+
method=lambda data: np.percentile(data, 25))
|
|
194
213
|
Statistics(name="Median", req_feature=True, method=np.median)
|
|
214
|
+
Statistics(name="75th Percentile", req_feature=True,
|
|
215
|
+
method=lambda data: np.percentile(data, 75))
|
|
216
|
+
Statistics(name="90th Percentile", req_feature=True,
|
|
217
|
+
method=lambda data: np.percentile(data, 90))
|
|
195
218
|
Statistics(name="Mode", req_feature=True, method=mode)
|
|
196
219
|
Statistics(name="SD", req_feature=True, method=np.std)
|
|
197
220
|
# Methods that work on RTDCBase
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dclab
|
|
3
|
-
Version: 0.64.
|
|
3
|
+
Version: 0.64.1
|
|
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>
|
|
7
|
-
License: GPL-2.0-or-later
|
|
7
|
+
License-Expression: GPL-2.0-or-later
|
|
8
8
|
Project-URL: source, https://github.com/DC-Analysis/dclab
|
|
9
9
|
Project-URL: tracker, https://github.com/DC-Analysis/dclab/issues
|
|
10
10
|
Project-URL: documentation, https://dclab.readthedocs.io/en/stable/
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
dclab/__init__.py,sha256=wyJWhElQRPcq09vUqUnuquTU_KHgHxv6wQxuxQ988Iw,1583
|
|
2
|
-
dclab/_version.py,sha256=
|
|
2
|
+
dclab/_version.py,sha256=9r4reeZylDKkIG06-4LPXZLfHirJkjSSEYOAOeaEme8,513
|
|
3
3
|
dclab/cached.py,sha256=eWTYBiI-HQM7JuPH-oxa5LLnhAX32GpRwlYg2kQ3sTA,2917
|
|
4
|
-
dclab/downsampling.cpython-312-x86_64-linux-musl.so,sha256=
|
|
4
|
+
dclab/downsampling.cpython-312-x86_64-linux-musl.so,sha256=ylBT62biUCykwIsBSgQMD6RkoGCroWazU_NGmF2FOC8,1558752
|
|
5
5
|
dclab/downsampling.pyx,sha256=OK7zbgGLl5gVyoU8ZBHo9EWwb8C9ChavmLNEvQvC9T0,7258
|
|
6
6
|
dclab/http_utils.py,sha256=XHicbHQts5LY3zSNmYqNgAZpKTktotEiwQgJ8d2sBlk,10912
|
|
7
7
|
dclab/kde_contours.py,sha256=UlU64lrzMQUZH11oZndW7xf7NFCzwP3FcVujwuqXDCI,278
|
|
8
8
|
dclab/kde_methods.py,sha256=f0-zDN7ETintvGB3gSzxwgBb53YtT9jZtzI70EAX50g,365
|
|
9
9
|
dclab/polygon_filter.py,sha256=qexmo-rXe06CUPZhN6EMJy4y4B5gXZeqejdvIB2arOE,13480
|
|
10
|
-
dclab/statistics.py,sha256=
|
|
10
|
+
dclab/statistics.py,sha256=DWBG_Kj7cn89b_s5mqWYDCMGB881jHcCRFY-KAOBnhE,7598
|
|
11
11
|
dclab/util.py,sha256=HFT5ZQV6AW8GIIruVMldukbVVdlMyKH50GUfOogAcxI,5860
|
|
12
12
|
dclab/warn.py,sha256=MjJvyQeuvIXFQ2-fHDzbmXJ0scnHqqRJlIxfuLI_utE,523
|
|
13
13
|
dclab/cli/__init__.py,sha256=84YzzV6aE_NY-o7wvqgvUoxBLvIOEXpSUbkVcGRyzQ0,483
|
|
@@ -35,14 +35,14 @@ dclab/external/packaging/version.py,sha256=9MLL6_EYHvGA1yCGndwL5ZmmDA_wqQsW15GyK
|
|
|
35
35
|
dclab/external/skimage/LICENSE,sha256=ivsSBvn3c0R9mOctWRRdza7C7wdZSRYgCVxlVqUdlB8,1452
|
|
36
36
|
dclab/external/skimage/__init__.py,sha256=-B2QUKHAFzQuBWuuKvPDC5JIl0Zb-x3OGmbwPaE9VwQ,72
|
|
37
37
|
dclab/external/skimage/_find_contours.py,sha256=16v5eeTZBmevG8SSuXtJ6yUpVPhwfSmtc8pDD0nuuOU,9340
|
|
38
|
-
dclab/external/skimage/_find_contours_cy.cpython-312-x86_64-linux-musl.so,sha256=
|
|
38
|
+
dclab/external/skimage/_find_contours_cy.cpython-312-x86_64-linux-musl.so,sha256=XpYGJs9UzuepElv0IIU3vcZX6Tjm1hSGI1bbbmEGNP8,1205472
|
|
39
39
|
dclab/external/skimage/_find_contours_cy.pyx,sha256=pZJOBhMHzYEMkcz4WQVyjn7jDNrdjCfet47FU1hRAxk,7161
|
|
40
|
-
dclab/external/skimage/_pnpoly.cpython-312-x86_64-linux-musl.so,sha256=
|
|
40
|
+
dclab/external/skimage/_pnpoly.cpython-312-x86_64-linux-musl.so,sha256=M6c1x8K-mTLUed1W7IrBBMkXD1iIKUFYjKqhlffF4M0,1272384
|
|
41
41
|
dclab/external/skimage/_pnpoly.pyx,sha256=Qdn6xPazDschBqbr46DzB75MB2MnqvdnoTSBMK7kUGE,2504
|
|
42
42
|
dclab/external/skimage/measure.py,sha256=y1idCqD9TUxp3-QnOiWR_d674OKaeqBJ4MN2-gVP6ro,247
|
|
43
43
|
dclab/external/skimage/pnpoly.py,sha256=r8hFNiTz5XlUoNZjosqA0iyv1FPn0l7ewbplgFgkdaw,1347
|
|
44
44
|
dclab/external/skimage/_shared/__init__.py,sha256=2sHZwTtJSlMTa3Q2YSvQW7jrPLMUSqDJQa-ROe5zfcw,37
|
|
45
|
-
dclab/external/skimage/_shared/geometry.cpython-312-x86_64-linux-musl.so,sha256=
|
|
45
|
+
dclab/external/skimage/_shared/geometry.cpython-312-x86_64-linux-musl.so,sha256=_BOWuGXj6LjBAcOmQDE2IvvO-QRi8a5jW57CKg3PBLg,67712
|
|
46
46
|
dclab/external/skimage/_shared/geometry.pxd,sha256=kRsu9ifv_rL3kbRIgSLf86p0hn2oTMp6s013lZ9bBZM,346
|
|
47
47
|
dclab/external/skimage/_shared/geometry.pyx,sha256=miCHUh6mBDbRRIoaF_0xAER1MRzsCAzFdlYQZhV7RmE,1667
|
|
48
48
|
dclab/external/statsmodels/LICENSE,sha256=JCyTeA3bPAyFsOpDoSVZjoui7Lu1XTrcAuf0eClKvV0,1637
|
|
@@ -76,7 +76,7 @@ dclab/isoelastics/iso_LE-2D-FEM-19-area_um-deform.txt,sha256=lcTjUUnIwj_bVBrG2T2
|
|
|
76
76
|
dclab/isoelastics/iso_LE-2D-FEM-19-volume-deform.txt,sha256=vTcazOlOXo3BQ0NQtGB_IdHKA0neOLXZ_d3JuMU--RE,83358
|
|
77
77
|
dclab/isoelastics/iso_LE-2D-ana-18-area_um-deform.txt,sha256=KD2RkhCfkrna20pLJ3UzNZZapMkhQydMYz0iKdMtRRE,46805
|
|
78
78
|
dclab/kde/__init__.py,sha256=_WSLPMfxE2su6tmO5mJxUE_9ON16-pqQUQCUlzRtyKI,55
|
|
79
|
-
dclab/kde/base.py,sha256=
|
|
79
|
+
dclab/kde/base.py,sha256=w0or7ix8hnK-xqtGSyhyn48YUo55WnEEPsBjWrJna9s,16196
|
|
80
80
|
dclab/kde/contours.py,sha256=WoRqBj_xK-23FZjtaYly7E2Q8sGZ16q2ILq-DmrlmC8,6742
|
|
81
81
|
dclab/kde/methods.py,sha256=8g4lYUKYqt2pdA9efHVRBDCUUzmePmWPp6rljtJ0XD8,9438
|
|
82
82
|
dclab/lme4/__init__.py,sha256=5WPFMTK-Yia3NJuwZEEBQ3fCyW3DiFgpZFrAwU33TV4,272
|
|
@@ -134,9 +134,9 @@ dclab/rtdc_dataset/fmt_tdms/event_mask.py,sha256=eZiDHAGG3MCVckEMHsV-YBbL-pETVLo
|
|
|
134
134
|
dclab/rtdc_dataset/fmt_tdms/event_trace.py,sha256=Vkym0QKSw2mq1XZl5n8wDkgHXmaZwQGiMAV5AuRSJkE,5215
|
|
135
135
|
dclab/rtdc_dataset/fmt_tdms/exc.py,sha256=WzrMqnyrzp8gsT8Pf7JKqGGv43ewx7d_qgtirURppRI,813
|
|
136
136
|
dclab/rtdc_dataset/fmt_tdms/naming.py,sha256=biI9l1EO6BuSYgwZG0deacj4i1fMHQcW78AKXEcm5Wc,5373
|
|
137
|
-
dclab-0.64.
|
|
138
|
-
dclab-0.64.
|
|
139
|
-
dclab-0.64.
|
|
140
|
-
dclab-0.64.
|
|
141
|
-
dclab-0.64.
|
|
142
|
-
dclab-0.64.
|
|
137
|
+
dclab-0.64.1.dist-info/METADATA,sha256=WoNkTGPhcp_6fJpJQ2r9HPAJoxE_lRtwE4mQGj56tCE,4766
|
|
138
|
+
dclab-0.64.1.dist-info/WHEEL,sha256=AwHYJA1Do1jwgPIoLQR4DiHSeYY_vU6Ht9Vljq5Yt_M,112
|
|
139
|
+
dclab-0.64.1.dist-info/entry_points.txt,sha256=eOpjgznu-eW-9utUpLU-77O5098YyUEgGF3ksGMdtec,273
|
|
140
|
+
dclab-0.64.1.dist-info/top_level.txt,sha256=irvwZMgs1edY1Zj60ZFk7Almb9Zhk4k6E6aC4YPFnnM,6
|
|
141
|
+
dclab-0.64.1.dist-info/RECORD,,
|
|
142
|
+
dclab-0.64.1.dist-info/licenses/LICENSE,sha256=gLDaVZWRrlnLdyfOrR0qfWjLbOVcjvoJ-kCLUK0fyXA,15360
|
|
File without changes
|
|
File without changes
|
|
File without changes
|