DARTsort 0.4.0__tar.gz → 0.5.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.
Files changed (226) hide show
  1. {dartsort-0.4.0 → dartsort-0.5.1}/.github/workflows/ci.yml +6 -6
  2. {dartsort-0.4.0 → dartsort-0.5.1}/.github/workflows/ci_windows.yml +6 -5
  3. {dartsort-0.4.0 → dartsort-0.5.1}/PKG-INFO +21 -30
  4. dartsort-0.5.1/README.md +38 -0
  5. {dartsort-0.4.0 → dartsort-0.5.1}/environment.yml +2 -1
  6. {dartsort-0.4.0 → dartsort-0.5.1}/pyproject.toml +17 -6
  7. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/__init__.py +12 -4
  8. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/cli.py +7 -4
  9. dartsort-0.5.1/src/dartsort/clustering/__init__.py +2 -0
  10. dartsort-0.5.1/src/dartsort/clustering/agglomerate.py +627 -0
  11. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/clustering/cluster_util.py +167 -25
  12. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/clustering/clustering.py +170 -51
  13. dartsort-0.5.1/src/dartsort/clustering/clustering_features.py +308 -0
  14. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/clustering/density.py +14 -27
  15. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/clustering/forward_backward.py +2 -7
  16. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/clustering/kmeans.py +8 -17
  17. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/clustering/merge.py +23 -105
  18. {dartsort-0.4.0/src/dartsort/clustering/gmm → dartsort-0.5.1/src/dartsort/clustering}/mixture.py +657 -338
  19. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/clustering/modes.py +8 -10
  20. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/clustering/refine_util.py +31 -30
  21. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/config.py +121 -41
  22. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/detect/detect.py +1 -0
  23. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/detect/detect_filters.py +0 -1
  24. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/evaluate/analysis.py +119 -39
  25. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/evaluate/comparison.py +97 -14
  26. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/evaluate/hybrid_util.py +64 -18
  27. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/evaluate/noise_recording_tools.py +12 -9
  28. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/evaluate/sim_template_tools.py +3 -5
  29. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/evaluate/simkit.py +31 -24
  30. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/evaluate/simlib.py +9 -8
  31. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/localize/localize_util.py +8 -8
  32. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/main.py +209 -103
  33. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/peel/__init__.py +2 -1
  34. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/peel/grab.py +13 -15
  35. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/peel/matching.py +34 -32
  36. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/peel/matching_util/compressed_upsampled.py +3 -1
  37. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/peel/matching_util/drifty.py +135 -103
  38. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/peel/matching_util/matching_base.py +5 -4
  39. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/peel/matching_util/pairwise.py +6 -6
  40. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/peel/matching_util/pairwise_util.py +13 -13
  41. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/peel/peel_base.py +401 -152
  42. dartsort-0.5.1/src/dartsort/peel/peel_lib.py +927 -0
  43. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/peel/reduction_template.py +80 -16
  44. dartsort-0.5.1/src/dartsort/peel/shaver.py +170 -0
  45. dartsort-0.5.1/src/dartsort/peel/subtract.py +482 -0
  46. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/peel/threshold.py +29 -227
  47. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/templates/get_templates.py +12 -42
  48. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/templates/postprocess_util.py +55 -32
  49. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/templates/realignment.py +9 -3
  50. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/templates/template_util.py +26 -6
  51. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/templates/templates.py +12 -3
  52. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/templates/templib.py +15 -3
  53. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/transform/_multichan_denoiser_kit.py +145 -77
  54. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/transform/all_transformers.py +24 -17
  55. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/transform/amortized_localization.py +86 -94
  56. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/transform/amplitudes.py +16 -3
  57. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/transform/decollider.py +257 -168
  58. dartsort-0.5.1/src/dartsort/transform/denoising_scorer.py +33 -0
  59. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/transform/enforce_decrease.py +2 -0
  60. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/transform/fixed_prop.py +2 -3
  61. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/transform/interp.py +17 -8
  62. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/transform/localize.py +3 -1
  63. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/transform/matching_denoiser.py +18 -3
  64. dartsort-0.5.1/src/dartsort/transform/mixture_classifier.py +448 -0
  65. dartsort-0.5.1/src/dartsort/transform/pipeline.py +652 -0
  66. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/transform/reduction.py +15 -17
  67. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/transform/single_channel_denoiser.py +3 -2
  68. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/transform/supervised_denoiser.py +9 -8
  69. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/transform/temporal_pca.py +98 -37
  70. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/transform/transform_base.py +116 -47
  71. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/transform/whiten.py +5 -3
  72. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/util/cli_util.py +10 -3
  73. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/util/data_util.py +385 -124
  74. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/util/drift_util.py +1 -2
  75. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/util/internal_config.py +627 -441
  76. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/util/interpolation_util.py +75 -259
  77. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/util/job_util.py +1 -1
  78. dartsort-0.5.1/src/dartsort/util/logging_util.py +250 -0
  79. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/util/main_util.py +127 -5
  80. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/util/more_operators.py +13 -12
  81. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/util/motion.py +153 -12
  82. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/util/multiprocessing_util.py +21 -14
  83. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/util/nn_util.py +5 -4
  84. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/util/noise_util.py +159 -73
  85. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/util/peel_util.py +75 -98
  86. dartsort-0.5.1/src/dartsort/util/preprocess_util.py +90 -0
  87. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/util/py_util.py +39 -19
  88. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/util/registration_util.py +5 -3
  89. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/util/sparse_util.py +5 -9
  90. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/util/spiketorch.py +347 -100
  91. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/util/testing_util/matching_debug_util.py +16 -10
  92. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/util/testing_util/mixture_testing_util.py +9 -22
  93. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/util/torch_util.py +45 -4
  94. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/util/waveform_util.py +17 -9
  95. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/vis/analysis_plots.py +38 -6
  96. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/vis/colors.py +1 -1
  97. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/vis/gt.py +15 -9
  98. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/vis/layout.py +2 -2
  99. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/vis/mixture.py +240 -44
  100. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/vis/recanim.py +13 -7
  101. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/vis/scatterplots.py +28 -13
  102. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/vis/sorting.py +3 -1
  103. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/vis/unit.py +321 -126
  104. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/vis/unit_comparison.py +31 -18
  105. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/vis/versus.py +28 -17
  106. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/vis/vismain.py +113 -22
  107. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/vis/waveforms.py +82 -20
  108. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort.egg-info/PKG-INFO +21 -30
  109. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort.egg-info/SOURCES.txt +8 -3
  110. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort.egg-info/requires.txt +9 -5
  111. {dartsort-0.4.0 → dartsort-0.5.1}/tests/test_alignment.py +109 -106
  112. {dartsort-0.4.0 → dartsort-0.5.1}/tests/test_clustering.py +42 -23
  113. {dartsort-0.4.0 → dartsort-0.5.1}/tests/test_config.py +1 -1
  114. {dartsort-0.4.0 → dartsort-0.5.1}/tests/test_dartsort.py +20 -12
  115. {dartsort-0.4.0 → dartsort-0.5.1}/tests/test_data_util.py +1 -1
  116. {dartsort-0.4.0 → dartsort-0.5.1}/tests/test_detect.py +5 -4
  117. {dartsort-0.4.0 → dartsort-0.5.1}/tests/test_drift_util.py +6 -7
  118. {dartsort-0.4.0 → dartsort-0.5.1}/tests/test_drifty_matching.py +3 -5
  119. {dartsort-0.4.0 → dartsort-0.5.1}/tests/test_grab_and_featurize.py +26 -11
  120. {dartsort-0.4.0 → dartsort-0.5.1}/tests/test_kmeans.py +1 -1
  121. {dartsort-0.4.0 → dartsort-0.5.1}/tests/test_linalg.py +2 -2
  122. {dartsort-0.4.0 → dartsort-0.5.1}/tests/test_localize_torch.py +10 -9
  123. {dartsort-0.4.0 → dartsort-0.5.1}/tests/test_matching.py +81 -64
  124. dartsort-0.5.1/tests/test_mixture_classifier.py +65 -0
  125. {dartsort-0.4.0 → dartsort-0.5.1}/tests/test_modeling.py +12 -10
  126. {dartsort-0.4.0 → dartsort-0.5.1}/tests/test_simkit.py +15 -8
  127. {dartsort-0.4.0 → dartsort-0.5.1}/tests/test_subtract.py +115 -83
  128. {dartsort-0.4.0 → dartsort-0.5.1}/tests/test_templates.py +14 -17
  129. {dartsort-0.4.0 → dartsort-0.5.1}/tests/test_transform.py +55 -22
  130. dartsort-0.4.0/README.md +0 -51
  131. dartsort-0.4.0/src/dartsort/clustering/__init__.py +0 -3
  132. dartsort-0.4.0/src/dartsort/clustering/clustering_features.py +0 -202
  133. dartsort-0.4.0/src/dartsort/clustering/gmm/stable_features.py +0 -695
  134. dartsort-0.4.0/src/dartsort/peel/subtract.py +0 -980
  135. dartsort-0.4.0/src/dartsort/templates/superres_util.py +0 -202
  136. dartsort-0.4.0/src/dartsort/transform/pipeline.py +0 -394
  137. dartsort-0.4.0/src/dartsort/util/logging_util.py +0 -91
  138. {dartsort-0.4.0 → dartsort-0.5.1}/.github/workflows/deploy.yml +0 -0
  139. {dartsort-0.4.0 → dartsort-0.5.1}/.gitignore +0 -0
  140. {dartsort-0.4.0 → dartsort-0.5.1}/notebook/.keep +0 -0
  141. {dartsort-0.4.0 → dartsort-0.5.1}/notebook/basic_integration_test.py +0 -0
  142. {dartsort-0.4.0 → dartsort-0.5.1}/notebook/ci diag.py +0 -0
  143. {dartsort-0.4.0 → dartsort-0.5.1}/notebook/dartsort_dredge_demo.ipynb +0 -0
  144. {dartsort-0.4.0 → dartsort-0.5.1}/notebook/dartsort_dredge_demo.py +0 -0
  145. {dartsort-0.4.0 → dartsort-0.5.1}/notebook/data test.py +0 -0
  146. {dartsort-0.4.0 → dartsort-0.5.1}/notebook/dead reckoning.py +0 -0
  147. {dartsort-0.4.0 → dartsort-0.5.1}/notebook/denoise np1.py +0 -0
  148. {dartsort-0.4.0 → dartsort-0.5.1}/notebook/denoise np2.py +0 -0
  149. {dartsort-0.4.0 → dartsort-0.5.1}/notebook/exploratory.py +0 -0
  150. {dartsort-0.4.0 → dartsort-0.5.1}/notebook/geom debug.py +0 -0
  151. {dartsort-0.4.0 → dartsort-0.5.1}/notebook/hdbscan_clustering_5min.py +0 -0
  152. {dartsort-0.4.0 → dartsort-0.5.1}/notebook/hybrid 10.py +0 -0
  153. {dartsort-0.4.0 → dartsort-0.5.1}/notebook/hybrid cluster.py +0 -0
  154. {dartsort-0.4.0 → dartsort-0.5.1}/notebook/hybrid_11.py +0 -0
  155. {dartsort-0.4.0 → dartsort-0.5.1}/notebook/initial training.py +0 -0
  156. {dartsort-0.4.0 → dartsort-0.5.1}/notebook/make hybrid.py +0 -0
  157. {dartsort-0.4.0 → dartsort-0.5.1}/notebook/mgh.py +0 -0
  158. {dartsort-0.4.0 → dartsort-0.5.1}/notebook/np1 feats.py +0 -0
  159. {dartsort-0.4.0 → dartsort-0.5.1}/notebook/np2 processing version c.py +0 -0
  160. {dartsort-0.4.0 → dartsort-0.5.1}/notebook/paperfigs.py +0 -0
  161. {dartsort-0.4.0 → dartsort-0.5.1}/notebook/pdists.py +0 -0
  162. {dartsort-0.4.0 → dartsort-0.5.1}/notebook/postcheck.py +0 -0
  163. {dartsort-0.4.0 → dartsort-0.5.1}/notebook/ptp vae.py +0 -0
  164. {dartsort-0.4.0 → dartsort-0.5.1}/notebook/re clust.py +0 -0
  165. {dartsort-0.4.0 → dartsort-0.5.1}/notebook/reg fig loop.py +0 -0
  166. {dartsort-0.4.0 → dartsort-0.5.1}/notebook/reg_sim_exp.py +0 -0
  167. {dartsort-0.4.0 → dartsort-0.5.1}/notebook/relocating.py +0 -0
  168. {dartsort-0.4.0 → dartsort-0.5.1}/notebook/relocating_all.py +0 -0
  169. {dartsort-0.4.0 → dartsort-0.5.1}/notebook/restats +0 -0
  170. {dartsort-0.4.0 → dartsort-0.5.1}/notebook/sortStinger1.py +0 -0
  171. {dartsort-0.4.0 → dartsort-0.5.1}/notebook/sortStinger3.py +0 -0
  172. {dartsort-0.4.0 → dartsort-0.5.1}/notebook/sortStinger4.py +0 -0
  173. {dartsort-0.4.0 → dartsort-0.5.1}/notebook/sortStinger5.py +0 -0
  174. {dartsort-0.4.0 → dartsort-0.5.1}/notebook/sortStinger6.py +0 -0
  175. {dartsort-0.4.0 → dartsort-0.5.1}/notebook/spike farm.py +0 -0
  176. {dartsort-0.4.0 → dartsort-0.5.1}/notebook/ss_ensemble_sim.py +0 -0
  177. {dartsort-0.4.0 → dartsort-0.5.1}/notebook/ss_ensemble_sim_drift.py +0 -0
  178. {dartsort-0.4.0 → dartsort-0.5.1}/notebook/ss_sim.py +0 -0
  179. {dartsort-0.4.0 → dartsort-0.5.1}/notebook/stan diagnostics.py +0 -0
  180. {dartsort-0.4.0 → dartsort-0.5.1}/notebook/storytelling c.py +0 -0
  181. {dartsort-0.4.0 → dartsort-0.5.1}/notebook/storytelling.py +0 -0
  182. {dartsort-0.4.0 → dartsort-0.5.1}/notebook/subtract_with_phaseshift_denoiser.py +0 -0
  183. {dartsort-0.4.0 → dartsort-0.5.1}/notebook/tests/debug_matching.py +0 -0
  184. {dartsort-0.4.0 → dartsort-0.5.1}/notebook/tests/test_agreement.py +0 -0
  185. {dartsort-0.4.0 → dartsort-0.5.1}/notebook/tests/test_amplitude_scaling.py +0 -0
  186. {dartsort-0.4.0 → dartsort-0.5.1}/notebook/tests/test_batch_optim.py +0 -0
  187. {dartsort-0.4.0 → dartsort-0.5.1}/notebook/tests/test_ibme.py +0 -0
  188. {dartsort-0.4.0 → dartsort-0.5.1}/notebook/tests/test_mm_initialization.py +0 -0
  189. {dartsort-0.4.0 → dartsort-0.5.1}/notebook/tests/test_normxcorr1d.py +0 -0
  190. {dartsort-0.4.0 → dartsort-0.5.1}/notebook/tests/test_reassignment.py +0 -0
  191. {dartsort-0.4.0 → dartsort-0.5.1}/notebook/tests/test_relocation.py +0 -0
  192. {dartsort-0.4.0 → dartsort-0.5.1}/notebook/thomas.py +0 -0
  193. {dartsort-0.4.0 → dartsort-0.5.1}/setup.cfg +0 -0
  194. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/detect/__init__.py +0 -0
  195. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/evaluate/__init__.py +0 -0
  196. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/localize/__init__.py +0 -0
  197. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/localize/localize_torch.py +0 -0
  198. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/peel/matching_util/__init__.py +0 -0
  199. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/pretrained/default_temporal_kernel.npy +0 -0
  200. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/pretrained/detect_np1.pt +0 -0
  201. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/pretrained/detect_np2.pt +0 -0
  202. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/pretrained/glasbey1024.npz +0 -0
  203. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/pretrained/offset_trained_denoiser.pt +0 -0
  204. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/pretrained/offset_trained_denoiser_added_temp.pt +0 -0
  205. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/pretrained/offset_trained_denoiser_added_temp_boost.pt +0 -0
  206. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/pretrained/original_single_chan_denoiser.pt +0 -0
  207. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/pretrained/single_chan_denoiser.pt +0 -0
  208. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/templates/__init__.py +0 -0
  209. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/transform/__init__.py +0 -0
  210. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/util/__init__.py +0 -0
  211. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/util/residual_util.py +0 -0
  212. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/util/spikeio.py +0 -0
  213. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/util/testing_util/__init__.py +0 -0
  214. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/util/torch_optimization_util.py +0 -0
  215. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/vis/__init__.py +0 -0
  216. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort/vis/metrics_util.py +0 -0
  217. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort.egg-info/dependency_links.txt +0 -0
  218. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort.egg-info/entry_points.txt +0 -0
  219. {dartsort-0.4.0 → dartsort-0.5.1}/src/dartsort.egg-info/top_level.txt +0 -0
  220. {dartsort-0.4.0 → dartsort-0.5.1}/tests/conftest.py +0 -0
  221. {dartsort-0.4.0 → dartsort-0.5.1}/tests/test_enforce_decrease.py +0 -0
  222. {dartsort-0.4.0 → dartsort-0.5.1}/tests/test_spiketorch.py +0 -0
  223. {dartsort-0.4.0 → dartsort-0.5.1}/tests/test_threshold.py +0 -0
  224. {dartsort-0.4.0 → dartsort-0.5.1}/tests/test_torch_optimization_util.py +0 -0
  225. {dartsort-0.4.0 → dartsort-0.5.1}/tests/test_util.py +0 -0
  226. {dartsort-0.4.0 → dartsort-0.5.1}/tests/test_waveform_util.py +0 -0
@@ -11,7 +11,6 @@ on:
11
11
  workflow_dispatch:
12
12
 
13
13
  jobs:
14
-
15
14
  tests:
16
15
  runs-on: "ubuntu-latest"
17
16
  defaults:
@@ -23,20 +22,21 @@ jobs:
23
22
  uses: actions/checkout@v4
24
23
  with:
25
24
  path: dartsort
26
-
25
+
27
26
  - name: Fetch tags and describe
28
27
  run: pushd dartsort/ && git fetch --prune --unshallow --tags && git describe && popd
29
28
 
30
29
  - uses: actions/setup-python@v5
31
30
  with:
32
- python-version: '3.x'
33
- cache: 'pip' # caching pip dependencies
34
-
31
+ python-version: "3.x"
32
+ cache: "pip" # caching pip dependencies
33
+
35
34
  - name: Install dependencies
36
35
  run: |
37
36
  python -m pip install -U pip # seems necessary to make sure pip is my pip
38
37
  pip install --extra-index-url https://download.pytorch.org/whl/cpu torch
39
- pip install -e dartsort/[full]
38
+ pip install git+https://github.com/SpikeInterface/spikeinterface.git
39
+ pip install -e dartsort/[full,test]
40
40
 
41
41
  - name: pytest
42
42
  run: |
@@ -26,20 +26,21 @@ jobs:
26
26
  uses: actions/checkout@v4
27
27
  with:
28
28
  path: dartsort
29
-
29
+
30
30
  - name: Fetch tags and describe
31
31
  run: pushd dartsort/ && git fetch --prune --unshallow --tags && git describe && popd
32
32
 
33
33
  - uses: actions/setup-python@v5
34
34
  with:
35
- python-version: '3.x'
36
- cache: 'pip' # caching pip dependencies
37
-
35
+ python-version: "3.x"
36
+ cache: "pip" # caching pip dependencies
37
+
38
38
  - name: Install dependencies
39
39
  run: |
40
40
  python -m pip install -U pip # seems necessary to make sure pip is my pip
41
41
  pip install --extra-index-url https://download.pytorch.org/whl/cpu torch
42
- pip install -e dartsort/[full]
42
+ pip install git+https://github.com/SpikeInterface/spikeinterface.git
43
+ pip install -e dartsort/[full,test]
43
44
 
44
45
  - name: pytest
45
46
  run: |
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dartsort
3
- Version: 0.4.0
3
+ Version: 0.5.1
4
4
  Summary: DARTsort
5
5
  Author-email: Charlie Windolf <ciw2048@gmail.com>
6
6
  Project-URL: Homepage, https://github.com/cwindolf/dartsort
@@ -13,6 +13,7 @@ Description-Content-Type: text/markdown
13
13
  Requires-Dist: dredge-ephys
14
14
  Requires-Dist: h5py
15
15
  Requires-Dist: jaxtyping
16
+ Requires-Dist: kdepy
16
17
  Requires-Dist: linear_operator
17
18
  Requires-Dist: numba
18
19
  Requires-Dist: numpy>=1.20; python_version < "3.13"
@@ -21,32 +22,36 @@ Requires-Dist: opt-einsum
21
22
  Requires-Dist: pandas
22
23
  Requires-Dist: probeinterface
23
24
  Requires-Dist: pydantic
25
+ Requires-Dist: pynapple
24
26
  Requires-Dist: scipy>=1.13
25
27
  Requires-Dist: scikit-learn
26
- Requires-Dist: spikeinterface>=0.101.2
28
+ Requires-Dist: spikeinterface>=0.104.0
27
29
  Requires-Dist: sympy
28
30
  Requires-Dist: torch>=2.0
29
31
  Requires-Dist: tqdm
30
32
  Provides-Extra: vis
31
33
  Requires-Dist: matplotlib; extra == "vis"
32
34
  Requires-Dist: seaborn; extra == "vis"
33
- Provides-Extra: dev
34
- Requires-Dist: pytest; extra == "dev"
35
- Requires-Dist: pytest-cov; extra == "dev"
35
+ Requires-Dist: matplotlib-venn; extra == "vis"
36
36
  Provides-Extra: gpu
37
37
  Requires-Dist: cupy; extra == "gpu"
38
38
  Provides-Extra: full
39
39
  Requires-Dist: matplotlib; extra == "full"
40
40
  Requires-Dist: seaborn; extra == "full"
41
41
  Requires-Dist: pytest; extra == "full"
42
+ Requires-Dist: matplotlib-venn; extra == "full"
42
43
  Requires-Dist: pytest-cov; extra == "full"
43
44
  Requires-Dist: ipywidgets; extra == "full"
44
45
  Requires-Dist: ipykernel; extra == "full"
45
46
  Requires-Dist: black; extra == "full"
47
+ Provides-Extra: test
48
+ Requires-Dist: pytest; extra == "test"
49
+ Requires-Dist: pytest-cov; extra == "test"
46
50
 
47
- [![badge](https://github.com/cwindolf/dartsort/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/cwindolf/dartsort/actions/)
51
+ [![ci](https://github.com/cwindolf/dartsort/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/cwindolf/dartsort/actions/)
48
52
  [![coveralls](https://coveralls.io/repos/github/cwindolf/dartsort/badge.svg?branch=main)](https://coveralls.io/github/cwindolf/dartsort)
49
53
  [![Zenodo DOI](https://zenodo.org/badge/421108722.svg)](https://doi.org/10.5281/zenodo.16943074)
54
+ [![pypi: dartsort](https://img.shields.io/pypi/v/dartsort?label=pypi:%20dartsort)](https://pypi.org/p/dartsort)
50
55
 
51
56
  # dartsort
52
57
 
@@ -59,39 +64,25 @@ A workflow described in our preprint (https://www.biorxiv.org/content/10.1101/20
59
64
 
60
65
  ## Suggested install steps
61
66
 
62
- If you don't already have Python and PyTorch 2 installed, we recommend doing this with the Miniforge distribution of `conda`. You can find info and installers for your platform [at Miniforge's GitHub repository](https://github.com/conda-forge/miniforge). After installing Miniforge, `conda` will be available on your computer for installing Python packages, as well as the newer and faster conda replacement tool `mamba`. We recommend using `mamba` instead of `conda` below, since the installation tends to be a lot faster with `mamba`.
63
-
64
- To install DARTsort, first clone this GitHub repository.
65
-
66
- After cloning the repository, create and activate the `mamba`/`conda` environment from the configuration file provided as follows:
67
+ If you already have a Python environment set up, you can install `dartsort` with
67
68
 
68
69
  ```bash
69
- $ mamba env create -f environment.yml
70
- $ mamba activate dartsort
70
+ # get all dependencies (includes visualization and GPU packages); remove [gpu] if you don't have one
71
+ $ pip install dartsort[full,gpu]
71
72
  ```
72
73
 
73
- Next, visit https://pytorch.org/get-started/locally/ and follow the `PyTorch` install instructions for your specific OS and hardware needs.
74
- We also need to install `linear_operator` from the `gpytorch` channel.
75
- For example, on a Linux workstation or cluster with NVIDIA GPUs available, one might use (dropping in `mamba` for `conda` commands):
74
+ If you don't already have Python and PyTorch 2 installed, we recommend doing this with the Miniforge distribution of `conda`. You can find info and installers for your platform [at Miniforge's GitHub repository](https://github.com/conda-forge/miniforge). After installing Miniforge, `conda` will be available on your computer for installing Python packages, as well as the newer and faster conda replacement tool `mamba`. We recommend using `mamba` instead of `conda` below, since the installation tends to be a lot faster with `mamba`. You can build a conda environment called `dartsort` with
76
75
 
77
76
  ```bash
78
- # Example -- see https://pytorch.org/get-started/locally/ to find your platform's command.
79
- (dartsort) $ mamba install pytorch torchvision torchaudio pytorch-cuda=11.8 linear_operator -c pytorch -c nvidia -c gpytorch
80
- ```
81
-
82
- Finally, install the remaining `pip` dependencies and `dartsort` itself:
83
-
84
- ```bash
85
- (dartsort) $ pip install -r requirements-full.txt
86
- (dartsort) $ pip install -e .
77
+ $ mamba env create -f environment.yml
78
+ $ mamba activate dartsort
87
79
  ```
88
80
 
89
- To enable DARTsort's default motion correction algorithm [DREDge](https://www.biorxiv.org/content/10.1101/2023.10.24.563768), clone [its GitHub repository](https://github.com/evarol/dredge), and then `cd dredge/` and install the DREDge package with `pip install -e .`.
90
-
91
- Soon we will have a package on PyPI so that these last steps will be just a `pip install dartsort`.
81
+ after cloning this repository. Next, visit https://pytorch.org/get-started/locally/ and follow the `PyTorch` install instructions for your specific OS and hardware needs.
92
82
 
93
- To make sure everything is working:
83
+ Finish with the `pip` command above. Or, to work on the code, use:
94
84
 
95
85
  ```bash
96
- $ (dartsort) pytest tests/*
86
+ (dartsort) $ pip install -e ./[full]
87
+ (dartsort) $ pytest tests/*
97
88
  ```
@@ -0,0 +1,38 @@
1
+ [![ci](https://github.com/cwindolf/dartsort/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/cwindolf/dartsort/actions/)
2
+ [![coveralls](https://coveralls.io/repos/github/cwindolf/dartsort/badge.svg?branch=main)](https://coveralls.io/github/cwindolf/dartsort)
3
+ [![Zenodo DOI](https://zenodo.org/badge/421108722.svg)](https://doi.org/10.5281/zenodo.16943074)
4
+ [![pypi: dartsort](https://img.shields.io/pypi/v/dartsort?label=pypi:%20dartsort)](https://pypi.org/p/dartsort)
5
+
6
+ # dartsort
7
+
8
+ ## :warning: Work in progress code repository
9
+
10
+ We do not currently recommend DARTsort for production spike sorting purposes. We are in the process of implementing a robust and documented pipeline in [`src/dartsort`](src/dartsort), and we will update this page accordingly.
11
+
12
+ A workflow described in our preprint (https://www.biorxiv.org/content/10.1101/2023.08.11.553023v1) is in [uhd_pipeline.py](scripts/uhd_pipeline.py), which is implemented using the legacy code in [`src/spike_psvae`](src/spike_psvae).
13
+
14
+
15
+ ## Suggested install steps
16
+
17
+ If you already have a Python environment set up, you can install `dartsort` with
18
+
19
+ ```bash
20
+ # get all dependencies (includes visualization and GPU packages); remove [gpu] if you don't have one
21
+ $ pip install dartsort[full,gpu]
22
+ ```
23
+
24
+ If you don't already have Python and PyTorch 2 installed, we recommend doing this with the Miniforge distribution of `conda`. You can find info and installers for your platform [at Miniforge's GitHub repository](https://github.com/conda-forge/miniforge). After installing Miniforge, `conda` will be available on your computer for installing Python packages, as well as the newer and faster conda replacement tool `mamba`. We recommend using `mamba` instead of `conda` below, since the installation tends to be a lot faster with `mamba`. You can build a conda environment called `dartsort` with
25
+
26
+ ```bash
27
+ $ mamba env create -f environment.yml
28
+ $ mamba activate dartsort
29
+ ```
30
+
31
+ after cloning this repository. Next, visit https://pytorch.org/get-started/locally/ and follow the `PyTorch` install instructions for your specific OS and hardware needs.
32
+
33
+ Finish with the `pip` command above. Or, to work on the code, use:
34
+
35
+ ```bash
36
+ (dartsort) $ pip install -e ./[full]
37
+ (dartsort) $ pytest tests/*
38
+ ```
@@ -3,7 +3,7 @@ name: dartsort
3
3
  channels:
4
4
  - conda-forge
5
5
  dependencies:
6
- - python=3.11
6
+ - python=3.12
7
7
  - h5py
8
8
  - matplotlib
9
9
  - numpy>=1.26
@@ -16,3 +16,4 @@ dependencies:
16
16
  - numba
17
17
  - pydantic
18
18
  - opt-einsum
19
+ - kdepy
@@ -18,6 +18,7 @@ dependencies = [
18
18
  "dredge-ephys",
19
19
  "h5py",
20
20
  "jaxtyping",
21
+ "kdepy",
21
22
  "linear_operator",
22
23
  "numba",
23
24
  "numpy>=1.20;python_version<'3.13'",
@@ -26,19 +27,20 @@ dependencies = [
26
27
  "pandas",
27
28
  "probeinterface",
28
29
  "pydantic",
30
+ "pynapple",
29
31
  "scipy>=1.13",
30
32
  "scikit-learn",
31
- "spikeinterface>=0.101.2",
33
+ "spikeinterface>=0.104.0",
32
34
  "sympy",
33
35
  "torch>=2.0",
34
36
  "tqdm",
35
37
  ]
36
38
 
37
39
  [project.optional-dependencies]
38
- vis = ["matplotlib", "seaborn"]
39
- dev = ["pytest", "pytest-cov"]
40
+ vis = ["matplotlib", "seaborn", "matplotlib-venn"]
40
41
  gpu = ["cupy"]
41
- full = ["matplotlib", "seaborn", "pytest", "pytest-cov", "ipywidgets", "ipykernel", "black"]
42
+ full = ["matplotlib", "seaborn", "pytest", "matplotlib-venn", "pytest-cov", "ipywidgets", "ipykernel", "black"]
43
+ test = ["pytest", "pytest-cov"]
42
44
 
43
45
  [project.urls]
44
46
  "Homepage" = "https://github.com/cwindolf/dartsort"
@@ -70,9 +72,18 @@ include = 'src\/.*\.pyi?$|tests\/.*\.pyi?$'
70
72
 
71
73
  [tool.ruff]
72
74
  line-length = 88
75
+ extend-select = ["I"]
76
+ ignore = ["F722"]
73
77
 
74
78
  [tool.jupytext]
75
79
  "formats" = "ipynb,py:percent"
76
80
 
77
- [tool.pyright]
78
- "include" = ["src", "tests"]
81
+ [tool.ty.src]
82
+ include = ["src", "tests"]
83
+
84
+ [tool.ty.analysis]
85
+ replace-imports-with-any = ["hdbscan"]
86
+
87
+ [tool.ty.rules]
88
+ "unsupported-base" = "ignore"
89
+ "invalid-key" = "ignore"
@@ -2,11 +2,12 @@ import importlib.metadata
2
2
 
3
3
  from . import detect, util
4
4
  from .clustering import (
5
+ SimpleMatrixFeatures,
6
+ StableWaveformFeatures,
5
7
  cluster_util,
6
8
  clustering_strategies,
7
9
  density,
8
10
  get_clusterer,
9
- get_clustering_features,
10
11
  kmeans,
11
12
  merge,
12
13
  refinement_strategies,
@@ -55,11 +56,17 @@ from .util.data_util import (
55
56
  check_recording,
56
57
  get_featurization_pipeline,
57
58
  get_tpca,
58
- load_h5,
59
+ load,
59
60
  load_stored_tsvd,
60
61
  )
61
62
  from .util.drift_util import registered_geometry
62
63
  from .util.internal_config import *
64
+ from .util.interpolation_util import (
65
+ FromFullProbeInterpolator,
66
+ StableFeaturesInterpolator,
67
+ ToFullProbeInterpolator,
68
+ pad_geom,
69
+ )
63
70
  from .util.job_util import ensure_computation_config, set_global_computation_config
64
71
  from .util.logging_util import (
65
72
  DARTSORTDEBUG,
@@ -67,9 +74,10 @@ from .util.logging_util import (
67
74
  DARTsortLogger,
68
75
  get_logger,
69
76
  )
77
+ from .util.motion import MotionInfo, get_motion_info, try_load_motion_info
70
78
  from .util.noise_util import EmbeddedNoise
79
+ from .util.preprocess_util import preprocess
71
80
  from .util.py_util import databag, resolve_path
72
- from .util.motion import MotionInfo, get_motion_info, try_load_motion_info
73
- from .util.waveform_util import make_channel_index
81
+ from .util.waveform_util import full_channel_index, make_channel_index
74
82
 
75
83
  __version__ = importlib.metadata.version("dartsort")
@@ -1,9 +1,11 @@
1
1
  import argparse
2
- import spikeinterface.core as sc
3
2
  import logging
3
+ import sys
4
+
5
+ import spikeinterface.core as sc
4
6
 
5
- from .util import cli_util
6
7
  from . import config, main
8
+ from .util import cli_util
7
9
 
8
10
 
9
11
  def dartsort_cli():
@@ -71,7 +73,9 @@ def dartsort_cli():
71
73
  if args.output_dir:
72
74
  output_dir = cli_util.ensurepath(args.output_dir, strict=False)
73
75
  elif config_toml is None:
74
- print(f"No output directory given, exiting. See `{ap.prog} -h`.")
76
+ print(
77
+ f"No output directory given, exiting. See `{ap.prog} -h`.", file=sys.stderr
78
+ )
75
79
  return 1
76
80
  else:
77
81
  output_dir = config_toml.parent
@@ -85,7 +89,6 @@ def dartsort_cli():
85
89
  )
86
90
 
87
91
  # load the recording
88
- # TODO: preprocessing management
89
92
  try:
90
93
  rec = sc.load(cli_util.ensurepath(args.recording))
91
94
  assert isinstance(rec, sc.BaseRecording)
@@ -0,0 +1,2 @@
1
+ from .clustering_features import SimpleMatrixFeatures, StableWaveformFeatures
2
+ from .clustering import get_clusterer, clustering_strategies, refinement_strategies, TMMRefinement