dclab 0.62.16__tar.gz → 0.62.17__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.

Potentially problematic release.


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

Files changed (331) hide show
  1. {dclab-0.62.16 → dclab-0.62.17}/CHANGELOG +5 -0
  2. {dclab-0.62.16 → dclab-0.62.17}/LICENSE +1 -61
  3. {dclab-0.62.16 → dclab-0.62.17}/PKG-INFO +4 -4
  4. dclab-0.62.17/dclab/__init__.py +41 -0
  5. {dclab-0.62.16 → dclab-0.62.17}/dclab/_version.py +2 -2
  6. dclab-0.62.17/dclab/kde/__init__.py +1 -0
  7. dclab-0.62.17/dclab/kde/base.py +238 -0
  8. dclab-0.62.16/dclab/kde_contours.py → dclab-0.62.17/dclab/kde/contours.py +2 -2
  9. dclab-0.62.16/dclab/kde_methods.py → dclab-0.62.17/dclab/kde/methods.py +2 -2
  10. dclab-0.62.17/dclab/kde_contours.py +10 -0
  11. dclab-0.62.17/dclab/kde_methods.py +11 -0
  12. {dclab-0.62.16 → dclab-0.62.17}/dclab/rtdc_dataset/core.py +30 -146
  13. {dclab-0.62.16 → dclab-0.62.17}/dclab/rtdc_dataset/export.py +49 -28
  14. {dclab-0.62.16 → dclab-0.62.17}/dclab/util.py +20 -0
  15. {dclab-0.62.16 → dclab-0.62.17}/dclab.egg-info/PKG-INFO +4 -4
  16. {dclab-0.62.16 → dclab-0.62.17}/dclab.egg-info/SOURCES.txt +5 -0
  17. {dclab-0.62.16 → dclab-0.62.17}/dclab.egg-info/requires.txt +2 -2
  18. {dclab-0.62.16 → dclab-0.62.17}/pyproject.toml +5 -3
  19. {dclab-0.62.16 → dclab-0.62.17}/tests/test_cli_condense.py +5 -3
  20. {dclab-0.62.16 → dclab-0.62.17}/tests/test_kde_contours.py +1 -1
  21. dclab-0.62.17/tests/test_kde_deprecations.py +52 -0
  22. dclab-0.62.17/tests/test_kde_methods.py +14 -0
  23. {dclab-0.62.16 → dclab-0.62.17}/tests/test_rtdc_export_avi.py +22 -3
  24. {dclab-0.62.16 → dclab-0.62.17}/tests/test_rtdc_kde.py +2 -1
  25. {dclab-0.62.16 → dclab-0.62.17}/tests/test_util.py +34 -0
  26. dclab-0.62.16/dclab/__init__.py +0 -23
  27. dclab-0.62.16/tests/test_kde_methods.py +0 -23
  28. {dclab-0.62.16 → dclab-0.62.17}/.gitignore +0 -0
  29. {dclab-0.62.16 → dclab-0.62.17}/.readthedocs.yml +0 -0
  30. {dclab-0.62.16 → dclab-0.62.17}/MANIFEST.in +0 -0
  31. {dclab-0.62.16 → dclab-0.62.17}/README.rst +0 -0
  32. {dclab-0.62.16 → dclab-0.62.17}/dclab/cached.py +0 -0
  33. {dclab-0.62.16 → dclab-0.62.17}/dclab/cli/__init__.py +0 -0
  34. {dclab-0.62.16 → dclab-0.62.17}/dclab/cli/common.py +0 -0
  35. {dclab-0.62.16 → dclab-0.62.17}/dclab/cli/task_compress.py +0 -0
  36. {dclab-0.62.16 → dclab-0.62.17}/dclab/cli/task_condense.py +0 -0
  37. {dclab-0.62.16 → dclab-0.62.17}/dclab/cli/task_join.py +0 -0
  38. {dclab-0.62.16 → dclab-0.62.17}/dclab/cli/task_repack.py +0 -0
  39. {dclab-0.62.16 → dclab-0.62.17}/dclab/cli/task_split.py +0 -0
  40. {dclab-0.62.16 → dclab-0.62.17}/dclab/cli/task_tdms2rtdc.py +0 -0
  41. {dclab-0.62.16 → dclab-0.62.17}/dclab/cli/task_verify_dataset.py +0 -0
  42. {dclab-0.62.16 → dclab-0.62.17}/dclab/definitions/__init__.py +0 -0
  43. {dclab-0.62.16 → dclab-0.62.17}/dclab/definitions/feat_const.py +0 -0
  44. {dclab-0.62.16 → dclab-0.62.17}/dclab/definitions/feat_logic.py +0 -0
  45. {dclab-0.62.16 → dclab-0.62.17}/dclab/definitions/meta_const.py +0 -0
  46. {dclab-0.62.16 → dclab-0.62.17}/dclab/definitions/meta_logic.py +0 -0
  47. {dclab-0.62.16 → dclab-0.62.17}/dclab/definitions/meta_parse.py +0 -0
  48. {dclab-0.62.16 → dclab-0.62.17}/dclab/downsampling.pyx +0 -0
  49. {dclab-0.62.16 → dclab-0.62.17}/dclab/external/__init__.py +0 -0
  50. {dclab-0.62.16 → dclab-0.62.17}/dclab/external/packaging/LICENSE +0 -0
  51. {dclab-0.62.16 → dclab-0.62.17}/dclab/external/packaging/LICENSE.APACHE +0 -0
  52. {dclab-0.62.16 → dclab-0.62.17}/dclab/external/packaging/LICENSE.BSD +0 -0
  53. {dclab-0.62.16 → dclab-0.62.17}/dclab/external/packaging/__init__.py +0 -0
  54. {dclab-0.62.16 → dclab-0.62.17}/dclab/external/packaging/_structures.py +0 -0
  55. {dclab-0.62.16 → dclab-0.62.17}/dclab/external/packaging/version.py +0 -0
  56. {dclab-0.62.16 → dclab-0.62.17}/dclab/external/skimage/LICENSE +0 -0
  57. {dclab-0.62.16 → dclab-0.62.17}/dclab/external/skimage/__init__.py +0 -0
  58. {dclab-0.62.16 → dclab-0.62.17}/dclab/external/skimage/_find_contours.py +0 -0
  59. {dclab-0.62.16 → dclab-0.62.17}/dclab/external/skimage/_find_contours_cy.pyx +0 -0
  60. {dclab-0.62.16 → dclab-0.62.17}/dclab/external/skimage/_pnpoly.pyx +0 -0
  61. {dclab-0.62.16 → dclab-0.62.17}/dclab/external/skimage/_shared/__init__.py +0 -0
  62. {dclab-0.62.16 → dclab-0.62.17}/dclab/external/skimage/_shared/geometry.pxd +0 -0
  63. {dclab-0.62.16 → dclab-0.62.17}/dclab/external/skimage/_shared/geometry.pyx +0 -0
  64. {dclab-0.62.16 → dclab-0.62.17}/dclab/external/skimage/measure.py +0 -0
  65. {dclab-0.62.16 → dclab-0.62.17}/dclab/external/skimage/pnpoly.py +0 -0
  66. {dclab-0.62.16 → dclab-0.62.17}/dclab/external/statsmodels/LICENSE +0 -0
  67. {dclab-0.62.16 → dclab-0.62.17}/dclab/external/statsmodels/__init__.py +0 -0
  68. {dclab-0.62.16 → dclab-0.62.17}/dclab/external/statsmodels/nonparametric/__init__.py +0 -0
  69. {dclab-0.62.16 → dclab-0.62.17}/dclab/external/statsmodels/nonparametric/_kernel_base.py +0 -0
  70. {dclab-0.62.16 → dclab-0.62.17}/dclab/external/statsmodels/nonparametric/kernel_density.py +0 -0
  71. {dclab-0.62.16 → dclab-0.62.17}/dclab/external/statsmodels/nonparametric/kernels.py +0 -0
  72. {dclab-0.62.16 → dclab-0.62.17}/dclab/features/__init__.py +0 -0
  73. {dclab-0.62.16 → dclab-0.62.17}/dclab/features/bright.py +0 -0
  74. {dclab-0.62.16 → dclab-0.62.17}/dclab/features/bright_bc.py +0 -0
  75. {dclab-0.62.16 → dclab-0.62.17}/dclab/features/bright_perc.py +0 -0
  76. {dclab-0.62.16 → dclab-0.62.17}/dclab/features/contour.py +0 -0
  77. {dclab-0.62.16 → dclab-0.62.17}/dclab/features/emodulus/__init__.py +0 -0
  78. {dclab-0.62.16 → dclab-0.62.17}/dclab/features/emodulus/load.py +0 -0
  79. {dclab-0.62.16 → dclab-0.62.17}/dclab/features/emodulus/lut_HE-2D-FEM-22.txt +0 -0
  80. {dclab-0.62.16 → dclab-0.62.17}/dclab/features/emodulus/lut_HE-3D-FEM-22.txt +0 -0
  81. {dclab-0.62.16 → dclab-0.62.17}/dclab/features/emodulus/lut_LE-2D-FEM-19.txt +0 -0
  82. {dclab-0.62.16 → dclab-0.62.17}/dclab/features/emodulus/pxcorr.py +0 -0
  83. {dclab-0.62.16 → dclab-0.62.17}/dclab/features/emodulus/scale_linear.py +0 -0
  84. {dclab-0.62.16 → dclab-0.62.17}/dclab/features/emodulus/viscosity.py +0 -0
  85. {dclab-0.62.16 → dclab-0.62.17}/dclab/features/fl_crosstalk.py +0 -0
  86. {dclab-0.62.16 → dclab-0.62.17}/dclab/features/inert_ratio.py +0 -0
  87. {dclab-0.62.16 → dclab-0.62.17}/dclab/features/volume.py +0 -0
  88. {dclab-0.62.16 → dclab-0.62.17}/dclab/http_utils.py +0 -0
  89. {dclab-0.62.16 → dclab-0.62.17}/dclab/isoelastics/__init__.py +0 -0
  90. {dclab-0.62.16 → dclab-0.62.17}/dclab/isoelastics/iso_HE-2D-FEM-22-area_um-deform.txt +0 -0
  91. {dclab-0.62.16 → dclab-0.62.17}/dclab/isoelastics/iso_HE-2D-FEM-22-volume-deform.txt +0 -0
  92. {dclab-0.62.16 → dclab-0.62.17}/dclab/isoelastics/iso_HE-3D-FEM-22-area_um-deform.txt +0 -0
  93. {dclab-0.62.16 → dclab-0.62.17}/dclab/isoelastics/iso_HE-3D-FEM-22-volume-deform.txt +0 -0
  94. {dclab-0.62.16 → dclab-0.62.17}/dclab/isoelastics/iso_LE-2D-FEM-19-area_um-deform.txt +0 -0
  95. {dclab-0.62.16 → dclab-0.62.17}/dclab/isoelastics/iso_LE-2D-FEM-19-volume-deform.txt +0 -0
  96. {dclab-0.62.16 → dclab-0.62.17}/dclab/isoelastics/iso_LE-2D-ana-18-area_um-deform.txt +0 -0
  97. {dclab-0.62.16 → dclab-0.62.17}/dclab/lme4/__init__.py +0 -0
  98. {dclab-0.62.16 → dclab-0.62.17}/dclab/lme4/lme4_template.R +0 -0
  99. {dclab-0.62.16 → dclab-0.62.17}/dclab/lme4/rsetup.py +0 -0
  100. {dclab-0.62.16 → dclab-0.62.17}/dclab/lme4/wrapr.py +0 -0
  101. {dclab-0.62.16 → dclab-0.62.17}/dclab/polygon_filter.py +0 -0
  102. {dclab-0.62.16 → dclab-0.62.17}/dclab/rtdc_dataset/__init__.py +0 -0
  103. {dclab-0.62.16 → dclab-0.62.17}/dclab/rtdc_dataset/check.py +0 -0
  104. {dclab-0.62.16 → dclab-0.62.17}/dclab/rtdc_dataset/config.py +0 -0
  105. {dclab-0.62.16 → dclab-0.62.17}/dclab/rtdc_dataset/copier.py +0 -0
  106. {dclab-0.62.16 → dclab-0.62.17}/dclab/rtdc_dataset/feat_anc_core/__init__.py +0 -0
  107. {dclab-0.62.16 → dclab-0.62.17}/dclab/rtdc_dataset/feat_anc_core/af_basic.py +0 -0
  108. {dclab-0.62.16 → dclab-0.62.17}/dclab/rtdc_dataset/feat_anc_core/af_emodulus.py +0 -0
  109. {dclab-0.62.16 → dclab-0.62.17}/dclab/rtdc_dataset/feat_anc_core/af_fl_max_ctc.py +0 -0
  110. {dclab-0.62.16 → dclab-0.62.17}/dclab/rtdc_dataset/feat_anc_core/af_image_contour.py +0 -0
  111. {dclab-0.62.16 → dclab-0.62.17}/dclab/rtdc_dataset/feat_anc_core/af_ml_class.py +0 -0
  112. {dclab-0.62.16 → dclab-0.62.17}/dclab/rtdc_dataset/feat_anc_core/ancillary_feature.py +0 -0
  113. {dclab-0.62.16 → dclab-0.62.17}/dclab/rtdc_dataset/feat_anc_ml/__init__.py +0 -0
  114. {dclab-0.62.16 → dclab-0.62.17}/dclab/rtdc_dataset/feat_anc_plugin/__init__.py +0 -0
  115. {dclab-0.62.16 → dclab-0.62.17}/dclab/rtdc_dataset/feat_anc_plugin/plugin_feature.py +0 -0
  116. {dclab-0.62.16 → dclab-0.62.17}/dclab/rtdc_dataset/feat_basin.py +0 -0
  117. {dclab-0.62.16 → dclab-0.62.17}/dclab/rtdc_dataset/feat_temp.py +0 -0
  118. {dclab-0.62.16 → dclab-0.62.17}/dclab/rtdc_dataset/filter.py +0 -0
  119. {dclab-0.62.16 → dclab-0.62.17}/dclab/rtdc_dataset/fmt_dcor/__init__.py +0 -0
  120. {dclab-0.62.16 → dclab-0.62.17}/dclab/rtdc_dataset/fmt_dcor/access_token.py +0 -0
  121. {dclab-0.62.16 → dclab-0.62.17}/dclab/rtdc_dataset/fmt_dcor/api.py +0 -0
  122. {dclab-0.62.16 → dclab-0.62.17}/dclab/rtdc_dataset/fmt_dcor/base.py +0 -0
  123. {dclab-0.62.16 → dclab-0.62.17}/dclab/rtdc_dataset/fmt_dcor/basin.py +0 -0
  124. {dclab-0.62.16 → dclab-0.62.17}/dclab/rtdc_dataset/fmt_dcor/logs.py +0 -0
  125. {dclab-0.62.16 → dclab-0.62.17}/dclab/rtdc_dataset/fmt_dcor/tables.py +0 -0
  126. {dclab-0.62.16 → dclab-0.62.17}/dclab/rtdc_dataset/fmt_dict.py +0 -0
  127. {dclab-0.62.16 → dclab-0.62.17}/dclab/rtdc_dataset/fmt_hdf5/__init__.py +0 -0
  128. {dclab-0.62.16 → dclab-0.62.17}/dclab/rtdc_dataset/fmt_hdf5/base.py +0 -0
  129. {dclab-0.62.16 → dclab-0.62.17}/dclab/rtdc_dataset/fmt_hdf5/basin.py +0 -0
  130. {dclab-0.62.16 → dclab-0.62.17}/dclab/rtdc_dataset/fmt_hdf5/events.py +0 -0
  131. {dclab-0.62.16 → dclab-0.62.17}/dclab/rtdc_dataset/fmt_hdf5/feat_defect.py +0 -0
  132. {dclab-0.62.16 → dclab-0.62.17}/dclab/rtdc_dataset/fmt_hdf5/logs.py +0 -0
  133. {dclab-0.62.16 → dclab-0.62.17}/dclab/rtdc_dataset/fmt_hdf5/tables.py +0 -0
  134. {dclab-0.62.16 → dclab-0.62.17}/dclab/rtdc_dataset/fmt_hierarchy/__init__.py +0 -0
  135. {dclab-0.62.16 → dclab-0.62.17}/dclab/rtdc_dataset/fmt_hierarchy/base.py +0 -0
  136. {dclab-0.62.16 → dclab-0.62.17}/dclab/rtdc_dataset/fmt_hierarchy/events.py +0 -0
  137. {dclab-0.62.16 → dclab-0.62.17}/dclab/rtdc_dataset/fmt_hierarchy/hfilter.py +0 -0
  138. {dclab-0.62.16 → dclab-0.62.17}/dclab/rtdc_dataset/fmt_hierarchy/mapper.py +0 -0
  139. {dclab-0.62.16 → dclab-0.62.17}/dclab/rtdc_dataset/fmt_http.py +0 -0
  140. {dclab-0.62.16 → dclab-0.62.17}/dclab/rtdc_dataset/fmt_s3.py +0 -0
  141. {dclab-0.62.16 → dclab-0.62.17}/dclab/rtdc_dataset/fmt_tdms/__init__.py +0 -0
  142. {dclab-0.62.16 → dclab-0.62.17}/dclab/rtdc_dataset/fmt_tdms/event_contour.py +0 -0
  143. {dclab-0.62.16 → dclab-0.62.17}/dclab/rtdc_dataset/fmt_tdms/event_image.py +0 -0
  144. {dclab-0.62.16 → dclab-0.62.17}/dclab/rtdc_dataset/fmt_tdms/event_mask.py +0 -0
  145. {dclab-0.62.16 → dclab-0.62.17}/dclab/rtdc_dataset/fmt_tdms/event_trace.py +0 -0
  146. {dclab-0.62.16 → dclab-0.62.17}/dclab/rtdc_dataset/fmt_tdms/exc.py +0 -0
  147. {dclab-0.62.16 → dclab-0.62.17}/dclab/rtdc_dataset/fmt_tdms/naming.py +0 -0
  148. {dclab-0.62.16 → dclab-0.62.17}/dclab/rtdc_dataset/load.py +0 -0
  149. {dclab-0.62.16 → dclab-0.62.17}/dclab/rtdc_dataset/meta_table.py +0 -0
  150. {dclab-0.62.16 → dclab-0.62.17}/dclab/rtdc_dataset/writer.py +0 -0
  151. {dclab-0.62.16 → dclab-0.62.17}/dclab/statistics.py +0 -0
  152. {dclab-0.62.16 → dclab-0.62.17}/dclab/warn.py +0 -0
  153. {dclab-0.62.16 → dclab-0.62.17}/dclab.egg-info/dependency_links.txt +0 -0
  154. {dclab-0.62.16 → dclab-0.62.17}/dclab.egg-info/entry_points.txt +0 -0
  155. {dclab-0.62.16 → dclab-0.62.17}/dclab.egg-info/top_level.txt +0 -0
  156. {dclab-0.62.16 → dclab-0.62.17}/docs/.gitignore +0 -0
  157. {dclab-0.62.16 → dclab-0.62.17}/docs/README.md +0 -0
  158. {dclab-0.62.16 → dclab-0.62.17}/docs/conf.py +0 -0
  159. {dclab-0.62.16 → dclab-0.62.17}/docs/data/example.poly +0 -0
  160. {dclab-0.62.16 → dclab-0.62.17}/docs/data/example.rtdc +0 -0
  161. {dclab-0.62.16 → dclab-0.62.17}/docs/data/example_plugin.py +0 -0
  162. {dclab-0.62.16 → dclab-0.62.17}/docs/data/example_plugin_metadata.py +0 -0
  163. {dclab-0.62.16 → dclab-0.62.17}/docs/data/example_traces.rtdc +0 -0
  164. {dclab-0.62.16 → dclab-0.62.17}/docs/data/example_video.rtdc +0 -0
  165. {dclab-0.62.16 → dclab-0.62.17}/docs/dclab.bib +0 -0
  166. {dclab-0.62.16 → dclab-0.62.17}/docs/extensions/dclab_defs.py +0 -0
  167. {dclab-0.62.16 → dclab-0.62.17}/docs/extensions/fancy_include.py +0 -0
  168. {dclab-0.62.16 → dclab-0.62.17}/docs/extensions/github_changelog.py +0 -0
  169. {dclab-0.62.16 → dclab-0.62.17}/docs/extensions/simple_argparse.py +0 -0
  170. {dclab-0.62.16 → dclab-0.62.17}/docs/figures/DCOR_API_Token_website.png +0 -0
  171. {dclab-0.62.16 → dclab-0.62.17}/docs/index.rst +0 -0
  172. {dclab-0.62.16 → dclab-0.62.17}/docs/logo/dc_logo.png +0 -0
  173. {dclab-0.62.16 → dclab-0.62.17}/docs/logo/dc_logo.svg +0 -0
  174. {dclab-0.62.16 → dclab-0.62.17}/docs/logo/dclab.png +0 -0
  175. {dclab-0.62.16 → dclab-0.62.17}/docs/logo/dclab.svg +0 -0
  176. {dclab-0.62.16 → dclab-0.62.17}/docs/logo/dclab_large_white.png +0 -0
  177. {dclab-0.62.16 → dclab-0.62.17}/docs/logo/dclab_large_white.svg +0 -0
  178. {dclab-0.62.16 → dclab-0.62.17}/docs/logo/favicon.ico +0 -0
  179. {dclab-0.62.16 → dclab-0.62.17}/docs/logo/favicon.svg +0 -0
  180. {dclab-0.62.16 → dclab-0.62.17}/docs/requirements.txt +0 -0
  181. {dclab-0.62.16 → dclab-0.62.17}/docs/sec_advanced_usage.rst +0 -0
  182. {dclab-0.62.16 → dclab-0.62.17}/docs/sec_av_basins/basin_example_workflows.svg +0 -0
  183. {dclab-0.62.16 → dclab-0.62.17}/docs/sec_av_basins/index.rst +0 -0
  184. {dclab-0.62.16 → dclab-0.62.17}/docs/sec_av_dc_io.rst +0 -0
  185. {dclab-0.62.16 → dclab-0.62.17}/docs/sec_av_dc_usage.rst +0 -0
  186. {dclab-0.62.16 → dclab-0.62.17}/docs/sec_av_dcor.rst +0 -0
  187. {dclab-0.62.16 → dclab-0.62.17}/docs/sec_av_emodulus/figures_emodulus/.gitignore +0 -0
  188. {dclab-0.62.16 → dclab-0.62.17}/docs/sec_av_emodulus/figures_emodulus/emodulus_20um_HE-2D-FEM-22.png +0 -0
  189. {dclab-0.62.16 → dclab-0.62.17}/docs/sec_av_emodulus/figures_emodulus/emodulus_20um_HE-3D-FEM-22.png +0 -0
  190. {dclab-0.62.16 → dclab-0.62.17}/docs/sec_av_emodulus/figures_emodulus/emodulus_20um_LE-2D-FEM-19.png +0 -0
  191. {dclab-0.62.16 → dclab-0.62.17}/docs/sec_av_emodulus/figures_emodulus/plot_emodulus_lut.py +0 -0
  192. {dclab-0.62.16 → dclab-0.62.17}/docs/sec_av_emodulus/figures_emodulus/requirements.txt +0 -0
  193. {dclab-0.62.16 → dclab-0.62.17}/docs/sec_av_emodulus/figures_viscosity/LICENSE +0 -0
  194. {dclab-0.62.16 → dclab-0.62.17}/docs/sec_av_emodulus/figures_viscosity/buyukurganci_22_fig3a.jpg +0 -0
  195. {dclab-0.62.16 → dclab-0.62.17}/docs/sec_av_emodulus/figures_viscosity/buyukurganci_22_fig3a.pdf +0 -0
  196. {dclab-0.62.16 → dclab-0.62.17}/docs/sec_av_emodulus/index.rst +0 -0
  197. {dclab-0.62.16 → dclab-0.62.17}/docs/sec_av_feat_plugin.rst +0 -0
  198. {dclab-0.62.16 → dclab-0.62.17}/docs/sec_av_feat_temp.rst +0 -0
  199. {dclab-0.62.16 → dclab-0.62.17}/docs/sec_av_fluorescence.rst +0 -0
  200. {dclab-0.62.16 → dclab-0.62.17}/docs/sec_av_lme4.rst +0 -0
  201. {dclab-0.62.16 → dclab-0.62.17}/docs/sec_av_notation.rst +0 -0
  202. {dclab-0.62.16 → dclab-0.62.17}/docs/sec_av_s3.rst +0 -0
  203. {dclab-0.62.16 → dclab-0.62.17}/docs/sec_av_scatter.rst +0 -0
  204. {dclab-0.62.16 → dclab-0.62.17}/docs/sec_changelog.rst +0 -0
  205. {dclab-0.62.16 → dclab-0.62.17}/docs/sec_cli.rst +0 -0
  206. {dclab-0.62.16 → dclab-0.62.17}/docs/sec_code_reference.rst +0 -0
  207. {dclab-0.62.16 → dclab-0.62.17}/docs/sec_examples.rst +0 -0
  208. {dclab-0.62.16 → dclab-0.62.17}/docs/sec_getting_started.rst +0 -0
  209. {dclab-0.62.16 → dclab-0.62.17}/docs/sec_z_bib.rst +0 -0
  210. {dclab-0.62.16 → dclab-0.62.17}/examples/emodulus_dcor.jpg +0 -0
  211. {dclab-0.62.16 → dclab-0.62.17}/examples/emodulus_dcor.py +0 -0
  212. {dclab-0.62.16 → dclab-0.62.17}/examples/generate_example_images.py +0 -0
  213. {dclab-0.62.16 → dclab-0.62.17}/examples/isoelastics.jpg +0 -0
  214. {dclab-0.62.16 → dclab-0.62.17}/examples/isoelastics.py +0 -0
  215. {dclab-0.62.16 → dclab-0.62.17}/examples/isoelastics_custom.jpg +0 -0
  216. {dclab-0.62.16 → dclab-0.62.17}/examples/isoelastics_custom.py +0 -0
  217. {dclab-0.62.16 → dclab-0.62.17}/examples/lme4_glmer_diff.py +0 -0
  218. {dclab-0.62.16 → dclab-0.62.17}/examples/lme4_lmer.jpg +0 -0
  219. {dclab-0.62.16 → dclab-0.62.17}/examples/lme4_lmer.py +0 -0
  220. {dclab-0.62.16 → dclab-0.62.17}/examples/overview_plot.jpg +0 -0
  221. {dclab-0.62.16 → dclab-0.62.17}/examples/overview_plot.py +0 -0
  222. {dclab-0.62.16 → dclab-0.62.17}/examples/plugin_example.py +0 -0
  223. {dclab-0.62.16 → dclab-0.62.17}/examples/plugin_usage.jpg +0 -0
  224. {dclab-0.62.16 → dclab-0.62.17}/examples/plugin_usage.py +0 -0
  225. {dclab-0.62.16 → dclab-0.62.17}/examples/viscosity_models.jpg +0 -0
  226. {dclab-0.62.16 → dclab-0.62.17}/examples/viscosity_models.py +0 -0
  227. {dclab-0.62.16 → dclab-0.62.17}/scripts/.gitignore +0 -0
  228. {dclab-0.62.16 → dclab-0.62.17}/scripts/README.md +0 -0
  229. {dclab-0.62.16 → dclab-0.62.17}/scripts/fem2iso_volume.py +0 -0
  230. {dclab-0.62.16 → dclab-0.62.17}/scripts/fem2lutiso_std.py +0 -0
  231. {dclab-0.62.16 → dclab-0.62.17}/scripts/fem2rtdc.py +0 -0
  232. {dclab-0.62.16 → dclab-0.62.17}/scripts/lut_recipes/__init__.py +0 -0
  233. {dclab-0.62.16 → dclab-0.62.17}/scripts/lut_recipes/hooks/LUT_analytical_linear-elastic_2Daxis.txt +0 -0
  234. {dclab-0.62.16 → dclab-0.62.17}/scripts/lut_recipes/hooks/README.md +0 -0
  235. {dclab-0.62.16 → dclab-0.62.17}/scripts/lut_recipes/hooks/__init__.py +0 -0
  236. {dclab-0.62.16 → dclab-0.62.17}/scripts/lut_recipes/hooks/common.py +0 -0
  237. {dclab-0.62.16 → dclab-0.62.17}/scripts/lut_recipes/hooks/he_2d_fem_22.py +0 -0
  238. {dclab-0.62.16 → dclab-0.62.17}/scripts/lut_recipes/hooks/he_3d_fem_22.py +0 -0
  239. {dclab-0.62.16 → dclab-0.62.17}/scripts/lut_recipes/hooks/le_2d_fem_19.py +0 -0
  240. {dclab-0.62.16 → dclab-0.62.17}/scripts/lut_recipes/lut_processor.py +0 -0
  241. {dclab-0.62.16 → dclab-0.62.17}/scripts/pixelation_correction.py +0 -0
  242. {dclab-0.62.16 → dclab-0.62.17}/scripts/pixelation_correction_2020.png +0 -0
  243. {dclab-0.62.16 → dclab-0.62.17}/scripts/pixelation_correction_2022.png +0 -0
  244. {dclab-0.62.16 → dclab-0.62.17}/scripts/requirements.txt +0 -0
  245. {dclab-0.62.16 → dclab-0.62.17}/setup.cfg +0 -0
  246. {dclab-0.62.16 → dclab-0.62.17}/setup.py +0 -0
  247. {dclab-0.62.16 → dclab-0.62.17}/tests/README.md +0 -0
  248. {dclab-0.62.16 → dclab-0.62.17}/tests/conftest.py +0 -0
  249. {dclab-0.62.16 → dclab-0.62.17}/tests/data/README.md +0 -0
  250. {dclab-0.62.16 → dclab-0.62.17}/tests/data/example_access_token.dcor-access +0 -0
  251. {dclab-0.62.16 → dclab-0.62.17}/tests/data/example_isoelastics.txt +0 -0
  252. {dclab-0.62.16 → dclab-0.62.17}/tests/data/feat_anc_plugin_creative.py +0 -0
  253. {dclab-0.62.16 → dclab-0.62.17}/tests/data/fmt-hdf5_fl-no-contour_2019.zip +0 -0
  254. {dclab-0.62.16 → dclab-0.62.17}/tests/data/fmt-hdf5_fl_2017.zip +0 -0
  255. {dclab-0.62.16 → dclab-0.62.17}/tests/data/fmt-hdf5_fl_2018.zip +0 -0
  256. {dclab-0.62.16 → dclab-0.62.17}/tests/data/fmt-hdf5_fl_wide-channel_2023.zip +0 -0
  257. {dclab-0.62.16 → dclab-0.62.17}/tests/data/fmt-hdf5_image-bg_2020.zip +0 -0
  258. {dclab-0.62.16 → dclab-0.62.17}/tests/data/fmt-hdf5_image-mask-blood_2021.zip +0 -0
  259. {dclab-0.62.16 → dclab-0.62.17}/tests/data/fmt-hdf5_mask-contour_2018.zip +0 -0
  260. {dclab-0.62.16 → dclab-0.62.17}/tests/data/fmt-hdf5_polygon_gate_2021.zip +0 -0
  261. {dclab-0.62.16 → dclab-0.62.17}/tests/data/fmt-hdf5_raw-cytoshot-exported.zip +0 -0
  262. {dclab-0.62.16 → dclab-0.62.17}/tests/data/fmt-hdf5_segfault-compound_2023.zip +0 -0
  263. {dclab-0.62.16 → dclab-0.62.17}/tests/data/fmt-hdf5_wide-channel_2023.zip +0 -0
  264. {dclab-0.62.16 → dclab-0.62.17}/tests/data/fmt-tdms_2fl-no-image_2017.zip +0 -0
  265. {dclab-0.62.16 → dclab-0.62.17}/tests/data/fmt-tdms_fl-image-bright_2017.zip +0 -0
  266. {dclab-0.62.16 → dclab-0.62.17}/tests/data/fmt-tdms_fl-image-large-fov_2017.zip +0 -0
  267. {dclab-0.62.16 → dclab-0.62.17}/tests/data/fmt-tdms_fl-image_2016.zip +0 -0
  268. {dclab-0.62.16 → dclab-0.62.17}/tests/data/fmt-tdms_fl_2015.zip +0 -0
  269. {dclab-0.62.16 → dclab-0.62.17}/tests/data/fmt-tdms_minimal_2016.zip +0 -0
  270. {dclab-0.62.16 → dclab-0.62.17}/tests/data/fmt-tdms_shapein-2.0.1-no-image_2017.zip +0 -0
  271. {dclab-0.62.16 → dclab-0.62.17}/tests/helper_methods.py +0 -0
  272. {dclab-0.62.16 → dclab-0.62.17}/tests/requirements.txt +0 -0
  273. {dclab-0.62.16 → dclab-0.62.17}/tests/test_cache.py +0 -0
  274. {dclab-0.62.16 → dclab-0.62.17}/tests/test_cli.py +0 -0
  275. {dclab-0.62.16 → dclab-0.62.17}/tests/test_cli_argparse.py +0 -0
  276. {dclab-0.62.16 → dclab-0.62.17}/tests/test_cli_compress.py +0 -0
  277. {dclab-0.62.16 → dclab-0.62.17}/tests/test_cli_join.py +0 -0
  278. {dclab-0.62.16 → dclab-0.62.17}/tests/test_cli_repack.py +0 -0
  279. {dclab-0.62.16 → dclab-0.62.17}/tests/test_cli_split.py +0 -0
  280. {dclab-0.62.16 → dclab-0.62.17}/tests/test_config_value_mapping.py +0 -0
  281. {dclab-0.62.16 → dclab-0.62.17}/tests/test_dfn.py +0 -0
  282. {dclab-0.62.16 → dclab-0.62.17}/tests/test_downsampling.py +0 -0
  283. {dclab-0.62.16 → dclab-0.62.17}/tests/test_feat_bright.py +0 -0
  284. {dclab-0.62.16 → dclab-0.62.17}/tests/test_feat_bright_bc.py +0 -0
  285. {dclab-0.62.16 → dclab-0.62.17}/tests/test_feat_bright_perc.py +0 -0
  286. {dclab-0.62.16 → dclab-0.62.17}/tests/test_feat_contour.py +0 -0
  287. {dclab-0.62.16 → dclab-0.62.17}/tests/test_feat_emodulus.py +0 -0
  288. {dclab-0.62.16 → dclab-0.62.17}/tests/test_feat_emodulus_viscosity.py +0 -0
  289. {dclab-0.62.16 → dclab-0.62.17}/tests/test_feat_fl_crosstalk.py +0 -0
  290. {dclab-0.62.16 → dclab-0.62.17}/tests/test_feat_inert_ratio.py +0 -0
  291. {dclab-0.62.16 → dclab-0.62.17}/tests/test_feat_volume.py +0 -0
  292. {dclab-0.62.16 → dclab-0.62.17}/tests/test_http_utils.py +0 -0
  293. {dclab-0.62.16 → dclab-0.62.17}/tests/test_isoelastics.py +0 -0
  294. {dclab-0.62.16 → dclab-0.62.17}/tests/test_lme4.py +0 -0
  295. {dclab-0.62.16 → dclab-0.62.17}/tests/test_lut_he_2d_fem_22.py +0 -0
  296. {dclab-0.62.16 → dclab-0.62.17}/tests/test_lut_he_3d_fem_22.py +0 -0
  297. {dclab-0.62.16 → dclab-0.62.17}/tests/test_polygon_contains.py +0 -0
  298. {dclab-0.62.16 → dclab-0.62.17}/tests/test_polygon_filter.py +0 -0
  299. {dclab-0.62.16 → dclab-0.62.17}/tests/test_rtdc_check_dataset.py +0 -0
  300. {dclab-0.62.16 → dclab-0.62.17}/tests/test_rtdc_config.py +0 -0
  301. {dclab-0.62.16 → dclab-0.62.17}/tests/test_rtdc_copier.py +0 -0
  302. {dclab-0.62.16 → dclab-0.62.17}/tests/test_rtdc_core_feat.py +0 -0
  303. {dclab-0.62.16 → dclab-0.62.17}/tests/test_rtdc_downsampling.py +0 -0
  304. {dclab-0.62.16 → dclab-0.62.17}/tests/test_rtdc_export.py +0 -0
  305. {dclab-0.62.16 → dclab-0.62.17}/tests/test_rtdc_export_fcs.py +0 -0
  306. {dclab-0.62.16 → dclab-0.62.17}/tests/test_rtdc_export_hdf5.py +0 -0
  307. {dclab-0.62.16 → dclab-0.62.17}/tests/test_rtdc_export_tsv.py +0 -0
  308. {dclab-0.62.16 → dclab-0.62.17}/tests/test_rtdc_feat_anc_core.py +0 -0
  309. {dclab-0.62.16 → dclab-0.62.17}/tests/test_rtdc_feat_anc_ml.py +0 -0
  310. {dclab-0.62.16 → dclab-0.62.17}/tests/test_rtdc_feat_anc_plugin.py +0 -0
  311. {dclab-0.62.16 → dclab-0.62.17}/tests/test_rtdc_feat_basin.py +0 -0
  312. {dclab-0.62.16 → dclab-0.62.17}/tests/test_rtdc_feat_basin_mapped.py +0 -0
  313. {dclab-0.62.16 → dclab-0.62.17}/tests/test_rtdc_feat_temp.py +0 -0
  314. {dclab-0.62.16 → dclab-0.62.17}/tests/test_rtdc_filter.py +0 -0
  315. {dclab-0.62.16 → dclab-0.62.17}/tests/test_rtdc_fmt_dcor.py +0 -0
  316. {dclab-0.62.16 → dclab-0.62.17}/tests/test_rtdc_fmt_dcor_access_token.py +0 -0
  317. {dclab-0.62.16 → dclab-0.62.17}/tests/test_rtdc_fmt_dcor_basin.py +0 -0
  318. {dclab-0.62.16 → dclab-0.62.17}/tests/test_rtdc_fmt_dict.py +0 -0
  319. {dclab-0.62.16 → dclab-0.62.17}/tests/test_rtdc_fmt_hdf5.py +0 -0
  320. {dclab-0.62.16 → dclab-0.62.17}/tests/test_rtdc_fmt_hdf5_basins.py +0 -0
  321. {dclab-0.62.16 → dclab-0.62.17}/tests/test_rtdc_fmt_hdf5_basins_internal.py +0 -0
  322. {dclab-0.62.16 → dclab-0.62.17}/tests/test_rtdc_fmt_hierarchy.py +0 -0
  323. {dclab-0.62.16 → dclab-0.62.17}/tests/test_rtdc_fmt_http.py +0 -0
  324. {dclab-0.62.16 → dclab-0.62.17}/tests/test_rtdc_fmt_http_basin.py +0 -0
  325. {dclab-0.62.16 → dclab-0.62.17}/tests/test_rtdc_fmt_s3.py +0 -0
  326. {dclab-0.62.16 → dclab-0.62.17}/tests/test_rtdc_fmt_s3_basin.py +0 -0
  327. {dclab-0.62.16 → dclab-0.62.17}/tests/test_rtdc_fmt_tdms.py +0 -0
  328. {dclab-0.62.16 → dclab-0.62.17}/tests/test_rtdc_hash.py +0 -0
  329. {dclab-0.62.16 → dclab-0.62.17}/tests/test_rtdc_limit_events.py +0 -0
  330. {dclab-0.62.16 → dclab-0.62.17}/tests/test_rtdc_writer.py +0 -0
  331. {dclab-0.62.16 → dclab-0.62.17}/tests/test_statistics.py +0 -0
@@ -1,3 +1,8 @@
1
+ 0.62.17
2
+ - docs: properly employ license GPL-2.0-or-later
3
+ - ref: add KernelDensityEstimator class
4
+ - ref: perform avi export with PyAV instead of imageio
5
+ - setup: bump fcswrite to 0.5.1
1
6
  0.62.16
2
7
  - enh: allow editing S3 credentials via environment variables at runtime
3
8
  - docs: fix typo in S3 section (missing `DCLAB_S3_SECRET_ACCESS_KEY`)
@@ -1,5 +1,5 @@
1
1
  Unless otherwise specified by LICENSE files in individual
2
- directories, all code is
2
+ directories, all code is licensed under the following license.
3
3
 
4
4
  GNU GENERAL PUBLIC LICENSE
5
5
  Version 2, June 1991
@@ -281,63 +281,3 @@ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
281
281
  POSSIBILITY OF SUCH DAMAGES.
282
282
 
283
283
  END OF TERMS AND CONDITIONS
284
-
285
- How to Apply These Terms to Your New Programs
286
-
287
- If you develop a new program, and you want it to be of the greatest
288
- possible use to the public, the best way to achieve this is to make it
289
- free software which everyone can redistribute and change under these terms.
290
-
291
- To do so, attach the following notices to the program. It is safest
292
- to attach them to the start of each source file to most effectively
293
- convey the exclusion of warranty; and each file should have at least
294
- the "copyright" line and a pointer to where the full notice is found.
295
-
296
- {description}
297
- Copyright (C) {year} {fullname}
298
-
299
- This program is free software; you can redistribute it and/or modify
300
- it under the terms of the GNU General Public License as published by
301
- the Free Software Foundation; either version 2 of the License, or
302
- (at your option) any later version.
303
-
304
- This program is distributed in the hope that it will be useful,
305
- but WITHOUT ANY WARRANTY; without even the implied warranty of
306
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
307
- GNU General Public License for more details.
308
-
309
- You should have received a copy of the GNU General Public License along
310
- with this program; if not, write to the Free Software Foundation, Inc.,
311
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
312
-
313
- Also add information on how to contact you by electronic and paper mail.
314
-
315
- If the program is interactive, make it output a short notice like this
316
- when it starts in an interactive mode:
317
-
318
- Gnomovision version 69, Copyright (C) year name of author
319
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
320
- This is free software, and you are welcome to redistribute it
321
- under certain conditions; type `show c' for details.
322
-
323
- The hypothetical commands `show w' and `show c' should show the appropriate
324
- parts of the General Public License. Of course, the commands you use may
325
- be called something other than `show w' and `show c'; they could even be
326
- mouse-clicks or menu items--whatever suits your program.
327
-
328
- You should also get your employer (if you work as a programmer) or your
329
- school, if any, to sign a "copyright disclaimer" for the program, if
330
- necessary. Here is a sample; alter the names:
331
-
332
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
333
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
334
-
335
- {signature of Ty Coon}, 1 April 1989
336
- Ty Coon, President of Vice
337
-
338
- This General Public License does not permit incorporating your program into
339
- proprietary programs. If your program is a subroutine library, you may
340
- consider it more useful to permit linking proprietary applications with the
341
- library. If this is what you want to do, use the GNU Lesser General
342
- Public License instead of this License.
343
-
@@ -1,10 +1,10 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dclab
3
- Version: 0.62.16
3
+ Version: 0.62.17
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 version 2.0 or later
7
+ License: 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/
@@ -27,8 +27,8 @@ Requires-Dist: dclab[dcor,export,http,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
30
- Requires-Dist: fcswrite>=0.5.0; extra == "export"
31
- Requires-Dist: imageio[ffmpeg]; extra == "export"
30
+ Requires-Dist: fcswrite>=0.5.1; extra == "export"
31
+ Requires-Dist: av; extra == "export"
32
32
  Provides-Extra: http
33
33
  Requires-Dist: requests<3,>=2.31.0; extra == "http"
34
34
  Provides-Extra: s3
@@ -0,0 +1,41 @@
1
+ """Core tools for the analysis of deformability cytometry datasets
2
+
3
+ Copyright (C) 2015 Paul Müller
4
+
5
+ This program is free software; you can redistribute it and/or modify
6
+ it under the terms of the GNU General Public License as published by
7
+ the Free Software Foundation; either version 2 of the License, or
8
+ (at your option) any later version.
9
+
10
+ This program is distributed in the hope that it will be useful,
11
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ GNU General Public License for more details.
14
+
15
+ You should have received a copy of the GNU General Public License along
16
+ with this program; if not, write to the Free Software Foundation, Inc.,
17
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18
+ """
19
+ # flake8: noqa: F401
20
+ from . import definitions as dfn
21
+ from . import features
22
+ from . import isoelastics
23
+ from . import lme4
24
+ from .polygon_filter import PolygonFilter
25
+ from . import rtdc_dataset
26
+ from .rtdc_dataset import new_dataset, IntegrityChecker, RTDCWriter
27
+ from .rtdc_dataset.feat_temp import (
28
+ register_temporary_feature, set_temporary_feature)
29
+ from .rtdc_dataset.feat_anc_ml import (
30
+ MachineLearningFeature, load_modc, load_ml_feature, save_modc)
31
+ from .rtdc_dataset.feat_anc_plugin.plugin_feature import (
32
+ PlugInFeature, load_plugin_feature)
33
+ from . import statistics
34
+ from . import util
35
+
36
+ from ._version import __version__, __version_tuple__
37
+
38
+
39
+ # Lazy-load deprecated kde modules
40
+ kde_contours = util.LazyLoader("dclab.kde_contours")
41
+ kde_methods = util.LazyLoader("dclab.kde_methods")
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '0.62.16'
21
- __version_tuple__ = version_tuple = (0, 62, 16)
20
+ __version__ = version = '0.62.17'
21
+ __version_tuple__ = version_tuple = (0, 62, 17)
@@ -0,0 +1 @@
1
+ from .base import KernelDensityEstimator # noqa: F401
@@ -0,0 +1,238 @@
1
+ import warnings
2
+
3
+ import numpy as np
4
+
5
+ from .methods import bin_width_doane, get_bad_vals, methods
6
+
7
+
8
+ class KernelDensityEstimator:
9
+ def __init__(self, rtdc_ds):
10
+ self.rtdc_ds = rtdc_ds
11
+
12
+ @staticmethod
13
+ def apply_scale(a, scale, feat):
14
+ """Helper function for transforming an aray to log-scale
15
+
16
+ Parameters
17
+ ----------
18
+ a: np.ndarray
19
+ Input array
20
+ scale: str
21
+ If set to "log", take the logarithm of `a`; if set to
22
+ "linear" return `a` unchanged.
23
+ feat: str
24
+ Feature name (required for debugging)
25
+
26
+ Returns
27
+ -------
28
+ b: np.ndarray
29
+ The scaled array
30
+
31
+ Notes
32
+ -----
33
+ If the scale is not "linear", then a new array is returned.
34
+ All warnings are suppressed when computing `np.log(a)`, as
35
+ `a` may have negative or nan values.
36
+ """
37
+ if scale == "linear":
38
+ b = a
39
+ elif scale == "log":
40
+ with warnings.catch_warnings(record=True) as w:
41
+ warnings.simplefilter("always")
42
+ b = np.log(a)
43
+ if len(w):
44
+ # Tell the user that the log-transformation issued
45
+ # a warning.
46
+ warnings.warn(f"Invalid values encounterd in np.log "
47
+ f"while scaling feature '{feat}'!")
48
+ else:
49
+ raise ValueError(f"`scale` must be either 'linear' or 'log', "
50
+ f"got '{scale}'!")
51
+ return b
52
+
53
+ @staticmethod
54
+ def get_spacing(a, method, scale="linear", method_kw=None,
55
+ feat="undefined", ret_scaled=False):
56
+ """Convenience function for computing the contour spacing
57
+
58
+ Parameters
59
+ ----------
60
+ a: ndarray
61
+ feature data
62
+ scale: str
63
+ how the data should be scaled ("log" or "linear")
64
+ method: callable
65
+ KDE spacing method to use
66
+ method_kw: dict
67
+ keyword arguments to `method`
68
+ feat: str
69
+ feature name for debugging
70
+ ret_scaled: bool
71
+ whether to return the scaled array of `a`
72
+ """
73
+ if method_kw is None:
74
+ method_kw = {}
75
+ # Apply scale (no change for linear scale)
76
+ asc = KernelDensityEstimator.apply_scale(a, scale, feat)
77
+ # Apply multiplicator
78
+ acc = method(asc, **method_kw)
79
+ if ret_scaled:
80
+ return acc, asc
81
+ else:
82
+ return acc
83
+
84
+ def get_contour(self, xax="area_um", yax="deform", xacc=None, yacc=None,
85
+ kde_type="histogram", kde_kwargs=None, xscale="linear",
86
+ yscale="linear"):
87
+ """Evaluate the kernel density estimate for contour plots
88
+
89
+ Parameters
90
+ ----------
91
+ xax: str
92
+ Identifier for X axis (e.g. "area_um", "aspect", "deform")
93
+ yax: str
94
+ Identifier for Y axis
95
+ xacc: float
96
+ Contour accuracy in x direction
97
+ yacc: float
98
+ Contour accuracy in y direction
99
+ kde_type: str
100
+ The KDE method to use
101
+ kde_kwargs: dict
102
+ Additional keyword arguments to the KDE method
103
+ xscale: str
104
+ If set to "log", take the logarithm of the x-values before
105
+ computing the KDE. This is useful when data are
106
+ displayed on a log-scale. Defaults to "linear".
107
+ yscale: str
108
+ See `xscale`.
109
+
110
+ Returns
111
+ -------
112
+ X, Y, Z : coordinates
113
+ The kernel density Z evaluated on a rectangular grid (X,Y).
114
+ """
115
+ if kde_kwargs is None:
116
+ kde_kwargs = {}
117
+ xax = xax.lower()
118
+ yax = yax.lower()
119
+ kde_type = kde_type.lower()
120
+ if kde_type not in methods:
121
+ raise ValueError(f"Not a valid kde type: {kde_type}!")
122
+
123
+ # Get data
124
+ x = self.rtdc_ds[xax][self.rtdc_ds.filter.all]
125
+ y = self.rtdc_ds[yax][self.rtdc_ds.filter.all]
126
+
127
+ xacc_sc, xs = self.get_spacing(
128
+ a=x,
129
+ feat=xax,
130
+ scale=xscale,
131
+ method=bin_width_doane,
132
+ ret_scaled=True)
133
+
134
+ yacc_sc, ys = self.get_spacing(
135
+ a=y,
136
+ feat=yax,
137
+ scale=yscale,
138
+ method=bin_width_doane,
139
+ ret_scaled=True)
140
+
141
+ if xacc is None or xacc == 0:
142
+ xacc = xacc_sc / 5
143
+
144
+ if yacc is None or yacc == 0:
145
+ yacc = yacc_sc / 5
146
+
147
+ # Ignore infs and nans
148
+ bad = get_bad_vals(xs, ys)
149
+ xc = xs[~bad]
150
+ yc = ys[~bad]
151
+
152
+ xnum = int(np.ceil((xc.max() - xc.min()) / xacc))
153
+ ynum = int(np.ceil((yc.max() - yc.min()) / yacc))
154
+
155
+ xlin = np.linspace(xc.min(), xc.max(), xnum, endpoint=True)
156
+ ylin = np.linspace(yc.min(), yc.max(), ynum, endpoint=True)
157
+
158
+ xmesh, ymesh = np.meshgrid(xlin, ylin, indexing="ij")
159
+
160
+ kde_fct = methods[kde_type]
161
+ if len(x):
162
+ density = kde_fct(events_x=xs, events_y=ys,
163
+ xout=xmesh, yout=ymesh,
164
+ **kde_kwargs)
165
+ else:
166
+ density = np.array([])
167
+
168
+ # Convert mesh back to linear scale if applicable
169
+ if xscale == "log":
170
+ xmesh = np.exp(xmesh)
171
+ if yscale == "log":
172
+ ymesh = np.exp(ymesh)
173
+
174
+ return xmesh, ymesh, density
175
+
176
+ def get_scatter(self, xax="area_um", yax="deform", positions=None,
177
+ kde_type="histogram", kde_kwargs=None, xscale="linear",
178
+ yscale="linear"):
179
+ """Evaluate the kernel density estimate for scatter plots
180
+
181
+ Parameters
182
+ ----------
183
+ xax: str
184
+ Identifier for X axis (e.g. "area_um", "aspect", "deform")
185
+ yax: str
186
+ Identifier for Y axis
187
+ positions: list of two 1d ndarrays or ndarray of shape (2, N)
188
+ The positions where the KDE will be computed. Note that
189
+ the KDE estimate is computed from the points that
190
+ are set in `self.rtdc_ds.filter.all`.
191
+ kde_type: str
192
+ The KDE method to use, see :const:`.kde_methods.methods`
193
+ kde_kwargs: dict
194
+ Additional keyword arguments to the KDE method
195
+ xscale: str
196
+ If set to "log", take the logarithm of the x-values before
197
+ computing the KDE. This is useful when data are are
198
+ displayed on a log-scale. Defaults to "linear".
199
+ yscale: str
200
+ See `xscale`.
201
+
202
+ Returns
203
+ -------
204
+ density : 1d ndarray
205
+ The kernel density evaluated for the filtered data points.
206
+ """
207
+ if kde_kwargs is None:
208
+ kde_kwargs = {}
209
+ xax = xax.lower()
210
+ yax = yax.lower()
211
+ kde_type = kde_type.lower()
212
+ if kde_type not in methods:
213
+ raise ValueError(f"Not a valid kde type: {kde_type}!")
214
+
215
+ # Get data
216
+ x = self.rtdc_ds[xax][self.rtdc_ds.filter.all]
217
+ y = self.rtdc_ds[yax][self.rtdc_ds.filter.all]
218
+
219
+ # Apply scale (no change for linear scale)
220
+ xs = self.apply_scale(x, xscale, xax)
221
+ ys = self.apply_scale(y, yscale, yax)
222
+
223
+ if positions is None:
224
+ posx = None
225
+ posy = None
226
+ else:
227
+ posx = self.apply_scale(positions[0], xscale, xax)
228
+ posy = self.apply_scale(positions[1], yscale, yax)
229
+
230
+ kde_fct = methods[kde_type]
231
+ if len(x):
232
+ density = kde_fct(events_x=xs, events_y=ys,
233
+ xout=posx, yout=posy,
234
+ **kde_kwargs)
235
+ else:
236
+ density = np.array([])
237
+
238
+ return density
@@ -1,10 +1,10 @@
1
1
 
2
2
  import numpy as np
3
3
 
4
- from .external.skimage.measure import find_contours, points_in_poly
4
+ from ..external.skimage.measure import find_contours, points_in_poly
5
5
  import scipy.interpolate as spint
6
6
 
7
- from .kde_methods import get_bad_vals
7
+ from .methods import get_bad_vals
8
8
 
9
9
 
10
10
  def find_contours_level(density, x, y, level, closed=False):
@@ -4,8 +4,8 @@ import numpy as np
4
4
  from scipy.interpolate import RectBivariateSpline
5
5
  from scipy.stats import gaussian_kde, skew
6
6
 
7
- from .cached import Cache
8
- from .external.statsmodels.nonparametric.kernel_density import KDEMultivariate
7
+ from ..cached import Cache
8
+ from ..external.statsmodels.nonparametric.kernel_density import KDEMultivariate
9
9
 
10
10
 
11
11
  def bin_num_doane(a):
@@ -0,0 +1,10 @@
1
+ import warnings
2
+
3
+ from .kde.contours import ( # noqa: F401
4
+ find_contours_level, _find_quantile_level, get_quantile_levels
5
+ )
6
+
7
+
8
+ warnings.warn("`dclab.kde_contours` is deprecated; please use "
9
+ "the `dclab.kde.contours` instead",
10
+ DeprecationWarning)
@@ -0,0 +1,11 @@
1
+ import warnings
2
+
3
+ from .kde.methods import ( # noqa: F401
4
+ bin_num_doane, bin_width_doane, bin_width_percentile, get_bad_vals,
5
+ ignore_nan_inf, kde_gauss, kde_histogram, kde_multivariate, kde_none,
6
+ methods
7
+ )
8
+
9
+ warnings.warn("`dclab.kde_methods` is deprecated; please use "
10
+ "the `dclab.kde.methods` instead",
11
+ DeprecationWarning)
@@ -4,23 +4,23 @@ import hashlib
4
4
  import json
5
5
  import os.path
6
6
  import pathlib
7
+ import random
7
8
  import traceback
8
9
  from typing import Literal
9
10
  import uuid
10
- import random
11
11
  import warnings
12
12
 
13
13
  import numpy as np
14
14
 
15
15
  from .. import definitions as dfn
16
16
  from .. import downsampling
17
+ from ..kde import KernelDensityEstimator
18
+ from ..kde import methods as kde_methods
17
19
  from ..polygon_filter import PolygonFilter
18
- from .. import kde_methods
19
20
  from ..util import hashobj
20
-
21
- from .feat_anc_core import AncillaryFeature, FEATURES_RAPID
22
21
  from . import feat_basin
23
22
  from .export import Export
23
+ from .feat_anc_core import FEATURES_RAPID, AncillaryFeature
24
24
  from .filter import Filter
25
25
 
26
26
 
@@ -28,6 +28,10 @@ class FeatureShouldExistButNotFoundWarning(UserWarning):
28
28
  pass
29
29
 
30
30
 
31
+ class LocalBasinForbiddenWarning(UserWarning):
32
+ pass
33
+
34
+
31
35
  class LogTransformWarning(UserWarning):
32
36
  pass
33
37
 
@@ -322,47 +326,6 @@ class RTDCBase(abc.ABC):
322
326
  pass
323
327
  return data
324
328
 
325
- @staticmethod
326
- def _apply_scale(a, scale, feat):
327
- """Helper function for transforming an aray to log-scale
328
-
329
- Parameters
330
- ----------
331
- a: np.ndarray
332
- Input array
333
- scale: str
334
- If set to "log", take the logarithm of `a`; if set to
335
- "linear" return `a` unchanged.
336
- feat: str
337
- Feature name (required for debugging)
338
-
339
- Returns
340
- -------
341
- b: np.ndarray
342
- The scaled array
343
-
344
- Notes
345
- -----
346
- If the scale is not "linear", then a new array is returned.
347
- All warnings are suppressed when computing `np.log(a)`, as
348
- `a` may have negative or nan values.
349
- """
350
- if scale == "linear":
351
- b = a
352
- elif scale == "log":
353
- with warnings.catch_warnings(record=True) as w:
354
- warnings.simplefilter("always")
355
- b = np.log(a)
356
- if len(w):
357
- # Tell the user that the log-transformation issued
358
- # a warning.
359
- warnings.warn("Invalid values encounterd in np.log "
360
- "while scaling feature '{}'!".format(feat))
361
- else:
362
- raise ValueError("`scale` must be either 'linear' or 'log', "
363
- + "got '{}'!".format(scale))
364
- return b
365
-
366
329
  @staticmethod
367
330
  def get_kde_spacing(a, scale="linear", method=kde_methods.bin_width_doane,
368
331
  method_kw=None, feat="undefined", ret_scaled=False):
@@ -383,16 +346,14 @@ class RTDCBase(abc.ABC):
383
346
  ret_scaled: bool
384
347
  whether to return the scaled array of `a`
385
348
  """
386
- if method_kw is None:
387
- method_kw = {}
388
- # Apply scale (no change for linear scale)
389
- asc = RTDCBase._apply_scale(a, scale, feat)
390
- # Apply multiplicator
391
- acc = method(asc, **method_kw)
392
- if ret_scaled:
393
- return acc, asc
394
- else:
395
- return acc
349
+ return KernelDensityEstimator.get_spacing(
350
+ a=a,
351
+ scale=scale,
352
+ method=method,
353
+ method_kw=method_kw,
354
+ feat=feat,
355
+ ret_scaled=ret_scaled,
356
+ )
396
357
 
397
358
  @property
398
359
  def _feature_candidates(self):
@@ -625,8 +586,8 @@ class RTDCBase(abc.ABC):
625
586
  y = self[yax][self.filter.all]
626
587
 
627
588
  # Apply scale (no change for linear scale)
628
- xs = RTDCBase._apply_scale(x, xscale, xax)
629
- ys = RTDCBase._apply_scale(y, yscale, yax)
589
+ xs = KernelDensityEstimator.apply_scale(x, xscale, xax)
590
+ ys = KernelDensityEstimator.apply_scale(y, yscale, yax)
630
591
 
631
592
  _, _, idx = downsampling.downsample_grid(xs, ys,
632
593
  samples=downsample,
@@ -673,64 +634,11 @@ class RTDCBase(abc.ABC):
673
634
  X, Y, Z : coordinates
674
635
  The kernel density Z evaluated on a rectangular grid (X,Y).
675
636
  """
676
- if kde_kwargs is None:
677
- kde_kwargs = {}
678
- xax = xax.lower()
679
- yax = yax.lower()
680
- kde_type = kde_type.lower()
681
- if kde_type not in kde_methods.methods:
682
- raise ValueError("Not a valid kde type: {}!".format(kde_type))
683
-
684
- # Get data
685
- x = self[xax][self.filter.all]
686
- y = self[yax][self.filter.all]
687
-
688
- xacc_sc, xs = RTDCBase.get_kde_spacing(
689
- a=x,
690
- feat=xax,
691
- scale=xscale,
692
- method=kde_methods.bin_width_doane,
693
- ret_scaled=True)
694
-
695
- yacc_sc, ys = RTDCBase.get_kde_spacing(
696
- a=y,
697
- feat=yax,
698
- scale=yscale,
699
- method=kde_methods.bin_width_doane,
700
- ret_scaled=True)
701
-
702
- if xacc is None or xacc == 0:
703
- xacc = xacc_sc / 5
704
-
705
- if yacc is None or yacc == 0:
706
- yacc = yacc_sc / 5
707
-
708
- # Ignore infs and nans
709
- bad = kde_methods.get_bad_vals(xs, ys)
710
- xc = xs[~bad]
711
- yc = ys[~bad]
712
-
713
- xnum = int(np.ceil((xc.max() - xc.min()) / xacc))
714
- ynum = int(np.ceil((yc.max() - yc.min()) / yacc))
715
-
716
- xlin = np.linspace(xc.min(), xc.max(), xnum, endpoint=True)
717
- ylin = np.linspace(yc.min(), yc.max(), ynum, endpoint=True)
718
-
719
- xmesh, ymesh = np.meshgrid(xlin, ylin, indexing="ij")
720
-
721
- kde_fct = kde_methods.methods[kde_type]
722
- if len(x):
723
- density = kde_fct(events_x=xs, events_y=ys,
724
- xout=xmesh, yout=ymesh,
725
- **kde_kwargs)
726
- else:
727
- density = np.array([])
728
-
729
- # Convert mesh back to linear scale if applicable
730
- if xscale == "log":
731
- xmesh = np.exp(xmesh)
732
- if yscale == "log":
733
- ymesh = np.exp(ymesh)
637
+ kde_instance = KernelDensityEstimator(rtdc_ds=self)
638
+ xmesh, ymesh, density = kde_instance.get_contour(
639
+ xax=xax, yax=yax, xacc=xacc, yacc=yacc, kde_type=kde_type,
640
+ kde_kwargs=kde_kwargs, xscale=xscale, yscale=yscale
641
+ )
734
642
 
735
643
  return xmesh, ymesh, density
736
644
 
@@ -765,36 +673,11 @@ class RTDCBase(abc.ABC):
765
673
  density : 1d ndarray
766
674
  The kernel density evaluated for the filtered data points.
767
675
  """
768
- if kde_kwargs is None:
769
- kde_kwargs = {}
770
- xax = xax.lower()
771
- yax = yax.lower()
772
- kde_type = kde_type.lower()
773
- if kde_type not in kde_methods.methods:
774
- raise ValueError("Not a valid kde type: {}!".format(kde_type))
775
-
776
- # Get data
777
- x = self[xax][self.filter.all]
778
- y = self[yax][self.filter.all]
779
-
780
- # Apply scale (no change for linear scale)
781
- xs = RTDCBase._apply_scale(x, xscale, xax)
782
- ys = RTDCBase._apply_scale(y, yscale, yax)
783
-
784
- if positions is None:
785
- posx = None
786
- posy = None
787
- else:
788
- posx = RTDCBase._apply_scale(positions[0], xscale, xax)
789
- posy = RTDCBase._apply_scale(positions[1], yscale, yax)
790
-
791
- kde_fct = kde_methods.methods[kde_type]
792
- if len(x):
793
- density = kde_fct(events_x=xs, events_y=ys,
794
- xout=posx, yout=posy,
795
- **kde_kwargs)
796
- else:
797
- density = np.array([])
676
+ kde_instance = KernelDensityEstimator(rtdc_ds=self)
677
+ density = kde_instance.get_scatter(
678
+ xax=xax, yax=yax, positions=positions, kde_type=kde_type,
679
+ kde_kwargs=kde_kwargs, xscale=xscale, yscale=yscale
680
+ )
798
681
 
799
682
  return density
800
683
 
@@ -879,7 +762,8 @@ class RTDCBase(abc.ABC):
879
762
  elif bdict["type"] == "file":
880
763
  if not self._local_basins_allowed:
881
764
  warnings.warn(f"Basin type 'file' not allowed for format "
882
- f"'{self.format}'")
765
+ f"'{self.format}'",
766
+ LocalBasinForbiddenWarning)
883
767
  # stop processing this basin
884
768
  continue
885
769
  p_paths = list(bdict["paths"])