Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZETA method to replace PSTH #169

Open
KatharineShapcott opened this issue Dec 10, 2021 · 6 comments
Open

ZETA method to replace PSTH #169

KatharineShapcott opened this issue Dec 10, 2021 · 6 comments
Assignees
Labels
Feature Request A concrete request (as detailed as possible) to either add or change functionality.

Comments

@KatharineShapcott
Copy link
Contributor

As far as I know doesn't have a PSTH method yet for spike events. My suggestion is not to bother and implement this cool looking method called Zeta IFR instead: https://elifesciences.org/articles/71969

Here's the kind of sales pitch figure from the paper comparing the two, as you can see it's a pretty simple method but would give nice statistics about responsivity of any event like data:
elife-71969-fig1-v3

There's no assumptions about the distribution of the underlying data and no need to pick bin sizes or any other parameters.

They do have python code (https://github.com/JorritMontijn/zetapy/blob/master/main.py) but it's not up to date and is literally a line by line translation of the matlab code (https://github.com/JorritMontijn/ZETA/blob/master/getZeta.m).

I would be happy to help implement this because I think it will be a super helpful first pass analysis for our data. Do you think it's a good fit for Syncopy?

@KatharineShapcott KatharineShapcott added the Feature Request A concrete request (as detailed as possible) to either add or change functionality. label Dec 10, 2021
@tensionhead
Copy link
Contributor

Without having much expert knowledge about the analysis problems you face, the ZETA procedure itself looks sufficiently novel, useful and robust to me. I wonder what is the connection to the KS-Test, which also is parameter free and works on the cumulative distributions as well? But in any case from my side, please go ahead @KatharineShapcott !
As we don't actually have started with the time-lock submodul of SyNCoPy yet, you could probably best provide a backend script, like we already have for example for the superlet method: superlet.py. So you could work with pure numpy/scipy/... and we can take care of the integration into SyNCoPy when building the time-lock submodule. Or what do you think @pantaray ?

@pantaray
Copy link
Member

Good idea @tensionhead Sounds like a plan. Thank you for bringing this up, @KatharineShapcott !

@KatharineShapcott KatharineShapcott self-assigned this Dec 13, 2021
@KatharineShapcott
Copy link
Contributor Author

So you could work with pure numpy/scipy/... and we can take care of the integration into SyNCoPy when building the time-lock submodule.

Okay great thanks. That makes it easy, I'll try and write something, run a few tests and let you know if I still think it's suitable.

I wonder what is the connection to the KS-Test, which also is parameter free and works on the cumulative distributions as well?

They go into this in the methods, as far as I understood their jittering method seems to create a better null distribution https://elifesciences.org/articles/71969/figures#fig3s3

@tensionhead tensionhead added this to the timelockanalysis milestone Dec 13, 2021
@tensionhead
Copy link
Contributor

tensionhead commented Dec 13, 2021

Ok great, we'll merge the latest submodule coherence very very soon (hopefully tmrw) into our dev branch, then we'll create a dedicated timelockanalysis branch where you then could directly commit into. I will update this comment/ping you once we are there!

@pantaray pantaray added this to To do in Syncopy 2022: Release 1 via automation Jan 4, 2022
@tensionhead
Copy link
Contributor

Ok @KatharineShapcott , with quite some delay we got everything in place.. I just created a new timelockanalysis branch!

@dfsp-spirit
Copy link
Collaborator

@KatharineShapcott Is this still relevant to you, and if so, do you still want to provide the core scipy/numpy code, as discussed above?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request A concrete request (as detailed as possible) to either add or change functionality.
Projects
No open projects
Development

No branches or pull requests

4 participants