Skip to content

Commit 1fba51d

Browse files
authored
Add better threshold characterization (#15)
* Add more info on threshold * Update np_usage.ipynb
1 parent 0987a0a commit 1fba51d

File tree

3 files changed

+30
-4
lines changed

3 files changed

+30
-4
lines changed

neuroplatform-docs/np_core/db_usage.ipynb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,12 @@
8484
"\n",
8585
"A **spike event** is logged whenever the voltage from an electrode crosses a threshold of six times the standard deviation of the noise.\n",
8686
"\n",
87+
"```{caution}\n",
88+
"By default, the threshold is **dynamic**, which means it is computed based on the standard deviation of the noise at a certain time interval.<br>\n",
89+
"During bursts or stimulation, this standard deviation may increase, which will overall lower the amount of events recorded.\n",
90+
"See [Variable threshold](np-core:variance-threshold) for more information.\n",
91+
"```\n",
92+
"\n",
8793
"You can query a list of spike events with the timestamp, the amplitude (maximum absolute voltage of the peak across 3ms around the spike) and the channel number using `get_spike_event`\n",
8894
"\n",
8995
"To avoid returning large amounts of data, keep the time window small.<br>\n",

neuroplatform-docs/np_core/faq.ipynb

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@
139139
"````{margin}\n",
140140
"```{seealso}\n",
141141
"[Stimulation does not elicit any response from the organoid](faq:low-response)\n",
142+
"[How are spike events obtained ? Why is the minimal inter-spike interval always 3ms ?](faq:spike-events)\n",
142143
"```\n",
143144
"````\n",
144145
"\n",
@@ -148,8 +149,7 @@
148149
"\n",
149150
"A spiking rate of up to 1500 per minute is still normal (especially in the presence of bursts), but an order of magnitude more would indicate an issue with the event threshold.\n",
150151
"\n",
151-
"For instance, during a burst event, the voltage will nearly always be above the threshold, which will result in an artificial event every 3ms during the burst. However, this will show as a single event in the database, not as multiple events.\n",
152-
"\n",
152+
"For instance, during a burst event, the voltage will nearly always be above the threshold, which will result in an artificial event every 3ms during the burst. However, the many spikes that occur will be merged under several events of 3ms duration.\n",
153153
"Feel free to ask if you have further doubts regarding the activity of a channel. \n",
154154
"\n",
155155
"```{tip}\n",
@@ -232,6 +232,24 @@
232232
"\n",
233233
"### Database and experiment tokens\n",
234234
"\n",
235+
"(faq:spike-events)=\n",
236+
"#### How are spike events obtained ? Why is the minimal inter-spike interval always 3ms ?\n",
237+
"\n",
238+
"````{margin}\n",
239+
"```{seealso}\n",
240+
"[How to differentiate between noise and activity?](faq:noise-vs-events)\n",
241+
"```\t\n",
242+
"````\n",
243+
"\n",
244+
"Events are recorded whenever the voltage crosses the event threshold of $6\\sigma$. This means that whenever the voltage crosses the threshold, an event is recorded for 3ms.\n",
245+
"As such, several spikes may be merged under several events, especially during bursts.\n",
246+
"\n",
247+
"```{caution}\n",
248+
"By default, the threshold is **dynamic**, which means it is computed based on the standard deviation of the noise at a certain time interval.<br>\n",
249+
"During bursts or stimulation, this standard deviation may increase, which will overall lower the amount of events recorded.<br>\n",
250+
"See [Variable threshold](np-core:variance-threshold) for more information.\n",
251+
"```\n",
252+
"\n",
235253
"#### I do not have an Experiment token, or it is no longer valid\n",
236254
"\n",
237255
"Please contact us.\n",

neuroplatform-docs/np_core/np_usage.ipynb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -606,10 +606,12 @@
606606
"\n",
607607
"You can set the threshold for spike events to be fixed, which means it will be constant throughout the experiment.\n",
608608
"\n",
609-
"As mentioned earlier, the threshold is six times the standard deviation of the noise. This is recomputed when the variance threshold is enabled.\n",
609+
"As mentioned earlier, the threshold is six times the standard deviation of the noise. This is recomputed when the variable threshold is enabled.\n",
610+
"\n",
611+
"During bursts or stimulation, this standard deviation may increase, which will overall lower the amount of events recorded.\n",
610612
"\n",
611613
"```{caution}\n",
612-
"**ALWAYS** set back the variance threshold to **enabled** after finishing your experiment.\n",
614+
"**ALWAYS** set back the variable threshold to **enabled** after finishing your experiment.\n",
613615
"```\n",
614616
"\n",
615617
"If you need to set a fixed threshold, for example to account for a drift in the noise or activity, you can use:"

0 commit comments

Comments
 (0)