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

apfrequency: Make it more robust #2250

Open
1 of 2 tasks
t-b opened this issue Sep 3, 2024 · 1 comment
Open
1 of 2 tasks

apfrequency: Make it more robust #2250

t-b opened this issue Sep 3, 2024 · 1 comment
Labels
bug Something isn't working SweepFormula

Comments

@t-b
Copy link
Collaborator

t-b commented Sep 3, 2024

The problem is that it is not robust to fluctuations around spike threshold.

  • User should be able to set FWHM of spikes and height above threshold

  • TJ will provide good and bad data

  • Copy what ipfx does (chat with Nathan)

@t-b t-b added bug Something isn't working SweepFormula labels Sep 3, 2024
@gouwens
Copy link

gouwens commented Sep 18, 2024

The basic spike detection procedure implemented in IPFX is:

  1. Identify putative spikes as places where the dV/dt equals or exceeds 20 mV/ms (dV/dt values are taken from a Bessel-filtered version of the voltage trace with a 10 kHz cutoff frequency)
  2. Find putative AP peaks (max Vm between those detected points)
  3. Find the maximum dV/dt between the initially detected points and the putative peaks, then define the putative spike threshold as the point were it reaches 5% of that max value
  4. Drop putative APs where any of the following occur:
    • threshold to peak is less than 2 mV
    • threshold-to-peak time greater than 2 ms
    • putative peak is below -30 mV
  5. Refine the spike thresholds by finding the point for each AP where the dV/dt is 5% of the average maximum dV/dt across all APs in the sweep (rather than its own specific max dV/dt as before)

That's the basic idea - there are some other checks/dealing with edge cases in the code (like trying to figure out if a voltage transient may be throwing off threshold/peak pairs, and that kind of thing), and there are some adjustments to the initial 20 mV/ms dV/dt detection threshold for short square sweeps where the initial passive rise in the membrane potential can exceed that value in some cells.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working SweepFormula
Projects
None yet
Development

No branches or pull requests

2 participants