spikeinterface icon indicating copy to clipboard operation
spikeinterface copied to clipboard

Dredge lfp and dredge ap

Open samuelgarcia opened this issue 1 year ago • 2 comments

@cwindolf

Here the initial port of dredgelib into spikeinterface. This come with some small refactoring in spikeinterface and folder reorganization.

We should be able to do:

estimate_motion(method="drege_lfp") estimate_motion(method="drege_ap")

The come a a quite big refactoring to split methods and into files and many variable names change to align with dredge in spikeinterface and sometimes the align dredge with spikeinterface. The entire dredge is in one unique file dredge.py

samuelgarcia avatar Jun 21 '24 19:06 samuelgarcia

@cwindolf the last commit is a quite big refactoring in estimate motion to integrate the 'dredge_lfp' method. Maybe you would like have a look.

samuelgarcia avatar Jun 26 '24 12:06 samuelgarcia

@cwindolf I could not resists in porting also the dredge_ap and make a class. This is not working yet because we need to fix the histogram2d that mimic all imrovements.

samuelgarcia avatar Jun 26 '24 20:06 samuelgarcia

@samuelgarcia @yger

  • I cleaned up the docs, looking good now :)

  • There was a failing test due to this: the test recording probe is too short for the default win size and margin, resulting in num_windows = -1. I extended the get_spatial_windows to deal with this and switching to rigid motion in case window sizes/margins are too large for the probe depth. This produces a warning.

  • I changed contact_depth to contact_depths, since it's more accurate!

alejoe91 avatar Jul 12 '24 10:07 alejoe91

One last fix needed to use numpy.broadcast_to instead of torch.broadcast_to if conv_engine is numpy

alejoe91 avatar Jul 12 '24 10:07 alejoe91

In last commit: propagate API changes and docs

alejoe91 avatar Jul 12 '24 11:07 alejoe91