dclab 0.63.1__tar.gz → 0.64.1__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 (333) hide show
  1. {dclab-0.63.1 → dclab-0.64.1}/CHANGELOG +20 -0
  2. {dclab-0.63.1 → dclab-0.64.1}/PKG-INFO +3 -3
  3. {dclab-0.63.1 → dclab-0.64.1}/dclab/_version.py +2 -2
  4. {dclab-0.63.1 → dclab-0.64.1}/dclab/http_utils.py +1 -1
  5. dclab-0.64.1/dclab/kde/base.py +459 -0
  6. {dclab-0.63.1 → dclab-0.64.1}/dclab/kde/methods.py +10 -0
  7. {dclab-0.63.1 → dclab-0.64.1}/dclab/rtdc_dataset/core.py +13 -4
  8. {dclab-0.63.1 → dclab-0.64.1}/dclab/rtdc_dataset/export.py +8 -3
  9. {dclab-0.63.1 → dclab-0.64.1}/dclab/rtdc_dataset/feat_basin.py +138 -3
  10. {dclab-0.63.1 → dclab-0.64.1}/dclab/rtdc_dataset/fmt_dcor/api.py +70 -8
  11. {dclab-0.63.1 → dclab-0.64.1}/dclab/rtdc_dataset/fmt_dcor/base.py +103 -4
  12. {dclab-0.63.1 → dclab-0.64.1}/dclab/rtdc_dataset/fmt_dcor/logs.py +1 -1
  13. {dclab-0.63.1 → dclab-0.64.1}/dclab/rtdc_dataset/fmt_dcor/tables.py +1 -1
  14. {dclab-0.63.1 → dclab-0.64.1}/dclab/rtdc_dataset/writer.py +12 -4
  15. {dclab-0.63.1 → dclab-0.64.1}/dclab/statistics.py +27 -4
  16. {dclab-0.63.1 → dclab-0.64.1}/dclab.egg-info/PKG-INFO +3 -3
  17. {dclab-0.63.1 → dclab-0.64.1}/dclab.egg-info/SOURCES.txt +3 -0
  18. {dclab-0.63.1 → dclab-0.64.1}/docs/sec_av_dc_io.rst +19 -0
  19. {dclab-0.63.1 → dclab-0.64.1}/docs/sec_av_scatter.rst +25 -25
  20. {dclab-0.63.1 → dclab-0.64.1}/pyproject.toml +4 -4
  21. dclab-0.64.1/tests/test_kde.py +171 -0
  22. {dclab-0.63.1 → dclab-0.64.1}/tests/test_rtdc_copier.py +16 -4
  23. {dclab-0.63.1 → dclab-0.64.1}/tests/test_rtdc_export_hdf5.py +23 -0
  24. {dclab-0.63.1 → dclab-0.64.1}/tests/test_rtdc_feat_basin.py +3 -2
  25. dclab-0.64.1/tests/test_rtdc_feat_basin_perishable.py +236 -0
  26. {dclab-0.63.1 → dclab-0.64.1}/tests/test_rtdc_fmt_dcor.py +84 -0
  27. {dclab-0.63.1 → dclab-0.64.1}/tests/test_rtdc_fmt_dcor_basin.py +12 -0
  28. dclab-0.64.1/tests/test_rtdc_fmt_dcor_private.py +77 -0
  29. {dclab-0.63.1 → dclab-0.64.1}/tests/test_statistics.py +15 -0
  30. dclab-0.63.1/dclab/kde/base.py +0 -238
  31. {dclab-0.63.1 → dclab-0.64.1}/.gitignore +0 -0
  32. {dclab-0.63.1 → dclab-0.64.1}/.readthedocs.yml +0 -0
  33. {dclab-0.63.1 → dclab-0.64.1}/LICENSE +0 -0
  34. {dclab-0.63.1 → dclab-0.64.1}/MANIFEST.in +0 -0
  35. {dclab-0.63.1 → dclab-0.64.1}/README.rst +0 -0
  36. {dclab-0.63.1 → dclab-0.64.1}/dclab/__init__.py +0 -0
  37. {dclab-0.63.1 → dclab-0.64.1}/dclab/cached.py +0 -0
  38. {dclab-0.63.1 → dclab-0.64.1}/dclab/cli/__init__.py +0 -0
  39. {dclab-0.63.1 → dclab-0.64.1}/dclab/cli/common.py +0 -0
  40. {dclab-0.63.1 → dclab-0.64.1}/dclab/cli/task_compress.py +0 -0
  41. {dclab-0.63.1 → dclab-0.64.1}/dclab/cli/task_condense.py +0 -0
  42. {dclab-0.63.1 → dclab-0.64.1}/dclab/cli/task_join.py +0 -0
  43. {dclab-0.63.1 → dclab-0.64.1}/dclab/cli/task_repack.py +0 -0
  44. {dclab-0.63.1 → dclab-0.64.1}/dclab/cli/task_split.py +0 -0
  45. {dclab-0.63.1 → dclab-0.64.1}/dclab/cli/task_tdms2rtdc.py +0 -0
  46. {dclab-0.63.1 → dclab-0.64.1}/dclab/cli/task_verify_dataset.py +0 -0
  47. {dclab-0.63.1 → dclab-0.64.1}/dclab/definitions/__init__.py +0 -0
  48. {dclab-0.63.1 → dclab-0.64.1}/dclab/definitions/feat_const.py +0 -0
  49. {dclab-0.63.1 → dclab-0.64.1}/dclab/definitions/feat_logic.py +0 -0
  50. {dclab-0.63.1 → dclab-0.64.1}/dclab/definitions/meta_const.py +0 -0
  51. {dclab-0.63.1 → dclab-0.64.1}/dclab/definitions/meta_logic.py +0 -0
  52. {dclab-0.63.1 → dclab-0.64.1}/dclab/definitions/meta_parse.py +0 -0
  53. {dclab-0.63.1 → dclab-0.64.1}/dclab/downsampling.pyx +0 -0
  54. {dclab-0.63.1 → dclab-0.64.1}/dclab/external/__init__.py +0 -0
  55. {dclab-0.63.1 → dclab-0.64.1}/dclab/external/packaging/LICENSE +0 -0
  56. {dclab-0.63.1 → dclab-0.64.1}/dclab/external/packaging/LICENSE.APACHE +0 -0
  57. {dclab-0.63.1 → dclab-0.64.1}/dclab/external/packaging/LICENSE.BSD +0 -0
  58. {dclab-0.63.1 → dclab-0.64.1}/dclab/external/packaging/__init__.py +0 -0
  59. {dclab-0.63.1 → dclab-0.64.1}/dclab/external/packaging/_structures.py +0 -0
  60. {dclab-0.63.1 → dclab-0.64.1}/dclab/external/packaging/version.py +0 -0
  61. {dclab-0.63.1 → dclab-0.64.1}/dclab/external/skimage/LICENSE +0 -0
  62. {dclab-0.63.1 → dclab-0.64.1}/dclab/external/skimage/__init__.py +0 -0
  63. {dclab-0.63.1 → dclab-0.64.1}/dclab/external/skimage/_find_contours.py +0 -0
  64. {dclab-0.63.1 → dclab-0.64.1}/dclab/external/skimage/_find_contours_cy.pyx +0 -0
  65. {dclab-0.63.1 → dclab-0.64.1}/dclab/external/skimage/_pnpoly.pyx +0 -0
  66. {dclab-0.63.1 → dclab-0.64.1}/dclab/external/skimage/_shared/__init__.py +0 -0
  67. {dclab-0.63.1 → dclab-0.64.1}/dclab/external/skimage/_shared/geometry.pxd +0 -0
  68. {dclab-0.63.1 → dclab-0.64.1}/dclab/external/skimage/_shared/geometry.pyx +0 -0
  69. {dclab-0.63.1 → dclab-0.64.1}/dclab/external/skimage/measure.py +0 -0
  70. {dclab-0.63.1 → dclab-0.64.1}/dclab/external/skimage/pnpoly.py +0 -0
  71. {dclab-0.63.1 → dclab-0.64.1}/dclab/external/statsmodels/LICENSE +0 -0
  72. {dclab-0.63.1 → dclab-0.64.1}/dclab/external/statsmodels/__init__.py +0 -0
  73. {dclab-0.63.1 → dclab-0.64.1}/dclab/external/statsmodels/nonparametric/__init__.py +0 -0
  74. {dclab-0.63.1 → dclab-0.64.1}/dclab/external/statsmodels/nonparametric/_kernel_base.py +0 -0
  75. {dclab-0.63.1 → dclab-0.64.1}/dclab/external/statsmodels/nonparametric/kernel_density.py +0 -0
  76. {dclab-0.63.1 → dclab-0.64.1}/dclab/external/statsmodels/nonparametric/kernels.py +0 -0
  77. {dclab-0.63.1 → dclab-0.64.1}/dclab/features/__init__.py +0 -0
  78. {dclab-0.63.1 → dclab-0.64.1}/dclab/features/bright.py +0 -0
  79. {dclab-0.63.1 → dclab-0.64.1}/dclab/features/bright_bc.py +0 -0
  80. {dclab-0.63.1 → dclab-0.64.1}/dclab/features/bright_perc.py +0 -0
  81. {dclab-0.63.1 → dclab-0.64.1}/dclab/features/contour.py +0 -0
  82. {dclab-0.63.1 → dclab-0.64.1}/dclab/features/emodulus/__init__.py +0 -0
  83. {dclab-0.63.1 → dclab-0.64.1}/dclab/features/emodulus/load.py +0 -0
  84. {dclab-0.63.1 → dclab-0.64.1}/dclab/features/emodulus/lut_HE-2D-FEM-22.txt +0 -0
  85. {dclab-0.63.1 → dclab-0.64.1}/dclab/features/emodulus/lut_HE-3D-FEM-22.txt +0 -0
  86. {dclab-0.63.1 → dclab-0.64.1}/dclab/features/emodulus/lut_LE-2D-FEM-19.txt +0 -0
  87. {dclab-0.63.1 → dclab-0.64.1}/dclab/features/emodulus/pxcorr.py +0 -0
  88. {dclab-0.63.1 → dclab-0.64.1}/dclab/features/emodulus/scale_linear.py +0 -0
  89. {dclab-0.63.1 → dclab-0.64.1}/dclab/features/emodulus/viscosity.py +0 -0
  90. {dclab-0.63.1 → dclab-0.64.1}/dclab/features/fl_crosstalk.py +0 -0
  91. {dclab-0.63.1 → dclab-0.64.1}/dclab/features/inert_ratio.py +0 -0
  92. {dclab-0.63.1 → dclab-0.64.1}/dclab/features/volume.py +0 -0
  93. {dclab-0.63.1 → dclab-0.64.1}/dclab/isoelastics/__init__.py +0 -0
  94. {dclab-0.63.1 → dclab-0.64.1}/dclab/isoelastics/iso_HE-2D-FEM-22-area_um-deform.txt +0 -0
  95. {dclab-0.63.1 → dclab-0.64.1}/dclab/isoelastics/iso_HE-2D-FEM-22-volume-deform.txt +0 -0
  96. {dclab-0.63.1 → dclab-0.64.1}/dclab/isoelastics/iso_HE-3D-FEM-22-area_um-deform.txt +0 -0
  97. {dclab-0.63.1 → dclab-0.64.1}/dclab/isoelastics/iso_HE-3D-FEM-22-volume-deform.txt +0 -0
  98. {dclab-0.63.1 → dclab-0.64.1}/dclab/isoelastics/iso_LE-2D-FEM-19-area_um-deform.txt +0 -0
  99. {dclab-0.63.1 → dclab-0.64.1}/dclab/isoelastics/iso_LE-2D-FEM-19-volume-deform.txt +0 -0
  100. {dclab-0.63.1 → dclab-0.64.1}/dclab/isoelastics/iso_LE-2D-ana-18-area_um-deform.txt +0 -0
  101. {dclab-0.63.1 → dclab-0.64.1}/dclab/kde/__init__.py +0 -0
  102. {dclab-0.63.1 → dclab-0.64.1}/dclab/kde/contours.py +0 -0
  103. {dclab-0.63.1 → dclab-0.64.1}/dclab/kde_contours.py +0 -0
  104. {dclab-0.63.1 → dclab-0.64.1}/dclab/kde_methods.py +0 -0
  105. {dclab-0.63.1 → dclab-0.64.1}/dclab/lme4/__init__.py +0 -0
  106. {dclab-0.63.1 → dclab-0.64.1}/dclab/lme4/lme4_template.R +0 -0
  107. {dclab-0.63.1 → dclab-0.64.1}/dclab/lme4/rsetup.py +0 -0
  108. {dclab-0.63.1 → dclab-0.64.1}/dclab/lme4/wrapr.py +0 -0
  109. {dclab-0.63.1 → dclab-0.64.1}/dclab/polygon_filter.py +0 -0
  110. {dclab-0.63.1 → dclab-0.64.1}/dclab/rtdc_dataset/__init__.py +0 -0
  111. {dclab-0.63.1 → dclab-0.64.1}/dclab/rtdc_dataset/check.py +0 -0
  112. {dclab-0.63.1 → dclab-0.64.1}/dclab/rtdc_dataset/config.py +0 -0
  113. {dclab-0.63.1 → dclab-0.64.1}/dclab/rtdc_dataset/copier.py +0 -0
  114. {dclab-0.63.1 → dclab-0.64.1}/dclab/rtdc_dataset/feat_anc_core/__init__.py +0 -0
  115. {dclab-0.63.1 → dclab-0.64.1}/dclab/rtdc_dataset/feat_anc_core/af_basic.py +0 -0
  116. {dclab-0.63.1 → dclab-0.64.1}/dclab/rtdc_dataset/feat_anc_core/af_emodulus.py +0 -0
  117. {dclab-0.63.1 → dclab-0.64.1}/dclab/rtdc_dataset/feat_anc_core/af_fl_max_ctc.py +0 -0
  118. {dclab-0.63.1 → dclab-0.64.1}/dclab/rtdc_dataset/feat_anc_core/af_image_contour.py +0 -0
  119. {dclab-0.63.1 → dclab-0.64.1}/dclab/rtdc_dataset/feat_anc_core/af_ml_class.py +0 -0
  120. {dclab-0.63.1 → dclab-0.64.1}/dclab/rtdc_dataset/feat_anc_core/ancillary_feature.py +0 -0
  121. {dclab-0.63.1 → dclab-0.64.1}/dclab/rtdc_dataset/feat_anc_ml/__init__.py +0 -0
  122. {dclab-0.63.1 → dclab-0.64.1}/dclab/rtdc_dataset/feat_anc_plugin/__init__.py +0 -0
  123. {dclab-0.63.1 → dclab-0.64.1}/dclab/rtdc_dataset/feat_anc_plugin/plugin_feature.py +0 -0
  124. {dclab-0.63.1 → dclab-0.64.1}/dclab/rtdc_dataset/feat_temp.py +0 -0
  125. {dclab-0.63.1 → dclab-0.64.1}/dclab/rtdc_dataset/filter.py +0 -0
  126. {dclab-0.63.1 → dclab-0.64.1}/dclab/rtdc_dataset/fmt_dcor/__init__.py +0 -0
  127. {dclab-0.63.1 → dclab-0.64.1}/dclab/rtdc_dataset/fmt_dcor/access_token.py +0 -0
  128. {dclab-0.63.1 → dclab-0.64.1}/dclab/rtdc_dataset/fmt_dcor/basin.py +0 -0
  129. {dclab-0.63.1 → dclab-0.64.1}/dclab/rtdc_dataset/fmt_dict.py +0 -0
  130. {dclab-0.63.1 → dclab-0.64.1}/dclab/rtdc_dataset/fmt_hdf5/__init__.py +0 -0
  131. {dclab-0.63.1 → dclab-0.64.1}/dclab/rtdc_dataset/fmt_hdf5/base.py +0 -0
  132. {dclab-0.63.1 → dclab-0.64.1}/dclab/rtdc_dataset/fmt_hdf5/basin.py +0 -0
  133. {dclab-0.63.1 → dclab-0.64.1}/dclab/rtdc_dataset/fmt_hdf5/events.py +0 -0
  134. {dclab-0.63.1 → dclab-0.64.1}/dclab/rtdc_dataset/fmt_hdf5/feat_defect.py +0 -0
  135. {dclab-0.63.1 → dclab-0.64.1}/dclab/rtdc_dataset/fmt_hdf5/logs.py +0 -0
  136. {dclab-0.63.1 → dclab-0.64.1}/dclab/rtdc_dataset/fmt_hdf5/tables.py +0 -0
  137. {dclab-0.63.1 → dclab-0.64.1}/dclab/rtdc_dataset/fmt_hierarchy/__init__.py +0 -0
  138. {dclab-0.63.1 → dclab-0.64.1}/dclab/rtdc_dataset/fmt_hierarchy/base.py +0 -0
  139. {dclab-0.63.1 → dclab-0.64.1}/dclab/rtdc_dataset/fmt_hierarchy/events.py +0 -0
  140. {dclab-0.63.1 → dclab-0.64.1}/dclab/rtdc_dataset/fmt_hierarchy/hfilter.py +0 -0
  141. {dclab-0.63.1 → dclab-0.64.1}/dclab/rtdc_dataset/fmt_hierarchy/mapper.py +0 -0
  142. {dclab-0.63.1 → dclab-0.64.1}/dclab/rtdc_dataset/fmt_http.py +0 -0
  143. {dclab-0.63.1 → dclab-0.64.1}/dclab/rtdc_dataset/fmt_s3.py +0 -0
  144. {dclab-0.63.1 → dclab-0.64.1}/dclab/rtdc_dataset/fmt_tdms/__init__.py +0 -0
  145. {dclab-0.63.1 → dclab-0.64.1}/dclab/rtdc_dataset/fmt_tdms/event_contour.py +0 -0
  146. {dclab-0.63.1 → dclab-0.64.1}/dclab/rtdc_dataset/fmt_tdms/event_image.py +0 -0
  147. {dclab-0.63.1 → dclab-0.64.1}/dclab/rtdc_dataset/fmt_tdms/event_mask.py +0 -0
  148. {dclab-0.63.1 → dclab-0.64.1}/dclab/rtdc_dataset/fmt_tdms/event_trace.py +0 -0
  149. {dclab-0.63.1 → dclab-0.64.1}/dclab/rtdc_dataset/fmt_tdms/exc.py +0 -0
  150. {dclab-0.63.1 → dclab-0.64.1}/dclab/rtdc_dataset/fmt_tdms/naming.py +0 -0
  151. {dclab-0.63.1 → dclab-0.64.1}/dclab/rtdc_dataset/load.py +0 -0
  152. {dclab-0.63.1 → dclab-0.64.1}/dclab/rtdc_dataset/meta_table.py +0 -0
  153. {dclab-0.63.1 → dclab-0.64.1}/dclab/util.py +0 -0
  154. {dclab-0.63.1 → dclab-0.64.1}/dclab/warn.py +0 -0
  155. {dclab-0.63.1 → dclab-0.64.1}/dclab.egg-info/dependency_links.txt +0 -0
  156. {dclab-0.63.1 → dclab-0.64.1}/dclab.egg-info/entry_points.txt +0 -0
  157. {dclab-0.63.1 → dclab-0.64.1}/dclab.egg-info/requires.txt +0 -0
  158. {dclab-0.63.1 → dclab-0.64.1}/dclab.egg-info/top_level.txt +0 -0
  159. {dclab-0.63.1 → dclab-0.64.1}/docs/.gitignore +0 -0
  160. {dclab-0.63.1 → dclab-0.64.1}/docs/README.md +0 -0
  161. {dclab-0.63.1 → dclab-0.64.1}/docs/conf.py +0 -0
  162. {dclab-0.63.1 → dclab-0.64.1}/docs/data/example.poly +0 -0
  163. {dclab-0.63.1 → dclab-0.64.1}/docs/data/example.rtdc +0 -0
  164. {dclab-0.63.1 → dclab-0.64.1}/docs/data/example_plugin.py +0 -0
  165. {dclab-0.63.1 → dclab-0.64.1}/docs/data/example_plugin_metadata.py +0 -0
  166. {dclab-0.63.1 → dclab-0.64.1}/docs/data/example_traces.rtdc +0 -0
  167. {dclab-0.63.1 → dclab-0.64.1}/docs/data/example_video.rtdc +0 -0
  168. {dclab-0.63.1 → dclab-0.64.1}/docs/dclab.bib +0 -0
  169. {dclab-0.63.1 → dclab-0.64.1}/docs/extensions/dclab_defs.py +0 -0
  170. {dclab-0.63.1 → dclab-0.64.1}/docs/extensions/fancy_include.py +0 -0
  171. {dclab-0.63.1 → dclab-0.64.1}/docs/extensions/github_changelog.py +0 -0
  172. {dclab-0.63.1 → dclab-0.64.1}/docs/extensions/simple_argparse.py +0 -0
  173. {dclab-0.63.1 → dclab-0.64.1}/docs/figures/DCOR_API_Token_website.png +0 -0
  174. {dclab-0.63.1 → dclab-0.64.1}/docs/index.rst +0 -0
  175. {dclab-0.63.1 → dclab-0.64.1}/docs/logo/dc_logo.png +0 -0
  176. {dclab-0.63.1 → dclab-0.64.1}/docs/logo/dc_logo.svg +0 -0
  177. {dclab-0.63.1 → dclab-0.64.1}/docs/logo/dclab.png +0 -0
  178. {dclab-0.63.1 → dclab-0.64.1}/docs/logo/dclab.svg +0 -0
  179. {dclab-0.63.1 → dclab-0.64.1}/docs/logo/dclab_large_white.png +0 -0
  180. {dclab-0.63.1 → dclab-0.64.1}/docs/logo/dclab_large_white.svg +0 -0
  181. {dclab-0.63.1 → dclab-0.64.1}/docs/logo/favicon.ico +0 -0
  182. {dclab-0.63.1 → dclab-0.64.1}/docs/logo/favicon.svg +0 -0
  183. {dclab-0.63.1 → dclab-0.64.1}/docs/requirements.txt +0 -0
  184. {dclab-0.63.1 → dclab-0.64.1}/docs/sec_advanced_usage.rst +0 -0
  185. {dclab-0.63.1 → dclab-0.64.1}/docs/sec_av_basins/basin_example_workflows.svg +0 -0
  186. {dclab-0.63.1 → dclab-0.64.1}/docs/sec_av_basins/index.rst +0 -0
  187. {dclab-0.63.1 → dclab-0.64.1}/docs/sec_av_dc_usage.rst +0 -0
  188. {dclab-0.63.1 → dclab-0.64.1}/docs/sec_av_dcor.rst +0 -0
  189. {dclab-0.63.1 → dclab-0.64.1}/docs/sec_av_emodulus/figures_emodulus/.gitignore +0 -0
  190. {dclab-0.63.1 → dclab-0.64.1}/docs/sec_av_emodulus/figures_emodulus/emodulus_20um_HE-2D-FEM-22.png +0 -0
  191. {dclab-0.63.1 → dclab-0.64.1}/docs/sec_av_emodulus/figures_emodulus/emodulus_20um_HE-3D-FEM-22.png +0 -0
  192. {dclab-0.63.1 → dclab-0.64.1}/docs/sec_av_emodulus/figures_emodulus/emodulus_20um_LE-2D-FEM-19.png +0 -0
  193. {dclab-0.63.1 → dclab-0.64.1}/docs/sec_av_emodulus/figures_emodulus/plot_emodulus_lut.py +0 -0
  194. {dclab-0.63.1 → dclab-0.64.1}/docs/sec_av_emodulus/figures_emodulus/requirements.txt +0 -0
  195. {dclab-0.63.1 → dclab-0.64.1}/docs/sec_av_emodulus/figures_viscosity/LICENSE +0 -0
  196. {dclab-0.63.1 → dclab-0.64.1}/docs/sec_av_emodulus/figures_viscosity/buyukurganci_22_fig3a.jpg +0 -0
  197. {dclab-0.63.1 → dclab-0.64.1}/docs/sec_av_emodulus/figures_viscosity/buyukurganci_22_fig3a.pdf +0 -0
  198. {dclab-0.63.1 → dclab-0.64.1}/docs/sec_av_emodulus/index.rst +0 -0
  199. {dclab-0.63.1 → dclab-0.64.1}/docs/sec_av_feat_plugin.rst +0 -0
  200. {dclab-0.63.1 → dclab-0.64.1}/docs/sec_av_feat_temp.rst +0 -0
  201. {dclab-0.63.1 → dclab-0.64.1}/docs/sec_av_fluorescence.rst +0 -0
  202. {dclab-0.63.1 → dclab-0.64.1}/docs/sec_av_lme4.rst +0 -0
  203. {dclab-0.63.1 → dclab-0.64.1}/docs/sec_av_notation.rst +0 -0
  204. {dclab-0.63.1 → dclab-0.64.1}/docs/sec_av_s3.rst +0 -0
  205. {dclab-0.63.1 → dclab-0.64.1}/docs/sec_changelog.rst +0 -0
  206. {dclab-0.63.1 → dclab-0.64.1}/docs/sec_cli.rst +0 -0
  207. {dclab-0.63.1 → dclab-0.64.1}/docs/sec_code_reference.rst +0 -0
  208. {dclab-0.63.1 → dclab-0.64.1}/docs/sec_examples.rst +0 -0
  209. {dclab-0.63.1 → dclab-0.64.1}/docs/sec_getting_started.rst +0 -0
  210. {dclab-0.63.1 → dclab-0.64.1}/docs/sec_z_bib.rst +0 -0
  211. {dclab-0.63.1 → dclab-0.64.1}/examples/emodulus_dcor.jpg +0 -0
  212. {dclab-0.63.1 → dclab-0.64.1}/examples/emodulus_dcor.py +0 -0
  213. {dclab-0.63.1 → dclab-0.64.1}/examples/generate_example_images.py +0 -0
  214. {dclab-0.63.1 → dclab-0.64.1}/examples/isoelastics.jpg +0 -0
  215. {dclab-0.63.1 → dclab-0.64.1}/examples/isoelastics.py +0 -0
  216. {dclab-0.63.1 → dclab-0.64.1}/examples/isoelastics_custom.jpg +0 -0
  217. {dclab-0.63.1 → dclab-0.64.1}/examples/isoelastics_custom.py +0 -0
  218. {dclab-0.63.1 → dclab-0.64.1}/examples/lme4_glmer_diff.py +0 -0
  219. {dclab-0.63.1 → dclab-0.64.1}/examples/lme4_lmer.jpg +0 -0
  220. {dclab-0.63.1 → dclab-0.64.1}/examples/lme4_lmer.py +0 -0
  221. {dclab-0.63.1 → dclab-0.64.1}/examples/overview_plot.jpg +0 -0
  222. {dclab-0.63.1 → dclab-0.64.1}/examples/overview_plot.py +0 -0
  223. {dclab-0.63.1 → dclab-0.64.1}/examples/plugin_example.py +0 -0
  224. {dclab-0.63.1 → dclab-0.64.1}/examples/plugin_usage.jpg +0 -0
  225. {dclab-0.63.1 → dclab-0.64.1}/examples/plugin_usage.py +0 -0
  226. {dclab-0.63.1 → dclab-0.64.1}/examples/viscosity_models.jpg +0 -0
  227. {dclab-0.63.1 → dclab-0.64.1}/examples/viscosity_models.py +0 -0
  228. {dclab-0.63.1 → dclab-0.64.1}/scripts/.gitignore +0 -0
  229. {dclab-0.63.1 → dclab-0.64.1}/scripts/README.md +0 -0
  230. {dclab-0.63.1 → dclab-0.64.1}/scripts/fem2iso_volume.py +0 -0
  231. {dclab-0.63.1 → dclab-0.64.1}/scripts/fem2lutiso_std.py +0 -0
  232. {dclab-0.63.1 → dclab-0.64.1}/scripts/fem2rtdc.py +0 -0
  233. {dclab-0.63.1 → dclab-0.64.1}/scripts/lut_recipes/__init__.py +0 -0
  234. {dclab-0.63.1 → dclab-0.64.1}/scripts/lut_recipes/hooks/LUT_analytical_linear-elastic_2Daxis.txt +0 -0
  235. {dclab-0.63.1 → dclab-0.64.1}/scripts/lut_recipes/hooks/README.md +0 -0
  236. {dclab-0.63.1 → dclab-0.64.1}/scripts/lut_recipes/hooks/__init__.py +0 -0
  237. {dclab-0.63.1 → dclab-0.64.1}/scripts/lut_recipes/hooks/common.py +0 -0
  238. {dclab-0.63.1 → dclab-0.64.1}/scripts/lut_recipes/hooks/he_2d_fem_22.py +0 -0
  239. {dclab-0.63.1 → dclab-0.64.1}/scripts/lut_recipes/hooks/he_3d_fem_22.py +0 -0
  240. {dclab-0.63.1 → dclab-0.64.1}/scripts/lut_recipes/hooks/le_2d_fem_19.py +0 -0
  241. {dclab-0.63.1 → dclab-0.64.1}/scripts/lut_recipes/lut_processor.py +0 -0
  242. {dclab-0.63.1 → dclab-0.64.1}/scripts/pixelation_correction.py +0 -0
  243. {dclab-0.63.1 → dclab-0.64.1}/scripts/pixelation_correction_2020.png +0 -0
  244. {dclab-0.63.1 → dclab-0.64.1}/scripts/pixelation_correction_2022.png +0 -0
  245. {dclab-0.63.1 → dclab-0.64.1}/scripts/requirements.txt +0 -0
  246. {dclab-0.63.1 → dclab-0.64.1}/setup.cfg +0 -0
  247. {dclab-0.63.1 → dclab-0.64.1}/setup.py +0 -0
  248. {dclab-0.63.1 → dclab-0.64.1}/tests/README.md +0 -0
  249. {dclab-0.63.1 → dclab-0.64.1}/tests/conftest.py +0 -0
  250. {dclab-0.63.1 → dclab-0.64.1}/tests/data/README.md +0 -0
  251. {dclab-0.63.1 → dclab-0.64.1}/tests/data/example_access_token.dcor-access +0 -0
  252. {dclab-0.63.1 → dclab-0.64.1}/tests/data/example_isoelastics.txt +0 -0
  253. {dclab-0.63.1 → dclab-0.64.1}/tests/data/feat_anc_plugin_creative.py +0 -0
  254. {dclab-0.63.1 → dclab-0.64.1}/tests/data/fmt-hdf5_fl-no-contour_2019.zip +0 -0
  255. {dclab-0.63.1 → dclab-0.64.1}/tests/data/fmt-hdf5_fl_2017.zip +0 -0
  256. {dclab-0.63.1 → dclab-0.64.1}/tests/data/fmt-hdf5_fl_2018.zip +0 -0
  257. {dclab-0.63.1 → dclab-0.64.1}/tests/data/fmt-hdf5_fl_wide-channel_2023.zip +0 -0
  258. {dclab-0.63.1 → dclab-0.64.1}/tests/data/fmt-hdf5_image-bg_2020.zip +0 -0
  259. {dclab-0.63.1 → dclab-0.64.1}/tests/data/fmt-hdf5_image-mask-blood_2021.zip +0 -0
  260. {dclab-0.63.1 → dclab-0.64.1}/tests/data/fmt-hdf5_mask-contour_2018.zip +0 -0
  261. {dclab-0.63.1 → dclab-0.64.1}/tests/data/fmt-hdf5_polygon_gate_2021.zip +0 -0
  262. {dclab-0.63.1 → dclab-0.64.1}/tests/data/fmt-hdf5_raw-cytoshot-exported.zip +0 -0
  263. {dclab-0.63.1 → dclab-0.64.1}/tests/data/fmt-hdf5_segfault-compound_2023.zip +0 -0
  264. {dclab-0.63.1 → dclab-0.64.1}/tests/data/fmt-hdf5_wide-channel_2023.zip +0 -0
  265. {dclab-0.63.1 → dclab-0.64.1}/tests/data/fmt-tdms_2fl-no-image_2017.zip +0 -0
  266. {dclab-0.63.1 → dclab-0.64.1}/tests/data/fmt-tdms_fl-image-bright_2017.zip +0 -0
  267. {dclab-0.63.1 → dclab-0.64.1}/tests/data/fmt-tdms_fl-image-large-fov_2017.zip +0 -0
  268. {dclab-0.63.1 → dclab-0.64.1}/tests/data/fmt-tdms_fl-image_2016.zip +0 -0
  269. {dclab-0.63.1 → dclab-0.64.1}/tests/data/fmt-tdms_fl_2015.zip +0 -0
  270. {dclab-0.63.1 → dclab-0.64.1}/tests/data/fmt-tdms_minimal_2016.zip +0 -0
  271. {dclab-0.63.1 → dclab-0.64.1}/tests/data/fmt-tdms_shapein-2.0.1-no-image_2017.zip +0 -0
  272. {dclab-0.63.1 → dclab-0.64.1}/tests/helper_methods.py +0 -0
  273. {dclab-0.63.1 → dclab-0.64.1}/tests/requirements.txt +0 -0
  274. {dclab-0.63.1 → dclab-0.64.1}/tests/test_cache.py +0 -0
  275. {dclab-0.63.1 → dclab-0.64.1}/tests/test_cli.py +0 -0
  276. {dclab-0.63.1 → dclab-0.64.1}/tests/test_cli_argparse.py +0 -0
  277. {dclab-0.63.1 → dclab-0.64.1}/tests/test_cli_compress.py +0 -0
  278. {dclab-0.63.1 → dclab-0.64.1}/tests/test_cli_condense.py +0 -0
  279. {dclab-0.63.1 → dclab-0.64.1}/tests/test_cli_join.py +0 -0
  280. {dclab-0.63.1 → dclab-0.64.1}/tests/test_cli_repack.py +0 -0
  281. {dclab-0.63.1 → dclab-0.64.1}/tests/test_cli_split.py +0 -0
  282. {dclab-0.63.1 → dclab-0.64.1}/tests/test_config_value_mapping.py +0 -0
  283. {dclab-0.63.1 → dclab-0.64.1}/tests/test_dfn.py +0 -0
  284. {dclab-0.63.1 → dclab-0.64.1}/tests/test_downsampling.py +0 -0
  285. {dclab-0.63.1 → dclab-0.64.1}/tests/test_feat_bright.py +0 -0
  286. {dclab-0.63.1 → dclab-0.64.1}/tests/test_feat_bright_bc.py +0 -0
  287. {dclab-0.63.1 → dclab-0.64.1}/tests/test_feat_bright_perc.py +0 -0
  288. {dclab-0.63.1 → dclab-0.64.1}/tests/test_feat_contour.py +0 -0
  289. {dclab-0.63.1 → dclab-0.64.1}/tests/test_feat_emodulus.py +0 -0
  290. {dclab-0.63.1 → dclab-0.64.1}/tests/test_feat_emodulus_viscosity.py +0 -0
  291. {dclab-0.63.1 → dclab-0.64.1}/tests/test_feat_fl_crosstalk.py +0 -0
  292. {dclab-0.63.1 → dclab-0.64.1}/tests/test_feat_inert_ratio.py +0 -0
  293. {dclab-0.63.1 → dclab-0.64.1}/tests/test_feat_volume.py +0 -0
  294. {dclab-0.63.1 → dclab-0.64.1}/tests/test_http_utils.py +0 -0
  295. {dclab-0.63.1 → dclab-0.64.1}/tests/test_isoelastics.py +0 -0
  296. {dclab-0.63.1 → dclab-0.64.1}/tests/test_kde_contours.py +0 -0
  297. {dclab-0.63.1 → dclab-0.64.1}/tests/test_kde_deprecations.py +0 -0
  298. {dclab-0.63.1 → dclab-0.64.1}/tests/test_kde_methods.py +0 -0
  299. {dclab-0.63.1 → dclab-0.64.1}/tests/test_lme4.py +0 -0
  300. {dclab-0.63.1 → dclab-0.64.1}/tests/test_lut_he_2d_fem_22.py +0 -0
  301. {dclab-0.63.1 → dclab-0.64.1}/tests/test_lut_he_3d_fem_22.py +0 -0
  302. {dclab-0.63.1 → dclab-0.64.1}/tests/test_polygon_contains.py +0 -0
  303. {dclab-0.63.1 → dclab-0.64.1}/tests/test_polygon_filter.py +0 -0
  304. {dclab-0.63.1 → dclab-0.64.1}/tests/test_rtdc_check_dataset.py +0 -0
  305. {dclab-0.63.1 → dclab-0.64.1}/tests/test_rtdc_config.py +0 -0
  306. {dclab-0.63.1 → dclab-0.64.1}/tests/test_rtdc_core_feat.py +0 -0
  307. {dclab-0.63.1 → dclab-0.64.1}/tests/test_rtdc_downsampling.py +0 -0
  308. {dclab-0.63.1 → dclab-0.64.1}/tests/test_rtdc_export.py +0 -0
  309. {dclab-0.63.1 → dclab-0.64.1}/tests/test_rtdc_export_avi.py +0 -0
  310. {dclab-0.63.1 → dclab-0.64.1}/tests/test_rtdc_export_fcs.py +0 -0
  311. {dclab-0.63.1 → dclab-0.64.1}/tests/test_rtdc_export_tsv.py +0 -0
  312. {dclab-0.63.1 → dclab-0.64.1}/tests/test_rtdc_feat_anc_core.py +0 -0
  313. {dclab-0.63.1 → dclab-0.64.1}/tests/test_rtdc_feat_anc_ml.py +0 -0
  314. {dclab-0.63.1 → dclab-0.64.1}/tests/test_rtdc_feat_anc_plugin.py +0 -0
  315. {dclab-0.63.1 → dclab-0.64.1}/tests/test_rtdc_feat_basin_mapped.py +0 -0
  316. {dclab-0.63.1 → dclab-0.64.1}/tests/test_rtdc_feat_temp.py +0 -0
  317. {dclab-0.63.1 → dclab-0.64.1}/tests/test_rtdc_filter.py +0 -0
  318. {dclab-0.63.1 → dclab-0.64.1}/tests/test_rtdc_fmt_dcor_access_token.py +0 -0
  319. {dclab-0.63.1 → dclab-0.64.1}/tests/test_rtdc_fmt_dict.py +0 -0
  320. {dclab-0.63.1 → dclab-0.64.1}/tests/test_rtdc_fmt_hdf5.py +0 -0
  321. {dclab-0.63.1 → dclab-0.64.1}/tests/test_rtdc_fmt_hdf5_basins.py +0 -0
  322. {dclab-0.63.1 → dclab-0.64.1}/tests/test_rtdc_fmt_hdf5_basins_internal.py +0 -0
  323. {dclab-0.63.1 → dclab-0.64.1}/tests/test_rtdc_fmt_hierarchy.py +0 -0
  324. {dclab-0.63.1 → dclab-0.64.1}/tests/test_rtdc_fmt_http.py +0 -0
  325. {dclab-0.63.1 → dclab-0.64.1}/tests/test_rtdc_fmt_http_basin.py +0 -0
  326. {dclab-0.63.1 → dclab-0.64.1}/tests/test_rtdc_fmt_s3.py +0 -0
  327. {dclab-0.63.1 → dclab-0.64.1}/tests/test_rtdc_fmt_s3_basin.py +0 -0
  328. {dclab-0.63.1 → dclab-0.64.1}/tests/test_rtdc_fmt_tdms.py +0 -0
  329. {dclab-0.63.1 → dclab-0.64.1}/tests/test_rtdc_hash.py +0 -0
  330. {dclab-0.63.1 → dclab-0.64.1}/tests/test_rtdc_kde.py +0 -0
  331. {dclab-0.63.1 → dclab-0.64.1}/tests/test_rtdc_limit_events.py +0 -0
  332. {dclab-0.63.1 → dclab-0.64.1}/tests/test_rtdc_writer.py +0 -0
  333. {dclab-0.63.1 → dclab-0.64.1}/tests/test_util.py +0 -0
@@ -1,3 +1,23 @@
1
+ 0.64.1
2
+ - enh: introduce `KernelDensityEstimator.get_at`
3
+ - enh: add 10th, 25th, 75th, and 90th percentile statistics methods
4
+ - enh: new `ret_dict` arg in `get_statistics` returns dict instead of tuple
5
+ - setup: fix finding packages in pyproject.toml
6
+ 0.64.0
7
+ - feat: introduce concept of perishable (e.g. temporally expiring) basins
8
+ - feat: add `PerishableRecord` to presigned URLs for DCOR basins (#244)
9
+ - fix: do not export perishable basins (#254)
10
+ - fix: allow `Basin.verify_basin` to fail
11
+ - fix: `Basin.__repr__` failed when location did not exist
12
+ - fix: fetching tables information from DCOR dataset could time out
13
+ - fix: default to compression level 5 when exporting or writing (#272)
14
+ - enh: increase timeout every time fetching data from DCOR API times out
15
+ - docs: update docs `RTDCWriter` I/O
16
+ - setup: drop support for Python 3.8
17
+ - tests: add tests for fetching tables from a DCOR dataset (#229)
18
+ - ref: add `get_contour_lines` method to `KernelDensityEstimator` class
19
+ - ref: deprecate get_contour and use bin_width_doane_div5 in kde submodule
20
+ - ref: cache "basins" in `RTDC_DCOR` instead of in `RTDC_DCOR.api`
1
21
  0.63.1
2
22
  - docs: update documentation and code references for kde submodule
3
23
  - enh: cache S3 sessions and clients (test suite duration reduced by 30%)
@@ -1,10 +1,10 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dclab
3
- Version: 0.63.1
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/
@@ -14,7 +14,7 @@ Classifier: Operating System :: OS Independent
14
14
  Classifier: Programming Language :: Python :: 3
15
15
  Classifier: Topic :: Scientific/Engineering :: Visualization
16
16
  Classifier: Intended Audience :: Science/Research
17
- Requires-Python: <4,>=3.8
17
+ Requires-Python: <4,>=3.9
18
18
  Description-Content-Type: text/x-rst
19
19
  License-File: LICENSE
20
20
  Requires-Dist: h5py<4,>=3.0.0
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '0.63.1'
21
- __version_tuple__ = version_tuple = (0, 63, 1)
20
+ __version__ = version = '0.64.1'
21
+ __version_tuple__ = version_tuple = (0, 64, 1)
@@ -254,7 +254,7 @@ class ResoluteRequestsSession(requests.Session):
254
254
  break
255
255
  else:
256
256
  raise requests.exceptions.ReadTimeout(
257
- f"Resolut sesion failed for {args} and {kwargs}!")
257
+ f"Resolute session failed for {args} and {kwargs}!")
258
258
  return resp
259
259
 
260
260
 
@@ -0,0 +1,459 @@
1
+ import warnings
2
+
3
+ import numpy as np
4
+ from scipy.interpolate import RegularGridInterpolator as RGI
5
+
6
+ from .methods import bin_width_doane_div5, get_bad_vals, methods
7
+ from .contours import find_contours_level, get_quantile_levels
8
+
9
+
10
+ class ContourSpacingTooLarge(UserWarning):
11
+ pass
12
+
13
+
14
+ class KernelDensityEstimator:
15
+ def __init__(self, rtdc_ds):
16
+ self.rtdc_ds = rtdc_ds
17
+
18
+ @staticmethod
19
+ def apply_scale(a, scale, feat):
20
+ """Helper function for transforming an aray to log-scale
21
+
22
+ Parameters
23
+ ----------
24
+ a: np.ndarray
25
+ Input array
26
+ scale: str
27
+ If set to "log", take the logarithm of `a`; if set to
28
+ "linear" return `a` unchanged.
29
+ feat: str
30
+ Feature name (required for debugging)
31
+
32
+ Returns
33
+ -------
34
+ b: np.ndarray
35
+ The scaled array
36
+
37
+ Notes
38
+ -----
39
+ If the scale is not "linear", then a new array is returned.
40
+ All warnings are suppressed when computing `np.log(a)`, as
41
+ `a` may have negative or nan values.
42
+ """
43
+ if scale == "linear":
44
+ b = a
45
+ elif scale == "log":
46
+ with warnings.catch_warnings(record=True) as w:
47
+ warnings.simplefilter("always")
48
+ b = np.log(a)
49
+ if len(w):
50
+ # Tell the user that the log-transformation issued
51
+ # a warning.
52
+ warnings.warn(f"Invalid values encounterd in np.log "
53
+ f"while scaling feature '{feat}'!")
54
+ else:
55
+ raise ValueError(f"`scale` must be either 'linear' or 'log', "
56
+ f"got '{scale}'!")
57
+ return b
58
+
59
+ @staticmethod
60
+ def get_spacing(a, method, scale="linear", method_kw=None,
61
+ feat="undefined", ret_scaled=False):
62
+ """Convenience function for computing the contour spacing
63
+
64
+ Parameters
65
+ ----------
66
+ a: ndarray
67
+ feature data
68
+ scale: str
69
+ how the data should be scaled ("log" or "linear")
70
+ method: callable
71
+ KDE spacing method to use
72
+ method_kw: dict
73
+ keyword arguments to `method`
74
+ feat: str
75
+ feature name for debugging
76
+ ret_scaled: bool
77
+ whether to return the scaled array of `a`
78
+ """
79
+ if method_kw is None:
80
+ method_kw = {}
81
+ # Apply scale (no change for linear scale)
82
+ asc = KernelDensityEstimator.apply_scale(a, scale, feat)
83
+ # Apply multiplicator
84
+ acc = method(asc, **method_kw)
85
+ if ret_scaled:
86
+ return acc, asc
87
+ else:
88
+ return acc
89
+
90
+ def get_contour(self, xax="area_um", yax="deform", xacc=None, yacc=None,
91
+ kde_type="histogram", kde_kwargs=None, xscale="linear",
92
+ yscale="linear"):
93
+ """Evaluate the kernel density estimate for contour plots
94
+
95
+ Parameters
96
+ ----------
97
+ xax: str
98
+ Identifier for X axis (e.g. "area_um", "aspect", "deform")
99
+ yax: str
100
+ Identifier for Y axis
101
+ xacc: float
102
+ Contour accuracy in x direction
103
+ yacc: float
104
+ Contour accuracy in y direction
105
+ kde_type: str
106
+ The KDE method to use
107
+ kde_kwargs: dict
108
+ Additional keyword arguments to the KDE method
109
+ xscale: str
110
+ If set to "log", take the logarithm of the x-values before
111
+ computing the KDE. This is useful when data are
112
+ displayed on a log-scale. Defaults to "linear".
113
+ yscale: str
114
+ See `xscale`.
115
+
116
+ Returns
117
+ -------
118
+ X, Y, Z : coordinates
119
+ The kernel density Z evaluated on a rectangular grid (X,Y).
120
+ """
121
+ warnings.warn("`get_contour` is deprecated; please use "
122
+ "`get_raster` instead", DeprecationWarning)
123
+ return self.get_raster(
124
+ xax=xax, yax=yax, xacc=xacc, yacc=yacc,
125
+ kde_type=kde_type, kde_kwargs=kde_kwargs,
126
+ xscale=xscale, yscale=yscale
127
+ )
128
+
129
+ def get_contour_lines(self, quantiles=None, xax="area_um", yax="deform",
130
+ xacc=None, yacc=None, kde_type="histogram",
131
+ kde_kwargs=None, xscale="linear", yscale="linear",
132
+ ret_levels=False):
133
+ """Compute contour lines for a given kernel kensity estimate.
134
+
135
+ Parameters
136
+ ----------
137
+ quantiles: list or array of floats
138
+ KDE Quantiles for which contour levels are computed. The
139
+ values must be between 0 and 1. If set to None, use
140
+ [0.5, 0.95] as default.
141
+ xax: str
142
+ Identifier for X axis (e.g. "area_um", "aspect", "deform")
143
+ yax: str
144
+ Identifier for Y axis
145
+ xacc: float
146
+ Contour accuracy in x direction
147
+ if set to None, will use :func:`bin_width_doane_div5`
148
+ yacc: float
149
+ Contour accuracy in y direction
150
+ if set to None, will use :func:`bin_width_doane_div5`
151
+ kde_type: str
152
+ The KDE method to use
153
+ kde_kwargs: dict
154
+ Additional keyword arguments to the KDE method
155
+ xscale: str
156
+ If set to "log", take the logarithm of the x-values before
157
+ computing the KDE. This is useful when data are
158
+ displayed on a log-scale. Defaults to "linear".
159
+ yscale: str
160
+ See `xscale`
161
+ ret_levels: bool
162
+ If set to True, return the levels of the contours
163
+ (default: False)
164
+
165
+ Returns
166
+ -------
167
+ contour_lines: list of lists (of lists)
168
+ For every number in `quantiles`, this list contains a list of
169
+ corresponding contour lines. Each contour line is a 2D
170
+ array of shape (N, 2), where N is the number of points in the
171
+ contour line.
172
+ levels: list of floats
173
+ The density levels corresponding to each number in `quantiles`.
174
+ Only returned if `ret_levels` is set to True.
175
+ """
176
+ if not quantiles:
177
+ quantiles = [0.5, 0.95]
178
+ try:
179
+ x, y, density = self.get_raster(
180
+ xax=xax,
181
+ yax=yax,
182
+ xacc=xacc,
183
+ yacc=yacc,
184
+ xscale=xscale,
185
+ yscale=yscale,
186
+ kde_type=kde_type,
187
+ kde_kwargs=kde_kwargs,
188
+ )
189
+ except ValueError:
190
+ # most-likely there is nothing to compute a contour for
191
+ return []
192
+ if density.shape[0] < 3 or density.shape[1] < 3:
193
+ warnings.warn("Contour not possible; spacing may be too large!",
194
+ ContourSpacingTooLarge)
195
+ return []
196
+ levels = get_quantile_levels(
197
+ density=density,
198
+ x=x,
199
+ y=y,
200
+ xp=self.rtdc_ds[xax][self.rtdc_ds.filter.all],
201
+ yp=self.rtdc_ds[yax][self.rtdc_ds.filter.all],
202
+ q=np.array(quantiles),
203
+ normalize=False)
204
+ contours = []
205
+ # Normalize levels to [0, 1]
206
+ nlevels = np.array(levels) / density.max()
207
+ for nlev in nlevels:
208
+ # make sure that the contour levels are not at the boundaries
209
+ if not (np.allclose(nlev, 0, atol=1e-12, rtol=0)
210
+ or np.allclose(nlev, 1, atol=1e-12, rtol=0)):
211
+ cc = find_contours_level(
212
+ density, x=x, y=y, level=nlev)
213
+ contours.append(cc)
214
+ else:
215
+ contours.append([])
216
+ if ret_levels:
217
+ return contours, levels
218
+ else:
219
+ return contours
220
+
221
+ def get_raster(self, xax="area_um", yax="deform", xacc=None, yacc=None,
222
+ kde_type="histogram", kde_kwargs=None, xscale="linear",
223
+ yscale="linear"):
224
+ """Evaluate the kernel density estimate on a grid
225
+
226
+ Parameters
227
+ ----------
228
+ xax: str
229
+ Identifier for X axis (e.g. "area_um", "aspect", "deform")
230
+ yax: str
231
+ Identifier for Y axis
232
+ xacc: float
233
+ Contour accuracy in x direction
234
+ if set to None, will use :func:`bin_width_doane_div5`
235
+ yacc: float
236
+ Contour accuracy in y direction
237
+ if set to None, will use :func:`bin_width_doane_div5`
238
+ kde_type: str
239
+ The KDE method to use
240
+ kde_kwargs: dict
241
+ Additional keyword arguments to the KDE method
242
+ xscale: str
243
+ If set to "log", take the logarithm of the x-values before
244
+ computing the KDE. This is useful when data are
245
+ displayed on a log-scale. Defaults to "linear".
246
+ yscale: str
247
+ See `xscale`.
248
+
249
+ Returns
250
+ -------
251
+ X, Y, Z : coordinates
252
+ The kernel density Z evaluated on a rectangular grid (X,Y).
253
+ """
254
+ if kde_kwargs is None:
255
+ kde_kwargs = {}
256
+ xax = xax.lower()
257
+ yax = yax.lower()
258
+ kde_type = kde_type.lower()
259
+ if kde_type not in methods:
260
+ raise ValueError(f"Not a valid kde type: {kde_type}!")
261
+
262
+ # Get data
263
+ x = self.rtdc_ds[xax][self.rtdc_ds.filter.all]
264
+ y = self.rtdc_ds[yax][self.rtdc_ds.filter.all]
265
+
266
+ xacc_sc, xs = self.get_spacing(
267
+ a=x,
268
+ feat=xax,
269
+ scale=xscale,
270
+ method=bin_width_doane_div5,
271
+ ret_scaled=True)
272
+
273
+ yacc_sc, ys = self.get_spacing(
274
+ a=y,
275
+ feat=yax,
276
+ scale=yscale,
277
+ method=bin_width_doane_div5,
278
+ ret_scaled=True)
279
+
280
+ if xacc is None or xacc == 0:
281
+ xacc = xacc_sc
282
+
283
+ if yacc is None or yacc == 0:
284
+ yacc = yacc_sc
285
+
286
+ # Ignore infs and nans
287
+ bad = get_bad_vals(xs, ys)
288
+ xc = xs[~bad]
289
+ yc = ys[~bad]
290
+
291
+ xnum = int(np.ceil((xc.max() - xc.min()) / xacc))
292
+ ynum = int(np.ceil((yc.max() - yc.min()) / yacc))
293
+
294
+ xlin = np.linspace(xc.min(), xc.max(), xnum, endpoint=True)
295
+ ylin = np.linspace(yc.min(), yc.max(), ynum, endpoint=True)
296
+
297
+ xmesh, ymesh = np.meshgrid(xlin, ylin, indexing="ij")
298
+
299
+ kde_fct = methods[kde_type]
300
+ if len(x):
301
+ density = kde_fct(events_x=xs, events_y=ys,
302
+ xout=xmesh, yout=ymesh,
303
+ **kde_kwargs)
304
+ else:
305
+ density = np.array([])
306
+
307
+ # Convert mesh back to linear scale if applicable
308
+ if xscale == "log":
309
+ xmesh = np.exp(xmesh)
310
+ if yscale == "log":
311
+ ymesh = np.exp(ymesh)
312
+
313
+ return xmesh, ymesh, density
314
+
315
+ def get_scatter(self, xax="area_um", yax="deform", positions=None,
316
+ kde_type="histogram", kde_kwargs=None, xscale="linear",
317
+ yscale="linear"):
318
+ """Evaluate the kernel density estimate for scatter plots
319
+
320
+ The KDE is evaluated with the `kde_type` function for every point.
321
+
322
+ Parameters
323
+ ----------
324
+ xax: str
325
+ Identifier for X axis (e.g. "area_um", "aspect", "deform")
326
+ yax: str
327
+ Identifier for Y axis
328
+ positions: list of two 1d ndarrays or ndarray of shape (2, N)
329
+ The positions where the KDE will be computed. Note that
330
+ the KDE estimate is computed from the points that
331
+ are set in `self.rtdc_ds.filter.all`.
332
+ kde_type: str
333
+ The KDE method to use, see :const:`.kde_methods.methods`
334
+ kde_kwargs: dict
335
+ Additional keyword arguments to the KDE method
336
+ xscale: str
337
+ If set to "log", take the logarithm of the x-values before
338
+ computing the KDE. This is useful when data are
339
+ displayed on a log-scale. Defaults to "linear".
340
+ yscale: str
341
+ See `xscale`.
342
+
343
+ Returns
344
+ -------
345
+ density : 1d ndarray
346
+ The kernel density evaluated for the filtered data points.
347
+ """
348
+ if kde_kwargs is None:
349
+ kde_kwargs = {}
350
+ xax = xax.lower()
351
+ yax = yax.lower()
352
+ kde_type = kde_type.lower()
353
+ if kde_type not in methods:
354
+ raise ValueError(f"Not a valid kde type: {kde_type}!")
355
+
356
+ # Get data
357
+ x = self.rtdc_ds[xax][self.rtdc_ds.filter.all]
358
+ y = self.rtdc_ds[yax][self.rtdc_ds.filter.all]
359
+
360
+ # Apply scale (no change for linear scale)
361
+ xs = self.apply_scale(x, xscale, xax)
362
+ ys = self.apply_scale(y, yscale, yax)
363
+
364
+ if positions is None:
365
+ posx = None
366
+ posy = None
367
+ else:
368
+ posx = self.apply_scale(positions[0], xscale, xax)
369
+ posy = self.apply_scale(positions[1], yscale, yax)
370
+
371
+ kde_fct = methods[kde_type]
372
+ if len(x):
373
+ density = kde_fct(events_x=xs, events_y=ys,
374
+ xout=posx, yout=posy,
375
+ **kde_kwargs)
376
+ else:
377
+ density = np.array([])
378
+
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
@@ -56,6 +56,16 @@ def bin_width_doane(a):
56
56
  return acc
57
57
 
58
58
 
59
+ def bin_width_doane_div5(a):
60
+ """Compute contour spacing based on Doane's formula divided by five
61
+
62
+ See Also
63
+ --------
64
+ bin_width_doane: method used to compute the bin width
65
+ """
66
+ return bin_width_doane(a) / 5
67
+
68
+
59
69
  def bin_width_percentile(a):
60
70
  """Compute contour spacing based on data percentiles
61
71
 
@@ -635,7 +635,7 @@ class RTDCBase(abc.ABC):
635
635
  The kernel density Z evaluated on a rectangular grid (X,Y).
636
636
  """
637
637
  kde_instance = KernelDensityEstimator(rtdc_ds=self)
638
- xmesh, ymesh, density = kde_instance.get_contour(
638
+ xmesh, ymesh, density = kde_instance.get_raster(
639
639
  xax=xax, yax=yax, xacc=xacc, yacc=yacc, kde_type=kde_type,
640
640
  kde_kwargs=kde_kwargs, xscale=xscale, yscale=yscale
641
641
  )
@@ -746,6 +746,8 @@ class RTDCBase(abc.ABC):
746
746
  "ignored_basins": bd_keys,
747
747
  # basin key
748
748
  "key": bdict["key"],
749
+ # whether the basin is perishable or not
750
+ "perishable": bdict.get("perishable", False),
749
751
  }
750
752
 
751
753
  # Check whether this basin is supported and exists
@@ -783,12 +785,19 @@ class RTDCBase(abc.ABC):
783
785
  b_cls = bc[bdict["format"]]
784
786
  # Try absolute path
785
787
  bna = b_cls(pp, **kwargs)
786
- if bna.verify_basin():
787
- basins.append(bna)
788
- break
788
+
789
+ try:
790
+ absolute_exists = bna.verify_basin()
791
+ except BaseException:
792
+ pass
793
+ else:
794
+ if absolute_exists:
795
+ basins.append(bna)
796
+ break
789
797
  # Try relative path
790
798
  this_path = pathlib.Path(self.path)
791
799
  if this_path.exists():
800
+
792
801
  # Insert relative path
793
802
  bnr = b_cls(this_path.parent / pp, **kwargs)
794
803
  if bnr.verify_basin():
@@ -268,8 +268,8 @@ class Export(object):
268
268
  compression_kwargs: dict
269
269
  Dictionary with the keys "compression" and "compression_opts"
270
270
  which are passed to :func:`h5py.H5File.create_dataset`. The
271
- default is Zstandard compression with the lowest compression
272
- level `hdf5plugin.Zstd(clevel=1)`.
271
+ default is Zstandard compression with the compression
272
+ level 5 `hdf5plugin.Zstd(clevel=5)`.
273
273
  compression: str or None
274
274
  Compression method used for data storage;
275
275
  one of [None, "lzf", "gzip", "szip"].
@@ -300,7 +300,7 @@ class Export(object):
300
300
  # be backwards-compatible
301
301
  compression_kwargs = {"compression": compression}
302
302
  if compression_kwargs is None:
303
- compression_kwargs = hdf5plugin.Zstd(clevel=1)
303
+ compression_kwargs = hdf5plugin.Zstd(clevel=5)
304
304
  path = pathlib.Path(path)
305
305
  # Make sure that path ends with .rtdc
306
306
  if path.suffix not in [".rtdc", ".rtdc~"]:
@@ -505,6 +505,11 @@ class Export(object):
505
505
  # defined in. Since we are exporting, it does not
506
506
  # make sense to store these basins in the output file.
507
507
  continue
508
+ elif bn_dict.get("perishable"):
509
+ # Perishable basins require secret keys or complicated
510
+ # logic to execute in order to refresh them. We do not
511
+ # store them in the output file.
512
+ continue
508
513
  basinmap_orig = bn_dict.get("basin_map")
509
514
  if not filtered:
510
515
  # filtering disabled: just copy basins