DARTsort 0.3.6.5__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 (238) hide show
  1. {dartsort-0.3.6.5 → dartsort-0.5.1}/.github/workflows/ci.yml +6 -13
  2. {dartsort-0.3.6.5 → dartsort-0.5.1}/.github/workflows/ci_windows.yml +14 -13
  3. {dartsort-0.3.6.5 → dartsort-0.5.1}/.gitignore +1 -0
  4. {dartsort-0.3.6.5 → dartsort-0.5.1}/PKG-INFO +25 -31
  5. dartsort-0.5.1/README.md +38 -0
  6. {dartsort-0.3.6.5 → dartsort-0.5.1}/environment.yml +2 -1
  7. {dartsort-0.3.6.5 → dartsort-0.5.1}/pyproject.toml +20 -7
  8. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/__init__.py +24 -9
  9. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/cli.py +7 -4
  10. dartsort-0.5.1/src/dartsort/clustering/__init__.py +2 -0
  11. dartsort-0.5.1/src/dartsort/clustering/agglomerate.py +627 -0
  12. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/clustering/cluster_util.py +177 -40
  13. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/clustering/clustering.py +190 -96
  14. dartsort-0.5.1/src/dartsort/clustering/clustering_features.py +308 -0
  15. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/clustering/density.py +21 -36
  16. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/clustering/forward_backward.py +5 -10
  17. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/clustering/kmeans.py +304 -129
  18. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/clustering/merge.py +31 -116
  19. {dartsort-0.3.6.5/src/dartsort/clustering/gmm → dartsort-0.5.1/src/dartsort/clustering}/mixture.py +2000 -769
  20. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/clustering/modes.py +8 -10
  21. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/clustering/refine_util.py +74 -84
  22. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/config.py +158 -63
  23. dartsort-0.5.1/src/dartsort/detect/__init__.py +2 -0
  24. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/detect/detect.py +23 -69
  25. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/detect/detect_filters.py +0 -1
  26. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/evaluate/analysis.py +154 -92
  27. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/evaluate/comparison.py +103 -14
  28. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/evaluate/hybrid_util.py +89 -52
  29. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/evaluate/noise_recording_tools.py +13 -9
  30. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/evaluate/sim_template_tools.py +6 -8
  31. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/evaluate/simkit.py +124 -75
  32. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/evaluate/simlib.py +114 -22
  33. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/localize/localize_torch.py +1 -1
  34. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/localize/localize_util.py +17 -15
  35. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/main.py +253 -179
  36. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/peel/__init__.py +3 -3
  37. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/peel/grab.py +35 -44
  38. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/peel/matching.py +128 -159
  39. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/peel/matching_util/compressed_upsampled.py +30 -47
  40. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/peel/matching_util/drifty.py +229 -165
  41. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/peel/matching_util/matching_base.py +64 -61
  42. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/peel/matching_util/pairwise.py +21 -13
  43. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/peel/matching_util/pairwise_util.py +27 -28
  44. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/peel/peel_base.py +485 -228
  45. dartsort-0.5.1/src/dartsort/peel/peel_lib.py +927 -0
  46. dartsort-0.5.1/src/dartsort/peel/reduction_template.py +449 -0
  47. dartsort-0.5.1/src/dartsort/peel/shaver.py +170 -0
  48. dartsort-0.5.1/src/dartsort/peel/subtract.py +482 -0
  49. dartsort-0.5.1/src/dartsort/peel/threshold.py +218 -0
  50. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/templates/__init__.py +3 -1
  51. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/templates/get_templates.py +87 -235
  52. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/templates/postprocess_util.py +157 -70
  53. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/templates/realignment.py +13 -6
  54. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/templates/template_util.py +93 -55
  55. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/templates/templates.py +42 -11
  56. dartsort-0.5.1/src/dartsort/templates/templib.py +207 -0
  57. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/transform/_multichan_denoiser_kit.py +145 -77
  58. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/transform/all_transformers.py +31 -18
  59. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/transform/amortized_localization.py +86 -94
  60. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/transform/amplitudes.py +21 -5
  61. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/transform/decollider.py +257 -168
  62. dartsort-0.5.1/src/dartsort/transform/denoising_scorer.py +33 -0
  63. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/transform/enforce_decrease.py +2 -0
  64. dartsort-0.5.1/src/dartsort/transform/fixed_prop.py +27 -0
  65. dartsort-0.5.1/src/dartsort/transform/interp.py +57 -0
  66. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/transform/localize.py +3 -1
  67. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/transform/matching_denoiser.py +18 -3
  68. dartsort-0.5.1/src/dartsort/transform/mixture_classifier.py +448 -0
  69. dartsort-0.5.1/src/dartsort/transform/pipeline.py +652 -0
  70. dartsort-0.5.1/src/dartsort/transform/reduction.py +263 -0
  71. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/transform/single_channel_denoiser.py +3 -2
  72. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/transform/supervised_denoiser.py +9 -8
  73. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/transform/temporal_pca.py +167 -48
  74. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/transform/transform_base.py +116 -47
  75. dartsort-0.5.1/src/dartsort/transform/whiten.py +34 -0
  76. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/util/cli_util.py +10 -3
  77. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/util/data_util.py +663 -142
  78. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/util/drift_util.py +44 -162
  79. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/util/internal_config.py +740 -490
  80. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/util/interpolation_util.py +483 -176
  81. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/util/job_util.py +12 -1
  82. dartsort-0.5.1/src/dartsort/util/logging_util.py +250 -0
  83. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/util/main_util.py +146 -16
  84. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/util/more_operators.py +17 -12
  85. dartsort-0.5.1/src/dartsort/util/motion.py +478 -0
  86. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/util/multiprocessing_util.py +34 -20
  87. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/util/nn_util.py +5 -4
  88. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/util/noise_util.py +421 -257
  89. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/util/peel_util.py +75 -98
  90. dartsort-0.5.1/src/dartsort/util/preprocess_util.py +90 -0
  91. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/util/py_util.py +78 -33
  92. dartsort-0.5.1/src/dartsort/util/registration_util.py +84 -0
  93. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/util/sparse_util.py +5 -9
  94. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/util/spiketorch.py +403 -103
  95. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/util/testing_util/matching_debug_util.py +82 -32
  96. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/util/testing_util/mixture_testing_util.py +9 -22
  97. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/util/torch_util.py +45 -4
  98. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/util/waveform_util.py +20 -9
  99. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/vis/__init__.py +20 -13
  100. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/vis/analysis_plots.py +41 -9
  101. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/vis/colors.py +1 -1
  102. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/vis/gt.py +15 -9
  103. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/vis/layout.py +2 -2
  104. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/vis/mixture.py +399 -88
  105. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/vis/recanim.py +21 -17
  106. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/vis/scatterplots.py +48 -34
  107. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/vis/sorting.py +3 -1
  108. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/vis/unit.py +321 -113
  109. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/vis/unit_comparison.py +31 -18
  110. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/vis/versus.py +28 -17
  111. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/vis/vismain.py +143 -81
  112. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/vis/waveforms.py +82 -20
  113. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort.egg-info/PKG-INFO +25 -31
  114. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort.egg-info/SOURCES.txt +15 -12
  115. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort.egg-info/requires.txt +11 -5
  116. {dartsort-0.3.6.5 → dartsort-0.5.1}/tests/test_alignment.py +133 -143
  117. {dartsort-0.3.6.5 → dartsort-0.5.1}/tests/test_clustering.py +50 -32
  118. {dartsort-0.3.6.5 → dartsort-0.5.1}/tests/test_config.py +3 -1
  119. {dartsort-0.3.6.5 → dartsort-0.5.1}/tests/test_dartsort.py +25 -17
  120. {dartsort-0.3.6.5 → dartsort-0.5.1}/tests/test_data_util.py +1 -1
  121. {dartsort-0.3.6.5 → dartsort-0.5.1}/tests/test_detect.py +2 -1
  122. {dartsort-0.3.6.5 → dartsort-0.5.1}/tests/test_drift_util.py +39 -32
  123. {dartsort-0.3.6.5 → dartsort-0.5.1}/tests/test_drifty_matching.py +3 -5
  124. {dartsort-0.3.6.5 → dartsort-0.5.1}/tests/test_grab_and_featurize.py +30 -15
  125. {dartsort-0.3.6.5 → dartsort-0.5.1}/tests/test_kmeans.py +1 -1
  126. {dartsort-0.3.6.5 → dartsort-0.5.1}/tests/test_localize_torch.py +2 -1
  127. {dartsort-0.3.6.5 → dartsort-0.5.1}/tests/test_matching.py +97 -71
  128. dartsort-0.5.1/tests/test_mixture_classifier.py +65 -0
  129. {dartsort-0.3.6.5 → dartsort-0.5.1}/tests/test_modeling.py +47 -14
  130. {dartsort-0.3.6.5 → dartsort-0.5.1}/tests/test_simkit.py +56 -44
  131. {dartsort-0.3.6.5 → dartsort-0.5.1}/tests/test_spiketorch.py +4 -2
  132. {dartsort-0.3.6.5 → dartsort-0.5.1}/tests/test_subtract.py +119 -82
  133. {dartsort-0.3.6.5 → dartsort-0.5.1}/tests/test_templates.py +197 -102
  134. {dartsort-0.3.6.5 → dartsort-0.5.1}/tests/test_transform.py +63 -23
  135. {dartsort-0.3.6.5 → dartsort-0.5.1}/tests/test_waveform_util.py +4 -1
  136. dartsort-0.3.6.5/README.md +0 -50
  137. dartsort-0.3.6.5/src/dartsort/clustering/__init__.py +0 -3
  138. dartsort-0.3.6.5/src/dartsort/clustering/clustering_features.py +0 -202
  139. dartsort-0.3.6.5/src/dartsort/clustering/gmm/stable_features.py +0 -993
  140. dartsort-0.3.6.5/src/dartsort/clustering/relocate.py +0 -109
  141. dartsort-0.3.6.5/src/dartsort/clustering/split.py +0 -1285
  142. dartsort-0.3.6.5/src/dartsort/detect/__init__.py +0 -2
  143. dartsort-0.3.6.5/src/dartsort/peel/running_template.py +0 -1701
  144. dartsort-0.3.6.5/src/dartsort/peel/subtract.py +0 -1136
  145. dartsort-0.3.6.5/src/dartsort/peel/threshold.py +0 -471
  146. dartsort-0.3.6.5/src/dartsort/peel/universal.py +0 -191
  147. dartsort-0.3.6.5/src/dartsort/templates/superres_util.py +0 -204
  148. dartsort-0.3.6.5/src/dartsort/transform/pipeline.py +0 -391
  149. dartsort-0.3.6.5/src/dartsort/transform/single_channel_templates.py +0 -98
  150. dartsort-0.3.6.5/src/dartsort/util/logging_util.py +0 -91
  151. dartsort-0.3.6.5/src/dartsort/util/registration_util.py +0 -128
  152. dartsort-0.3.6.5/src/dartsort/util/universal_util.py +0 -269
  153. dartsort-0.3.6.5/src/dartsort/vis/over_time.py +0 -514
  154. dartsort-0.3.6.5/tests/test_relocate.py +0 -147
  155. dartsort-0.3.6.5/tests/test_universal.py +0 -9
  156. {dartsort-0.3.6.5 → dartsort-0.5.1}/.github/workflows/deploy.yml +0 -0
  157. {dartsort-0.3.6.5 → dartsort-0.5.1}/notebook/.keep +0 -0
  158. {dartsort-0.3.6.5 → dartsort-0.5.1}/notebook/basic_integration_test.py +0 -0
  159. {dartsort-0.3.6.5 → dartsort-0.5.1}/notebook/ci diag.py +0 -0
  160. {dartsort-0.3.6.5 → dartsort-0.5.1}/notebook/dartsort_dredge_demo.ipynb +0 -0
  161. {dartsort-0.3.6.5 → dartsort-0.5.1}/notebook/dartsort_dredge_demo.py +0 -0
  162. {dartsort-0.3.6.5 → dartsort-0.5.1}/notebook/data test.py +0 -0
  163. {dartsort-0.3.6.5 → dartsort-0.5.1}/notebook/dead reckoning.py +0 -0
  164. {dartsort-0.3.6.5 → dartsort-0.5.1}/notebook/denoise np1.py +0 -0
  165. {dartsort-0.3.6.5 → dartsort-0.5.1}/notebook/denoise np2.py +0 -0
  166. {dartsort-0.3.6.5 → dartsort-0.5.1}/notebook/exploratory.py +0 -0
  167. {dartsort-0.3.6.5 → dartsort-0.5.1}/notebook/geom debug.py +0 -0
  168. {dartsort-0.3.6.5 → dartsort-0.5.1}/notebook/hdbscan_clustering_5min.py +0 -0
  169. {dartsort-0.3.6.5 → dartsort-0.5.1}/notebook/hybrid 10.py +0 -0
  170. {dartsort-0.3.6.5 → dartsort-0.5.1}/notebook/hybrid cluster.py +0 -0
  171. {dartsort-0.3.6.5 → dartsort-0.5.1}/notebook/hybrid_11.py +0 -0
  172. {dartsort-0.3.6.5 → dartsort-0.5.1}/notebook/initial training.py +0 -0
  173. {dartsort-0.3.6.5 → dartsort-0.5.1}/notebook/make hybrid.py +0 -0
  174. {dartsort-0.3.6.5 → dartsort-0.5.1}/notebook/mgh.py +0 -0
  175. {dartsort-0.3.6.5 → dartsort-0.5.1}/notebook/np1 feats.py +0 -0
  176. {dartsort-0.3.6.5 → dartsort-0.5.1}/notebook/np2 processing version c.py +0 -0
  177. {dartsort-0.3.6.5 → dartsort-0.5.1}/notebook/paperfigs.py +0 -0
  178. {dartsort-0.3.6.5 → dartsort-0.5.1}/notebook/pdists.py +0 -0
  179. {dartsort-0.3.6.5 → dartsort-0.5.1}/notebook/postcheck.py +0 -0
  180. {dartsort-0.3.6.5 → dartsort-0.5.1}/notebook/ptp vae.py +0 -0
  181. {dartsort-0.3.6.5 → dartsort-0.5.1}/notebook/re clust.py +0 -0
  182. {dartsort-0.3.6.5 → dartsort-0.5.1}/notebook/reg fig loop.py +0 -0
  183. {dartsort-0.3.6.5 → dartsort-0.5.1}/notebook/reg_sim_exp.py +0 -0
  184. {dartsort-0.3.6.5 → dartsort-0.5.1}/notebook/relocating.py +0 -0
  185. {dartsort-0.3.6.5 → dartsort-0.5.1}/notebook/relocating_all.py +0 -0
  186. {dartsort-0.3.6.5 → dartsort-0.5.1}/notebook/restats +0 -0
  187. {dartsort-0.3.6.5 → dartsort-0.5.1}/notebook/sortStinger1.py +0 -0
  188. {dartsort-0.3.6.5 → dartsort-0.5.1}/notebook/sortStinger3.py +0 -0
  189. {dartsort-0.3.6.5 → dartsort-0.5.1}/notebook/sortStinger4.py +0 -0
  190. {dartsort-0.3.6.5 → dartsort-0.5.1}/notebook/sortStinger5.py +0 -0
  191. {dartsort-0.3.6.5 → dartsort-0.5.1}/notebook/sortStinger6.py +0 -0
  192. {dartsort-0.3.6.5 → dartsort-0.5.1}/notebook/spike farm.py +0 -0
  193. {dartsort-0.3.6.5 → dartsort-0.5.1}/notebook/ss_ensemble_sim.py +0 -0
  194. {dartsort-0.3.6.5 → dartsort-0.5.1}/notebook/ss_ensemble_sim_drift.py +0 -0
  195. {dartsort-0.3.6.5 → dartsort-0.5.1}/notebook/ss_sim.py +0 -0
  196. {dartsort-0.3.6.5 → dartsort-0.5.1}/notebook/stan diagnostics.py +0 -0
  197. {dartsort-0.3.6.5 → dartsort-0.5.1}/notebook/storytelling c.py +0 -0
  198. {dartsort-0.3.6.5 → dartsort-0.5.1}/notebook/storytelling.py +0 -0
  199. {dartsort-0.3.6.5 → dartsort-0.5.1}/notebook/subtract_with_phaseshift_denoiser.py +0 -0
  200. {dartsort-0.3.6.5 → dartsort-0.5.1}/notebook/tests/debug_matching.py +0 -0
  201. {dartsort-0.3.6.5 → dartsort-0.5.1}/notebook/tests/test_agreement.py +0 -0
  202. {dartsort-0.3.6.5 → dartsort-0.5.1}/notebook/tests/test_amplitude_scaling.py +0 -0
  203. {dartsort-0.3.6.5 → dartsort-0.5.1}/notebook/tests/test_batch_optim.py +0 -0
  204. {dartsort-0.3.6.5 → dartsort-0.5.1}/notebook/tests/test_ibme.py +0 -0
  205. {dartsort-0.3.6.5 → dartsort-0.5.1}/notebook/tests/test_mm_initialization.py +0 -0
  206. {dartsort-0.3.6.5 → dartsort-0.5.1}/notebook/tests/test_normxcorr1d.py +0 -0
  207. {dartsort-0.3.6.5 → dartsort-0.5.1}/notebook/tests/test_reassignment.py +0 -0
  208. {dartsort-0.3.6.5 → dartsort-0.5.1}/notebook/tests/test_relocation.py +0 -0
  209. {dartsort-0.3.6.5 → dartsort-0.5.1}/notebook/thomas.py +0 -0
  210. {dartsort-0.3.6.5 → dartsort-0.5.1}/setup.cfg +0 -0
  211. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/evaluate/__init__.py +0 -0
  212. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/localize/__init__.py +0 -0
  213. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/peel/matching_util/__init__.py +0 -0
  214. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/pretrained/default_temporal_kernel.npy +0 -0
  215. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/pretrained/detect_np1.pt +0 -0
  216. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/pretrained/detect_np2.pt +0 -0
  217. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/pretrained/glasbey1024.npz +0 -0
  218. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/pretrained/offset_trained_denoiser.pt +0 -0
  219. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/pretrained/offset_trained_denoiser_added_temp.pt +0 -0
  220. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/pretrained/offset_trained_denoiser_added_temp_boost.pt +0 -0
  221. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/pretrained/original_single_chan_denoiser.pt +0 -0
  222. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/pretrained/single_chan_denoiser.pt +0 -0
  223. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/transform/__init__.py +0 -0
  224. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/util/__init__.py +0 -0
  225. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/util/residual_util.py +0 -0
  226. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/util/spikeio.py +0 -0
  227. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/util/testing_util/__init__.py +0 -0
  228. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/util/torch_optimization_util.py +0 -0
  229. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort/vis/metrics_util.py +0 -0
  230. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort.egg-info/dependency_links.txt +0 -0
  231. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort.egg-info/entry_points.txt +0 -0
  232. {dartsort-0.3.6.5 → dartsort-0.5.1}/src/dartsort.egg-info/top_level.txt +0 -0
  233. {dartsort-0.3.6.5 → dartsort-0.5.1}/tests/conftest.py +0 -0
  234. {dartsort-0.3.6.5 → dartsort-0.5.1}/tests/test_enforce_decrease.py +0 -0
  235. {dartsort-0.3.6.5 → dartsort-0.5.1}/tests/test_linalg.py +0 -0
  236. {dartsort-0.3.6.5 → dartsort-0.5.1}/tests/test_threshold.py +0 -0
  237. {dartsort-0.3.6.5 → dartsort-0.5.1}/tests/test_torch_optimization_util.py +0 -0
  238. {dartsort-0.3.6.5 → dartsort-0.5.1}/tests/test_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,27 +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
- - name: Get DREDge
31
- uses: actions/checkout@v4
32
- with:
33
- repository: evarol/dredge
34
- path: dredge
35
-
36
29
  - uses: actions/setup-python@v5
37
30
  with:
38
- python-version: '3.x'
39
- cache: 'pip' # caching pip dependencies
40
-
31
+ python-version: "3.x"
32
+ cache: "pip" # caching pip dependencies
33
+
41
34
  - name: Install dependencies
42
35
  run: |
43
36
  python -m pip install -U pip # seems necessary to make sure pip is my pip
44
37
  pip install --extra-index-url https://download.pytorch.org/whl/cpu torch
45
- pip install dredge/
46
- pip install -e dartsort/[full]
38
+ pip install git+https://github.com/SpikeInterface/spikeinterface.git
39
+ pip install -e dartsort/[full,test]
47
40
 
48
41
  - name: pytest
49
42
  run: |
@@ -4,12 +4,19 @@ on:
4
4
  push:
5
5
  branches:
6
6
  - main
7
+ workflow_run:
8
+ workflows: [CI]
9
+ types: [completed]
10
+ branches:
11
+ - develop
7
12
  workflow_dispatch:
8
13
 
9
14
  jobs:
10
-
11
15
  tests_windows:
12
16
  runs-on: "windows-latest"
17
+ if: >-
18
+ github.event_name != 'workflow_run' ||
19
+ github.event.workflow_run.conclusion == 'success'
13
20
  defaults:
14
21
  run:
15
22
  shell: bash -el {0}
@@ -19,27 +26,21 @@ jobs:
19
26
  uses: actions/checkout@v4
20
27
  with:
21
28
  path: dartsort
22
-
29
+
23
30
  - name: Fetch tags and describe
24
31
  run: pushd dartsort/ && git fetch --prune --unshallow --tags && git describe && popd
25
32
 
26
- - name: Get DREDge
27
- uses: actions/checkout@v4
28
- with:
29
- repository: evarol/dredge
30
- path: dredge
31
-
32
33
  - uses: actions/setup-python@v5
33
34
  with:
34
- python-version: '3.x'
35
- cache: 'pip' # caching pip dependencies
36
-
35
+ python-version: "3.x"
36
+ cache: "pip" # caching pip dependencies
37
+
37
38
  - name: Install dependencies
38
39
  run: |
39
40
  python -m pip install -U pip # seems necessary to make sure pip is my pip
40
41
  pip install --extra-index-url https://download.pytorch.org/whl/cpu torch
41
- pip install dredge/
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: |
@@ -14,6 +14,7 @@ figs/*
14
14
  *.swp
15
15
  *.sublime-workspace
16
16
  *.sublime-project
17
+ .vscode/
17
18
 
18
19
  ## Core latex/pdflatex auxiliary files:
19
20
  *.aux
@@ -1,8 +1,8 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dartsort
3
- Version: 0.3.6.5
3
+ Version: 0.5.1
4
4
  Summary: DARTsort
5
- Author-email: Charlie Windolf <ciw2107@columbia.edu>
5
+ Author-email: Charlie Windolf <ciw2048@gmail.com>
6
6
  Project-URL: Homepage, https://github.com/cwindolf/dartsort
7
7
  Project-URL: Bug Tracker, https://github.com/cwindolf/dartsort/issues
8
8
  Classifier: Programming Language :: Python :: 3
@@ -10,7 +10,10 @@ Classifier: License :: OSI Approved :: MIT License
10
10
  Classifier: Operating System :: OS Independent
11
11
  Requires-Python: >=3.11
12
12
  Description-Content-Type: text/markdown
13
+ Requires-Dist: dredge-ephys
13
14
  Requires-Dist: h5py
15
+ Requires-Dist: jaxtyping
16
+ Requires-Dist: kdepy
14
17
  Requires-Dist: linear_operator
15
18
  Requires-Dist: numba
16
19
  Requires-Dist: numpy>=1.20; python_version < "3.13"
@@ -19,31 +22,36 @@ Requires-Dist: opt-einsum
19
22
  Requires-Dist: pandas
20
23
  Requires-Dist: probeinterface
21
24
  Requires-Dist: pydantic
25
+ Requires-Dist: pynapple
22
26
  Requires-Dist: scipy>=1.13
23
27
  Requires-Dist: scikit-learn
24
- Requires-Dist: spikeinterface>=0.101.2
28
+ Requires-Dist: spikeinterface>=0.104.0
25
29
  Requires-Dist: sympy
26
30
  Requires-Dist: torch>=2.0
27
31
  Requires-Dist: tqdm
28
32
  Provides-Extra: vis
29
33
  Requires-Dist: matplotlib; extra == "vis"
30
34
  Requires-Dist: seaborn; extra == "vis"
31
- Provides-Extra: dev
32
- Requires-Dist: pytest; extra == "dev"
33
- Requires-Dist: pytest-cov; extra == "dev"
35
+ Requires-Dist: matplotlib-venn; extra == "vis"
34
36
  Provides-Extra: gpu
35
37
  Requires-Dist: cupy; extra == "gpu"
36
38
  Provides-Extra: full
37
39
  Requires-Dist: matplotlib; extra == "full"
38
40
  Requires-Dist: seaborn; extra == "full"
39
41
  Requires-Dist: pytest; extra == "full"
42
+ Requires-Dist: matplotlib-venn; extra == "full"
40
43
  Requires-Dist: pytest-cov; extra == "full"
41
44
  Requires-Dist: ipywidgets; extra == "full"
42
45
  Requires-Dist: ipykernel; extra == "full"
43
46
  Requires-Dist: black; extra == "full"
47
+ Provides-Extra: test
48
+ Requires-Dist: pytest; extra == "test"
49
+ Requires-Dist: pytest-cov; extra == "test"
44
50
 
45
- [![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/)
46
52
  [![coveralls](https://coveralls.io/repos/github/cwindolf/dartsort/badge.svg?branch=main)](https://coveralls.io/github/cwindolf/dartsort)
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)
47
55
 
48
56
  # dartsort
49
57
 
@@ -56,39 +64,25 @@ A workflow described in our preprint (https://www.biorxiv.org/content/10.1101/20
56
64
 
57
65
  ## Suggested install steps
58
66
 
59
- 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`.
60
-
61
- To install DARTsort, first clone this GitHub repository.
62
-
63
- 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
64
68
 
65
69
  ```bash
66
- $ mamba env create -f environment.yml
67
- $ 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]
68
72
  ```
69
73
 
70
- Next, visit https://pytorch.org/get-started/locally/ and follow the `PyTorch` install instructions for your specific OS and hardware needs.
71
- We also need to install `linear_operator` from the `gpytorch` channel.
72
- 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
73
75
 
74
76
  ```bash
75
- # Example -- see https://pytorch.org/get-started/locally/ to find your platform's command.
76
- (dartsort) $ mamba install pytorch torchvision torchaudio pytorch-cuda=11.8 linear_operator -c pytorch -c nvidia -c gpytorch
77
- ```
78
-
79
- Finally, install the remaining `pip` dependencies and `dartsort` itself:
80
-
81
- ```bash
82
- (dartsort) $ pip install -r requirements-full.txt
83
- (dartsort) $ pip install -e .
77
+ $ mamba env create -f environment.yml
78
+ $ mamba activate dartsort
84
79
  ```
85
80
 
86
- 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 .`.
87
-
88
- 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.
89
82
 
90
- To make sure everything is working:
83
+ Finish with the `pip` command above. Or, to work on the code, use:
91
84
 
92
85
  ```bash
93
- $ (dartsort) pytest tests/*
86
+ (dartsort) $ pip install -e ./[full]
87
+ (dartsort) $ pytest tests/*
94
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
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
5
5
  [project]
6
6
  name = "dartsort"
7
7
  dynamic = ["version"]
8
- authors = [{ name = "Charlie Windolf", email = "ciw2107@columbia.edu" }]
8
+ authors = [{ name = "Charlie Windolf", email = "ciw2048@gmail.com" }]
9
9
  description = "DARTsort"
10
10
  readme = "README.md"
11
11
  requires-python = ">=3.11"
@@ -15,7 +15,10 @@ classifiers = [
15
15
  "Operating System :: OS Independent",
16
16
  ]
17
17
  dependencies = [
18
+ "dredge-ephys",
18
19
  "h5py",
20
+ "jaxtyping",
21
+ "kdepy",
19
22
  "linear_operator",
20
23
  "numba",
21
24
  "numpy>=1.20;python_version<'3.13'",
@@ -24,19 +27,20 @@ dependencies = [
24
27
  "pandas",
25
28
  "probeinterface",
26
29
  "pydantic",
30
+ "pynapple",
27
31
  "scipy>=1.13",
28
32
  "scikit-learn",
29
- "spikeinterface>=0.101.2",
33
+ "spikeinterface>=0.104.0",
30
34
  "sympy",
31
35
  "torch>=2.0",
32
36
  "tqdm",
33
37
  ]
34
38
 
35
39
  [project.optional-dependencies]
36
- vis = ["matplotlib", "seaborn"]
37
- dev = ["pytest", "pytest-cov"]
40
+ vis = ["matplotlib", "seaborn", "matplotlib-venn"]
38
41
  gpu = ["cupy"]
39
- 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"]
40
44
 
41
45
  [project.urls]
42
46
  "Homepage" = "https://github.com/cwindolf/dartsort"
@@ -68,9 +72,18 @@ include = 'src\/.*\.pyi?$|tests\/.*\.pyi?$'
68
72
 
69
73
  [tool.ruff]
70
74
  line-length = 88
75
+ extend-select = ["I"]
76
+ ignore = ["F722"]
71
77
 
72
78
  [tool.jupytext]
73
79
  "formats" = "ipynb,py:percent"
74
80
 
75
- [tool.pyright]
76
- "include" = ["src"]
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,
@@ -26,16 +27,15 @@ from .main import (
26
27
  check_recording,
27
28
  cluster,
28
29
  dartsort,
29
- estimate_motion,
30
30
  grab,
31
31
  logger,
32
32
  match,
33
33
  run_peeler,
34
34
  subtract,
35
35
  threshold,
36
- universal_match,
37
36
  )
38
37
  from .peel.grab import GrabAndFeaturize
38
+ from .peel.matching import MatchingTemplates
39
39
  from .templates import (
40
40
  TemplateData,
41
41
  estimate_template_library,
@@ -43,26 +43,41 @@ from .templates import (
43
43
  realign,
44
44
  )
45
45
  from .transform import WaveformPipeline
46
- from .util import data_util, logging_util, noise_util, spiketorch, waveform_util
46
+ from .util import (
47
+ data_util,
48
+ logging_util,
49
+ noise_util,
50
+ spikeio,
51
+ spiketorch,
52
+ waveform_util,
53
+ )
47
54
  from .util.data_util import (
48
55
  DARTsortSorting,
56
+ check_recording,
49
57
  get_featurization_pipeline,
50
- load_h5,
51
58
  get_tpca,
59
+ load,
52
60
  load_stored_tsvd,
53
- check_recording,
54
61
  )
55
62
  from .util.drift_util import registered_geometry
56
63
  from .util.internal_config import *
64
+ from .util.interpolation_util import (
65
+ FromFullProbeInterpolator,
66
+ StableFeaturesInterpolator,
67
+ ToFullProbeInterpolator,
68
+ pad_geom,
69
+ )
70
+ from .util.job_util import ensure_computation_config, set_global_computation_config
57
71
  from .util.logging_util import (
58
72
  DARTSORTDEBUG,
59
73
  DARTSORTVERBOSE,
60
74
  DARTsortLogger,
61
75
  get_logger,
62
76
  )
77
+ from .util.motion import MotionInfo, get_motion_info, try_load_motion_info
63
78
  from .util.noise_util import EmbeddedNoise
64
- from .util.py_util import resolve_path
65
- from .util.registration_util import try_load_motion_est
66
- from .util.waveform_util import make_channel_index
79
+ from .util.preprocess_util import preprocess
80
+ from .util.py_util import databag, resolve_path
81
+ from .util.waveform_util import full_channel_index, make_channel_index
67
82
 
68
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