bycycle-tools / bycycle

Cycle-by-cycle analysis of neural oscillations.

Home Page:https://bycycle-tools.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Move time-series actions to NDSP & add dependency?

TomDonoghue opened this issue · comments

commented

We've been talking a bit about making a consistent 'shared code world' across VoytekLab tools, as well as clean scoping of what each module does.

As a heuristic, this is the proposed outline:

  • FOOOF: operates on frequency representations
  • NDSP: operates on time series
  • ByCycle: operates on cycles

As is, ByCycle sorta of breaks this, by including a bunch of time-series operations, and this includes a lot of copied code, that is messy to maintain, and inconsistencies in scope (example - the best burst approach lives here, even though it's not, by itself, a cycle operation, and meaning that neurodsp/burst isn't the best place to do bursting from).

So, the proposal, if we want to follow this, is that general time-series function should be consolidated into NDSP, and ByCycle shouldn't have it's own copies, but rather have NDSP as a dependency, and use the same general functions from there.

I think this has benefits in terms of maintainability and clear scoping of projects, and I don't think there's any particular issue with having ByCycle depend on NDSP.

This would mean:

  • bycycle/filt: would be removed, and the same functions would be used from NDSP
  • bycycle/burst: the burst detection procedure here would be moved to NDSP, and then used from here.
  • bycycle/sim: would be removed, and simulating time series (including with cycle-by-cycle variation) would be considered a time-series operation, that lives in NDSP.

cc: @srcole for thoughts on this.

yup, that makes sense.

I think the original reason for having the copied code was that neurodsp was going through a lot of changes as I was developing bycycle ;)

now that they're more stable, yeah, it would totally be better to reduce duplicate code like you outline

commented

Done in #54