dclab 0.62.7__cp38-cp38-macosx_11_0_arm64.whl → 2.18.0__cp38-cp38-macosx_11_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.

Potentially problematic release.


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

@@ -3,7 +3,6 @@ import warnings
3
3
 
4
4
  import numpy as np
5
5
 
6
- from ...util import copy_if_needed
7
6
  from .mapper import map_indices_child2parent
8
7
 
9
8
 
@@ -38,7 +37,7 @@ class ChildNDArray(ChildBase):
38
37
  super(ChildNDArray, self).__init__(child)
39
38
  self.feat = feat
40
39
 
41
- def __array__(self, dtype=None, copy=copy_if_needed, *args, **kwargs):
40
+ def __array__(self, dtype=None, copy=False, *args, **kwargs):
42
41
  warnings.warn("Please avoid calling the `__array__` method of the "
43
42
  "`ChildNDArray`. It may consume a lot of memory. "
44
43
  "Consider using a generator instead.",
@@ -70,7 +69,7 @@ class ChildScalar(np.lib.mixins.NDArrayOperatorsMixin):
70
69
  self._ufunc_attrs = {}
71
70
  self.ndim = 1 # matplotlib might expect this from an array
72
71
 
73
- def __array__(self, dtype=None, copy=copy_if_needed, *args, **kwargs):
72
+ def __array__(self, dtype=None, copy=False, *args, **kwargs):
74
73
  if self._array is None:
75
74
  hparent = self.child.hparent
76
75
  filt_arr = hparent.filter.all
@@ -122,7 +121,7 @@ class ChildTraceItem(ChildBase):
122
121
  super(ChildTraceItem, self).__init__(child)
123
122
  self.flname = flname
124
123
 
125
- def __array__(self, dtype=None, copy=copy_if_needed, *args, **kwargs):
124
+ def __array__(self, dtype=None, copy=False, *args, **kwargs):
126
125
  warnings.warn("Please avoid calling the `__array__` method of the "
127
126
  "`ChildTraceItem`. It may consume a lot of memory. "
128
127
  "Consider using a generator instead.",
@@ -0,0 +1,124 @@
1
+ """Tools for linking HDF5 datasets across files"""
2
+ from __future__ import annotations
3
+
4
+ import io
5
+ import pathlib
6
+ from typing import BinaryIO, Literal
7
+
8
+ import h5py
9
+
10
+
11
+ class ExternalDataForbiddenError(BaseException):
12
+ """Raised when a dataset contains external data
13
+
14
+ External data are a security risk, because they could be
15
+ used to access data that are not supposed to be accessed.
16
+ This is especially critical when the data are accessed within
17
+ a web server process (e.g. in DCOR).
18
+ """
19
+ pass
20
+
21
+
22
+ def assert_no_external(h5):
23
+ """Raise ExternalDataForbiddenError if `h5` refers to external data"""
24
+ has_ext, path_ext = check_external(h5)
25
+ if has_ext:
26
+ raise ExternalDataForbiddenError(
27
+ f"Dataset {h5.file.filename} contains external data, but these "
28
+ f"are not permitted for security reasons ({path_ext})!")
29
+
30
+
31
+ def check_external(h5):
32
+ """Check recursively, whether an h5py object contains external data
33
+
34
+ External data includes binary data in external files, virtual
35
+ datasets, and external links.
36
+
37
+ Returns a tuple of either
38
+
39
+ - `(True, path_ext)` if the object contains external data
40
+ - `(False, None)` if this is not the case
41
+
42
+ where `path_ext` is the path to the group or dataset in `h5`.
43
+
44
+ .. versionadded:: 0.51.0
45
+
46
+ """
47
+ for key in h5:
48
+ obj = h5[key]
49
+ if (obj.file != h5.file # not in same file
50
+ or (isinstance(obj, h5py.Dataset)
51
+ and (obj.is_virtual # virtual dataset
52
+ or obj.external))): # external dataset
53
+ # These are external data
54
+ return True, f"{h5.name}/{key}".replace("//", "/")
55
+ elif isinstance(obj, h5py.Group):
56
+ # Perform recursive check for external data
57
+ has_ext, path_ext = check_external(obj)
58
+ if has_ext:
59
+ return True, path_ext
60
+ else:
61
+ return False, None
62
+
63
+
64
+ def combine_h5files(
65
+ paths: list,
66
+ external: Literal["follow", "raise"] = "follow"
67
+ ) -> BinaryIO:
68
+ """Create an in-memory file that combines multiple .rtdc files
69
+
70
+ The .rtdc files must have the same number of events. The in-memory
71
+ file is populated with the "events" data from `paths` according to
72
+ the order that `paths` are given in. Metadata, including logs, basins,
73
+ and tables are only taken from the first path.
74
+
75
+ .. versionadded:: 0.51.0
76
+
77
+ Parameters
78
+ ----------
79
+ paths: list of str or pathlib.Path
80
+ Paths of the input .rtdc files. The first input file is always
81
+ used as a source for the metadata. The other files only complement
82
+ the features.
83
+ external: str
84
+ Defines how external (links, binary, virtual) data in `paths`
85
+ should be handled. The default is to "follow" external datasets or
86
+ links to external data. In a zero-trust context, you can set this
87
+ to "raise" which will cause an :class:`.ExternalDataForbiddenError`
88
+ exception when external data are encountered.
89
+
90
+ Returns
91
+ -------
92
+ fd: BinaryIO
93
+ seekable, file-like object representing an HDF5 file opened in
94
+ binary mode; This can be passed to `:class:h5py.File`
95
+ """
96
+ fd = io.BytesIO()
97
+ with h5py.File(fd, "w", libver="latest") as hv:
98
+ for ii, pp in enumerate(paths):
99
+ pp = pathlib.Path(pp).resolve()
100
+ with h5py.File(pp, libver="latest") as h5:
101
+ if external == "raise":
102
+ # Check for external data
103
+ assert_no_external(h5)
104
+ if ii == 0:
105
+ # Only write attributes once.
106
+ # Interestingly, writing the attributes takes
107
+ # the most time. Maybe there is some shortcut
108
+ # that can be taken (since e.g. we know we don't have to
109
+ # check for existing attributes).
110
+ # https://github.com/h5py/h5py/blob/master/
111
+ # h5py/_hl/attrs.py
112
+ hv.attrs.update(h5.attrs)
113
+ # Also, write basins/logs/tables/... (anything that is
114
+ # not events) only once.
115
+ for group in h5:
116
+ if group != "events":
117
+ hv[group] = h5py.ExternalLink(str(pp), group)
118
+ # Append features
119
+ hve = hv.require_group("events")
120
+ for feat in h5["events"]:
121
+ if feat not in hve:
122
+ hve[feat] = h5py.ExternalLink(str(pp),
123
+ f"/events/{feat}")
124
+ return fd
dclab/util.py CHANGED
@@ -10,12 +10,6 @@ import numpy as np
10
10
  from .rtdc_dataset.config import Configuration, ConfigurationDict
11
11
 
12
12
 
13
- if np.lib.NumpyVersion(np.__version__) >= "2.0.0":
14
- copy_if_needed = None
15
- else:
16
- copy_if_needed = False
17
-
18
-
19
13
  class file_monitoring_lru_cache:
20
14
  """Decorator for caching data extracted from files
21
15
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dclab
3
- Version: 0.62.7
3
+ Version: 2.18.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>
@@ -23,7 +23,7 @@ Requires-Dist: importlib-resources>=6.0
23
23
  Requires-Dist: numpy<3,>=1.21
24
24
  Requires-Dist: scipy<2,>=1.10.0
25
25
  Provides-Extra: all
26
- Requires-Dist: dclab[dcor,export,http,s3,tdms]; extra == "all"
26
+ Requires-Dist: dclab[dcor,export,http,lme4,s3,tdms]; extra == "all"
27
27
  Provides-Extra: dcor
28
28
  Requires-Dist: requests<3,>=2.31.0; extra == "dcor"
29
29
  Provides-Extra: export
@@ -31,6 +31,8 @@ Requires-Dist: fcswrite>=0.5.0; extra == "export"
31
31
  Requires-Dist: imageio[ffmpeg]; extra == "export"
32
32
  Provides-Extra: http
33
33
  Requires-Dist: requests<3,>=2.31.0; extra == "http"
34
+ Provides-Extra: lme4
35
+ Requires-Dist: rpy2>=2.9.4; extra == "lme4"
34
36
  Provides-Extra: s3
35
37
  Requires-Dist: boto3>=1.34.31; extra == "s3"
36
38
  Provides-Extra: tdms
@@ -1,15 +1,15 @@
1
1
  dclab/kde_methods.py,sha256=awlqkj819VRJzArG6Fx6myDa6qGpLoZ8S9IJ1J1YECA,9206
2
- dclab/_version.py,sha256=2nNmtDl49w2uonQ4lw3PC68spDp8sFy-2CvnHEXJVdc,413
3
- dclab/util.py,sha256=nLL5jwG14h1YFJ_d0L-5DwsWgyfst5hVndaiLbTkYH4,5253
2
+ dclab/_version.py,sha256=QyMxKDzFsqXDA7bVrQozJznaASbsECKe57aBBNAljsA,413
3
+ dclab/util.py,sha256=FcRsWcyKkKkfX2nZCShjJ5wPccr7U7NHsIDd_WEws6w,5141
4
4
  dclab/downsampling.pyx,sha256=OK7zbgGLl5gVyoU8ZBHo9EWwb8C9ChavmLNEvQvC9T0,7258
5
5
  dclab/__init__.py,sha256=1mskJAUo8HbvDhJRJFbcFB6HccFeqoRUCEHLuS64t_g,812
6
6
  dclab/warn.py,sha256=MjJvyQeuvIXFQ2-fHDzbmXJ0scnHqqRJlIxfuLI_utE,523
7
7
  dclab/cached.py,sha256=eWTYBiI-HQM7JuPH-oxa5LLnhAX32GpRwlYg2kQ3sTA,2917
8
- dclab/http_utils.py,sha256=YtZHEwB-BBBo2fCvwhlJvlnWvfWFMHclqol3OIJ7atM,10910
8
+ dclab/http_utils.py,sha256=TGqgiaUV-Z6Wiae__Yze-uHRWX57846ZnlV10ajzv2E,10562
9
9
  dclab/polygon_filter.py,sha256=qexmo-rXe06CUPZhN6EMJy4y4B5gXZeqejdvIB2arOE,13480
10
10
  dclab/statistics.py,sha256=tJDqPlY_Jw2Hhl-s7ugMBSZAxcRuPu4LQuBAZBXz7t8,6355
11
11
  dclab/kde_contours.py,sha256=5K7PzZz-FtSGvW4IR2tLpbEKKqCSsSTQPsupu7zIsPg,6745
12
- dclab/downsampling.cpython-38-darwin.so,sha256=rjbxMCNBQJnOREt1pCRMFQIo3KFrLEpH91zdnu8pvYg,258320
12
+ dclab/downsampling.cpython-38-darwin.so,sha256=FNBTHufTLyFBtuL_RcuBYIDu_70hVQc0tp02o2mKADM,258320
13
13
  dclab/isoelastics/iso_LE-2D-FEM-19-volume-deform.txt,sha256=vTcazOlOXo3BQ0NQtGB_IdHKA0neOLXZ_d3JuMU--RE,83358
14
14
  dclab/isoelastics/iso_HE-3D-FEM-22-area_um-deform.txt,sha256=IjULG1KO-hClaYPoJJnwPbF2TkS9i9jxF1tbhhQTClY,71350
15
15
  dclab/isoelastics/iso_HE-2D-FEM-22-volume-deform.txt,sha256=aLOWxev_hvyP2yWquomcogn3Ze4SBfvqz-qmTOOibNw,97512
@@ -34,10 +34,10 @@ dclab/features/emodulus/scale_linear.py,sha256=5tZfOpG4QSSEMlwSoA_3XRQuY0tiZ3CSm
34
34
  dclab/features/emodulus/lut_HE-3D-FEM-22.txt,sha256=1Sg4ys0ykT7Q_jFM28XS0uJ85nZd_ha7BDXdN2rsPIA,47248
35
35
  dclab/features/emodulus/load.py,sha256=Q9rII-7Om-f0m183VNeJUxNno7at1reigKtbzdrWgjE,8557
36
36
  dclab/features/emodulus/viscosity.py,sha256=aBm1pQa9cFAOBnO07UWMj87bw6fQpmW1IlWWD0MEtgw,9438
37
- dclab/lme4/lme4_template.R,sha256=CEXQIquvYCla9dCvRYgiBemI6fiVgAKnJTetJA2LAtk,2570
38
- dclab/lme4/__init__.py,sha256=5WPFMTK-Yia3NJuwZEEBQ3fCyW3DiFgpZFrAwU33TV4,272
39
- dclab/lme4/rsetup.py,sha256=kH9VFtcK83ZaF9jvh1n5kcmGmPLLsmCPia_ElEHBLes,5890
40
- dclab/lme4/wrapr.py,sha256=rdIc2hS8GhgdU9WFA6pLzohJGlBga-mkm60qqqk6VO4,15017
37
+ dclab/lme4/__init__.py,sha256=Y_oqYEqNnHCjxfdzkoP0ZXPCQx6XSKqwt1pAgdGF2dA,235
38
+ dclab/lme4/rsetup.py,sha256=siVWXt0niXAqD20d2quOjVzaZc4-zF0i81G_HRZE6q0,6951
39
+ dclab/lme4/wrapr.py,sha256=MzJDUZ7L_5xDWVtl5vrDgTJoum2vrxfP0dYwPMcHIPY,16977
40
+ dclab/lme4/rlibs.py,sha256=3oHSrSykeQB9ldvrV4Ite9EffIURUwCo3bn4uBpVeSk,2539
41
41
  dclab/cli/task_tdms2rtdc.py,sha256=u0L1Fq9rXIeQG9b72SuUIh_qYC6fG2xXxht9_rcdCao,8283
42
42
  dclab/cli/__init__.py,sha256=84YzzV6aE_NY-o7wvqgvUoxBLvIOEXpSUbkVcGRyzQ0,483
43
43
  dclab/cli/task_condense.py,sha256=uNZzm04VuQOXJi6uXPmaLdQCk0g8ONueiO4p67yJv0k,8546
@@ -64,49 +64,50 @@ dclab/external/skimage/measure.py,sha256=y1idCqD9TUxp3-QnOiWR_d674OKaeqBJ4MN2-gV
64
64
  dclab/external/skimage/LICENSE,sha256=ivsSBvn3c0R9mOctWRRdza7C7wdZSRYgCVxlVqUdlB8,1452
65
65
  dclab/external/skimage/pnpoly.py,sha256=r8hFNiTz5XlUoNZjosqA0iyv1FPn0l7ewbplgFgkdaw,1347
66
66
  dclab/external/skimage/_find_contours.py,sha256=16v5eeTZBmevG8SSuXtJ6yUpVPhwfSmtc8pDD0nuuOU,9340
67
- dclab/external/skimage/_find_contours_cy.cpython-38-darwin.so,sha256=E35HOyc5GlqeJAsQy8nYJ0FaHywFTyRFrtW0USc-EzA,204152
67
+ dclab/external/skimage/_find_contours_cy.cpython-38-darwin.so,sha256=rQkLcGaS1k3RLfghHe198naX1tHtHoes8dcY_JP5CAA,204152
68
68
  dclab/external/skimage/__init__.py,sha256=-B2QUKHAFzQuBWuuKvPDC5JIl0Zb-x3OGmbwPaE9VwQ,72
69
69
  dclab/external/skimage/_pnpoly.pyx,sha256=Qdn6xPazDschBqbr46DzB75MB2MnqvdnoTSBMK7kUGE,2504
70
- dclab/external/skimage/_pnpoly.cpython-38-darwin.so,sha256=SW95Jc6iyApjbTVdUvJiT39BZiPlnYIAwkQcybHH_5Q,221776
70
+ dclab/external/skimage/_pnpoly.cpython-38-darwin.so,sha256=LbbcT_nPTzO6gezZbDlyZmfbRbD9g636GyQnmqEEqYY,221776
71
71
  dclab/external/skimage/_find_contours_cy.pyx,sha256=pZJOBhMHzYEMkcz4WQVyjn7jDNrdjCfet47FU1hRAxk,7161
72
72
  dclab/external/skimage/_shared/geometry.pxd,sha256=kRsu9ifv_rL3kbRIgSLf86p0hn2oTMp6s013lZ9bBZM,346
73
- dclab/external/skimage/_shared/geometry.cpython-38-darwin.so,sha256=cQp0xWCPe-mYRFNCQmMKTkwhXaoRgKuyxj13GhdnB7c,55872
73
+ dclab/external/skimage/_shared/geometry.cpython-38-darwin.so,sha256=4OA-BITBrYlTkK-6kgxdrvJcOVgVrNumGxOxyJvBIkY,55872
74
74
  dclab/external/skimage/_shared/__init__.py,sha256=2sHZwTtJSlMTa3Q2YSvQW7jrPLMUSqDJQa-ROe5zfcw,37
75
75
  dclab/external/skimage/_shared/geometry.pyx,sha256=miCHUh6mBDbRRIoaF_0xAER1MRzsCAzFdlYQZhV7RmE,1667
76
76
  dclab/definitions/feat_logic.py,sha256=SXsSlAusgtE3uXcPu84dQwYZ07zxmV37DmPednA3_dM,5823
77
77
  dclab/definitions/meta_parse.py,sha256=YdaTdM8DAMsIFn5ITH9OHYGTXeAOBGWtx22oVjxXcWk,2393
78
78
  dclab/definitions/__init__.py,sha256=56VL7rNTjP61gpGgN2GEUKicds2aBz_nWNwzfNxO_l8,2781
79
- dclab/definitions/meta_const.py,sha256=zqE-SrD2tJMCFWdtp_IenwnbIQg0lulvbQAw9dK0Gho,13125
79
+ dclab/definitions/meta_const.py,sha256=Nci-QFl6cxe2p8tvfGVIWsRO8NArFOyiA2jPFUIY23M,12399
80
80
  dclab/definitions/feat_const.py,sha256=3zii5bXN0d0lMtkiI8dR9ivNlNQYosZASAlOg1UKKPA,9634
81
81
  dclab/definitions/meta_logic.py,sha256=wCgb7DPRHaR8DCWw_VbwNkpslUnazzWfgX0iS8oEe90,4194
82
82
  dclab/rtdc_dataset/config.py,sha256=MvBteFya3R6Ch3U6UgTakCsJoBgVykTxS_Z25STWPHU,17432
83
- dclab/rtdc_dataset/check.py,sha256=lJNaz4QTe2WNlxik6zSohRHTiAYuP_bKOzSDjPGTUS0,35006
84
- dclab/rtdc_dataset/feat_basin.py,sha256=3ev_a31Sa17oL_vK_ziP7_yrGxZpx0bofpkTrH2O7xU,20700
83
+ dclab/rtdc_dataset/check.py,sha256=6l9E2amboqgU9go1BaPtOJgeDgl4GSUuGteF1B2M2X8,32406
84
+ dclab/rtdc_dataset/feat_basin.py,sha256=nxcFjhQiFqsdW0wucEjOMyvZFjCNdS7fFFVrvKvI0EE,19997
85
85
  dclab/rtdc_dataset/fmt_s3.py,sha256=OavOOGa2oOyG-VSfehFf6JVNs2k5iZalRm6ZTBu6sY4,10642
86
86
  dclab/rtdc_dataset/feat_temp.py,sha256=XbDIS1iUUkRH0Zp9uVlwvK_untJ7hkOnKshK1Drsnt8,3694
87
87
  dclab/rtdc_dataset/__init__.py,sha256=MUHSGVQJ4Zc0IyU2lf01dpDWyOyNveHip-UjSkmPNvQ,486
88
88
  dclab/rtdc_dataset/core.py,sha256=DEaN6-w0she-ylE6ZuNRLmB4Q77fiv7xC01IzUTz-jk,37672
89
89
  dclab/rtdc_dataset/export.py,sha256=OxixysUUAlAoOnqip_GtkDSeLPenMQVNeO8zDipxjgo,29484
90
90
  dclab/rtdc_dataset/fmt_dict.py,sha256=gumVQOiVVDFUKow_483PY7cxInqo-NiBBnBhIU8s4lg,3009
91
+ dclab/rtdc_dataset/linker.py,sha256=vp2yaqcbb5LESu8MO9WG9--NJor2MWkNcCfoAvlEKq0,4629
91
92
  dclab/rtdc_dataset/writer.py,sha256=tOL-Hn9qC9bhJgJvQQgE8sTwS3DV5IB1mCd1M79qK7o,40427
92
93
  dclab/rtdc_dataset/filter.py,sha256=AFPUBzOIi3pqXgUdMQ5CIi9ZeGOKC71rfSZKLMLgtog,10023
93
94
  dclab/rtdc_dataset/fmt_http.py,sha256=vXVxRLXZp2_V1v3xk4lu4VUHYXfNHJdsRkVt3trC1RU,3374
94
95
  dclab/rtdc_dataset/load.py,sha256=wGJuIv7pH1zpBhg6Cj_H0wxHZb-KwHR8TWnyDosCBBA,2473
95
- dclab/rtdc_dataset/copier.py,sha256=ENh7PQ1fjUcW6WtcIhyjOi3Hn1-1PA2navwrFqRHB6M,13998
96
+ dclab/rtdc_dataset/copier.py,sha256=8xSogZ73SU7y2HaTRY1zCml5Q8pZSJsDLiUozCDzwfY,11990
96
97
  dclab/rtdc_dataset/feat_anc_plugin/__init__.py,sha256=Em8nKxzex6M46Q86pRoSdrzb02XBiTY9u-npODvwrwk,119
97
98
  dclab/rtdc_dataset/feat_anc_plugin/plugin_feature.py,sha256=ED7vAtHgMXoanbeoUdklDAocj0Pq_cpckmCJ-YWqwr8,12381
98
- dclab/rtdc_dataset/fmt_hierarchy/events.py,sha256=pRqiFJpBoTwL2krG3asmLw4Fyp7O-vZDzbUIBpWx7QQ,4547
99
+ dclab/rtdc_dataset/fmt_hierarchy/events.py,sha256=tr4S0_chhQidxWmcTook6fXJNtmtfdFfhkTjtl4rwV4,4485
99
100
  dclab/rtdc_dataset/fmt_hierarchy/mapper.py,sha256=dgGLO1ki2upV9QP6h7DCyNGgcMw45bzFbXc1CyyFAGw,4210
100
101
  dclab/rtdc_dataset/fmt_hierarchy/__init__.py,sha256=0e0lmGjeb9e7skZy1ksfEOFkwKLIu1N6MnuY1aUWkWA,355
101
102
  dclab/rtdc_dataset/fmt_hierarchy/hfilter.py,sha256=niYjYz6R-D2S2zurgmmIqrmsSFJ3tVgAS-UxweImAEU,5852
102
- dclab/rtdc_dataset/fmt_hierarchy/base.py,sha256=TaDFysJYhRMDDKwVpQn9qcpfmPZofHkvpu46TyHGht4,9440
103
+ dclab/rtdc_dataset/fmt_hierarchy/base.py,sha256=PLmqx-ExfJqVfgVjQNGM6jQ5r9b-zA-t4NwWzrk1ank,9468
103
104
  dclab/rtdc_dataset/fmt_hdf5/feat_defect.py,sha256=MeIxPz799x-sljbmSb0n40eVLw_iPnbCfOm07_lTBxo,6540
104
105
  dclab/rtdc_dataset/fmt_hdf5/basin.py,sha256=mJZR92Qoa71EwDVDYAP9KtOcjvRyjtA2wO1DkCBfBQc,792
105
- dclab/rtdc_dataset/fmt_hdf5/events.py,sha256=JUuPviS4lEXMjfNgJE-jkeArAwUVkdA1bmAszJGjPvc,8231
106
+ dclab/rtdc_dataset/fmt_hdf5/events.py,sha256=uJFMSkP8f-cmNdzC4X2LDayw2Q1P1k9qV252TmzC5h8,8179
106
107
  dclab/rtdc_dataset/fmt_hdf5/__init__.py,sha256=yWLYK-Fq0EYnp2eYfl1Ze02RBMOWg-iALJWs4dFSxxY,270
107
108
  dclab/rtdc_dataset/fmt_hdf5/logs.py,sha256=-mDewfv_aOeHaJykuJIWsqr9a7-moKhoGhqw9cR4ebg,1004
108
109
  dclab/rtdc_dataset/fmt_hdf5/tables.py,sha256=G226awNz7NA2V9l1F6jCeyVcJ8V4AJgLYhOfG1Q_5t8,872
109
- dclab/rtdc_dataset/fmt_hdf5/base.py,sha256=_PgmDq2K7RGCuhV9J4YZwg9noW1hi2w14ZP8ooRR8Lw,6391
110
+ dclab/rtdc_dataset/fmt_hdf5/base.py,sha256=bwbbdt2FXniYANsR1dUF_zeUqT5ByGVv5KfEarnDEhw,6206
110
111
  dclab/rtdc_dataset/feat_anc_core/af_fl_max_ctc.py,sha256=gV3FqM0AoOHzWwhU45e3fvBb2MwGVadLL6piVW0YF1s,3687
111
112
  dclab/rtdc_dataset/feat_anc_core/af_image_contour.py,sha256=39jvhzz2GmfXDYXu1d3kie7tpBzUkUL_JTxfau-2mt8,3531
112
113
  dclab/rtdc_dataset/feat_anc_core/__init__.py,sha256=hEWMqg2rmbxW86Fe-dkTD4b0Zmp-dJe6gPsMjspPGXA,464
@@ -129,9 +130,9 @@ dclab/rtdc_dataset/fmt_tdms/event_image.py,sha256=-jp7Z-N91e4ieumYQ1huMicj7PMJqw
129
130
  dclab/rtdc_dataset/fmt_tdms/event_trace.py,sha256=Vkym0QKSw2mq1XZl5n8wDkgHXmaZwQGiMAV5AuRSJkE,5215
130
131
  dclab/rtdc_dataset/fmt_tdms/exc.py,sha256=WzrMqnyrzp8gsT8Pf7JKqGGv43ewx7d_qgtirURppRI,813
131
132
  dclab/rtdc_dataset/fmt_tdms/event_contour.py,sha256=kjo0wJx9F0gmmOOyR0NoLw6VEtSl3h63WXXkcbfnoS8,9627
132
- dclab-0.62.7.dist-info/RECORD,,
133
- dclab-0.62.7.dist-info/LICENSE,sha256=1mLfjOTOaeiMSGPJiF5hHnMQfKX88QVeZpCCXwJGj3k,18131
134
- dclab-0.62.7.dist-info/WHEEL,sha256=7_oe0rMIEoZOpgBhth1WRv0SCKz8pdiUZgyT0NjKRv8,107
135
- dclab-0.62.7.dist-info/entry_points.txt,sha256=eOpjgznu-eW-9utUpLU-77O5098YyUEgGF3ksGMdtec,273
136
- dclab-0.62.7.dist-info/top_level.txt,sha256=irvwZMgs1edY1Zj60ZFk7Almb9Zhk4k6E6aC4YPFnnM,6
137
- dclab-0.62.7.dist-info/METADATA,sha256=1BqvduCczdHqkI1nKU31GJWR24R1dgXK_PSXJyhwWiM,4754
133
+ dclab-2.18.0.dist-info/RECORD,,
134
+ dclab-2.18.0.dist-info/LICENSE,sha256=1mLfjOTOaeiMSGPJiF5hHnMQfKX88QVeZpCCXwJGj3k,18131
135
+ dclab-2.18.0.dist-info/WHEEL,sha256=ywqtsQ8Z6WlogYsNdfJf_6o9TCfmJc_6Wsg5rUQ0DwU,107
136
+ dclab-2.18.0.dist-info/entry_points.txt,sha256=eOpjgznu-eW-9utUpLU-77O5098YyUEgGF3ksGMdtec,273
137
+ dclab-2.18.0.dist-info/top_level.txt,sha256=irvwZMgs1edY1Zj60ZFk7Almb9Zhk4k6E6aC4YPFnnM,6
138
+ dclab-2.18.0.dist-info/METADATA,sha256=WTNyL58XdjHtE11bxXQWGntyi981Fv5pWGaxXshj1Iw,4824
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.3.0)
2
+ Generator: setuptools (74.1.2)
3
3
  Root-Is-Purelib: false
4
4
  Tag: cp38-cp38-macosx_11_0_arm64
5
5
 
@@ -1,94 +0,0 @@
1
- require(stats);
2
- require(lme4);
3
-
4
- model_name <- "<MODEL_NAME>"
5
- cat("OUTPUT model:", model_name, "#*#\n")
6
-
7
- func_model <- "feature ~ group + (1 + group | repetition)"
8
- func_nullmodel <- "feature ~ (1 + group | repetition)"
9
-
10
- # These are the feature, group, and repetition arrays that are set by dclab
11
- # via templates.
12
- feature <- c(<FEATURES>)
13
- group <- c(<GROUPS>)
14
- repetition <- c(<REPETITIONS>)
15
-
16
- data <- data.frame(feature, group, repetition)
17
-
18
- if (model_name == "glmer+loglink") {
19
- Model <- glmer(func_model, data, family=Gamma(link='log'))
20
- NullModel <- glmer(func_nullmodel, data, family=Gamma(link='log'))
21
- } else if (model_name == "lmer") {
22
- Model <- lmer(func_model, data)
23
- NullModel <- lmer(func_nullmodel, data)
24
- } else {
25
- stop("Invalid model_name:", model_name)
26
- }
27
-
28
- # Anova analysis (increase verbosity by making models global)
29
- # Using anova is a very conservative way of determining
30
- # p values.
31
- res_anova <- anova(Model, NullModel)
32
- cat("OUTPUT r anova: ")
33
- res_anova
34
- cat("#*#\n")
35
-
36
- pvalue <- res_anova$"Pr(>Chisq)"[2]
37
- cat("OUTPUT anova p-value:", pvalue, "#*#\n")
38
-
39
- model_summary <- summary(Model)
40
- cat("OUTPUT r model summary:")
41
- model_summary
42
- cat("#*#\n")
43
-
44
- model_coefficients <- coef(Model)
45
- cat("OUTPUT r model coefficients:")
46
- model_coefficients
47
- cat("#*#\n")
48
-
49
- fe_reps <- model_coefficients$repetition
50
-
51
- effects <- data.frame(coef(model_summary))
52
-
53
- fe_icept <- effects$Estimate[1]
54
-
55
- fe_treat <- effects$Estimate[2]
56
-
57
- if (model_name == "glmer+loglink") {
58
- # transform back from log
59
- fe_treat <- exp(fe_icept + fe_treat) - exp(fe_icept)
60
- fe_icept <- exp(fe_icept)
61
- fe_reps[, 2] = exp(fe_reps[, 1] + fe_reps[, 2]) - exp(fe_reps[, 1])
62
- fe_reps[, 1] = exp(fe_reps[, 1])
63
- }
64
-
65
- cat("OUTPUT fixed effects intercept:", fe_icept, "#*#\n")
66
- cat("OUTPUT fixed effects treatment:", fe_treat, "#*#\n")
67
- cat("OUTPUT fixed effects repetitions:")
68
- fe_reps
69
- cat("#*#\n")
70
-
71
- # convergence
72
-
73
- # convergence warnings in lme4
74
- is_warning_generated <- function(m) {
75
- df <- summary(m)
76
- !is.null(df$optinfo$conv$lme4$messages) &&
77
- grepl('failed to converge', df$optinfo$conv$lme4$messages)
78
- }
79
- lme4_not_converged <- is_warning_generated(Model)
80
-
81
- # convergence code by the optimizer
82
- lme4l <- model_summary$optinfo$conv$lme4
83
- if (length(lme4l) == 0) {
84
- # the optimizer probably does not know
85
- conv_code <- 0
86
- } else if (is.null(lme4l$code)) {
87
- # NULL means 0
88
- conv_code <- 0
89
- } else {
90
- conv_code <- lme4l$code
91
- }
92
-
93
- cat("OUTPUT model converged:", (conv_code == 0) && !lme4_not_converged, "#*#\n")
94
- cat("OUTPUT lme4 messages:", lme4l$optinfo$conv$lme4$messages, "#*#\n")