AllenInstitute / AllenInstitute/AllenSDK
Incorrect presentation and use of "process_" functions leads to incorrect latency values.
Nobody has claimed this yet.
- Dominant language
- Jupyter Notebook
- Stars
- 398
- Forks
- 163
- PR merge metrics
- No merged PRs in 30d
Description
The example seen at http://alleninstitute.github.io/AllenSDK/_static/examples/nb/cell_types.html#Computing-Electrophysiology-Features shows the user setting stim_start = 1.0 and passing it to the fx.process_instance("", v, i, t, stim_start, stim_duration, "") function as a parameter. In the nwb files, however, the SS and LS stimuli start at index 204000, which is actually 0.02 seconds after 1.0. The SDK software actually calculates latency not from the start of the stimulus, but from the start of the analysis window, which therefore makes calculations on the webpage, and in fact the parameter list, incorrect. This error can cause the feature extraction software to miss spikes associated with Short Squares if the analysis window is short, since 0.02 seconds is larger than the duration of the Short Square stimulus (0.003 seconds).
It may make sense that the parameters be changed to "analysis_start" and "analysis_duration" (which appears to be the actual use of the two parameters), an additional parameter be added to the parameter list ("stimulus_start"), and that the calculations having to do with timing in reference to stimulus start be corrected.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the cell_types.html example at the linked Computing-Electrophysiology-Features section and trace the fx.process_instance entry point. Compare the stim_start and analysis-window parameters with the stimulus indices in the NWB files; done means the parameter names, latency calculations, and short-square spike detection consistently use the intended timing reference.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jupyter-notebook
- Domain
- data
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100