Add channel attr - #5
Conversation
…ver frames for each channel
| neuron_raster = self.sparse_raster(bin_size) | ||
|
|
||
| # Aggregate by channel | ||
| if sparse.issparse(neuron_raster): |
There was a problem hiding this comment.
Won't it always be sparse since it comes straight from sparse_raster()?
| raise ValueError("lowcut must be smaller than highcut") | ||
| filter_type = "bandpass" | ||
| band = [lowcut, highcut] | ||
| Wn = [e / fs * 2 for e in band] |
There was a problem hiding this comment.
Why did you need to translate everything back to Python 3.9 syntax?
atspaeth
left a comment
There was a problem hiding this comment.
This looks really useful and if you want you can merge already, but I do recommend getting rid of the sparse option, or at least simplifying the issparse check logic.
|
Sorry, accidentally closed lol |
|
@atspaeth Most recent push addressed your comments and simplifies the sparsity checking code. Lmk wyt! Also CIs are failing suddenly due to Numpy version error, can constrain this to |
|
I think your fixes look good, and the unit tests pass locally. Don't add that version guard though. The CI issue is something weirder. It's running Python 3.11 instead of the intended version, and it claims to be installing numpy 2.3.5 but then fails to parse 2.4.0rc1 (which is a prerelease ofc and shouldn't be installable without |
|
Good to merge? |
9a69a16 to
a7f20ae
Compare
|
I'm going to try to fix that CI issue in a separate branch |
Added a few functions to derive a channel-level raster (instead of neurons x time) and a frame-level raster (instead of ms). This can serve as a nice training mask that is derived from existing data, so it backwards compatible with previous spike data verisons.