|
107 | 107 | "print(f'raw AP band sample for event at time {t_event}: {s_event}')\n", |
108 | 108 | "\n", |
109 | 109 | "# get the AP data surrounding samples\n", |
110 | | - "window_secs_ap = [-0.05, 0.05] # we'll look at 100ms before the event and 200ms after the event for AP\n", |
| 110 | + "window_secs_ap = [-0.05, 0.05] # we'll look at 50ms before and after the event for AP\n", |
111 | 111 | "first, last = (int(window_secs_ap[0] * sr_ap.fs) + s_event, int(window_secs_ap[1] * sr_ap.fs + s_event))\n", |
112 | 112 | "raw_ap = sr_ap[first:last, :-sr_ap.nsync].T\n", |
113 | 113 | "\n", |
114 | 114 | "# get the LF data surrounding samples\n", |
115 | | - "window_secs_ap = [-0.750, 0.750] # we'll look at 100ms before the event and 200ms after the event\n", |
116 | | - "sample_lf = s_event // 12 # NB: for neuropixel probes this is always 12\n", |
| 115 | + "window_secs_ap = [-0.750, 0.750] # we'll look at 750ms before and after the event because LF varies more slowly in time\n", |
| 116 | + "sample_lf = s_event // 12 # NB: for neuropixel probes this is always 12 because AP is sampled at 12x the frequency of LF\n", |
117 | 117 | "first, last = (int(window_secs_ap[0] * sr_lf.fs) + sample_lf, int(window_secs_ap[1] * sr_lf.fs + sample_lf))\n", |
118 | 118 | "raw_lf = sr_lf[first:last, :-sr_lf.nsync].T" |
119 | 119 | ] |
|
236 | 236 | "metadata": {}, |
237 | 237 | "outputs": [], |
238 | 238 | "source": [ |
239 | | - "from neurodsp.voltage import destripe\n", |
| 239 | + "from ibldsp.voltage import destripe\n", |
240 | 240 | "# Reminder : If not done before, remove first the sync channel from raw data\n", |
241 | 241 | "# Apply destriping algorithm to data\n", |
242 | 242 | "destriped = destripe(raw_ap, fs=sr_ap.fs)" |
|
445 | 445 | "source": [ |
446 | 446 | "## Useful modules\n", |
447 | 447 | "* [ibllib.io.spikeglx](https://int-brain-lab.github.io/ibl-neuropixel/_autosummary/spikeglx.html)\n", |
448 | | - "* [ibllib.voltage.dsp](https://int-brain-lab.github.io/ibl-neuropixel/_autosummary/neurodsp.voltage.html)\n", |
| 448 | + "* [ibllib.voltage.dsp](https://int-brain-lab.github.io/ibl-neuropixel/_autosummary/ibldsp.voltage.html)\n", |
449 | 449 | "* [brainbox.io.spikeglx.stream](https://int-brain-lab.github.io/iblenv/_autosummary/brainbox.io.spikeglx.html#brainbox.io.spikeglx.stream)\n", |
450 | 450 | "* [viewephys](https://github.com/oliche/viewephys) to visualise raw data snippets (Note: this package is not within `ibllib` but standalone)" |
451 | 451 | ] |
|
0 commit comments