Hi all,
I’m interested in working with the brain observatory neuropixel data. I followed this quickstart tutorial and started exploring the data.
Looking at single units spike times I noticed that in all sessions some units have consecutive spikes that are less than one millisecond from each other. I was wondering if this means that I have a mistake in the way I process the data.
Here is an example of my code:
import os
import numpy as np
import pandas as pd
from allensdk.brain_observatory.ecephys.ecephys_project_cache import EcephysProjectCache
session_id = 719161530
unit_id = 950951872
manifest_path = os.path.join('ecephys_cache_dir/', "manifest.json")
cache = EcephysProjectCache.from_warehouse(manifest=manifest_path)
session = cache.get_session_data(session_id)
presentationwise_spike_times = session.presentationwise_spike_times()
spike_times_df = pd.DataFrame(presentationwise_spike_times['unit_id']).reset_index()
spike_times = spike_times_df[spike_times_df['unit_id'] == unit_id]['spike_time'].to_numpy()
spike_times_diff = np.diff(spike_times)
print(f'unit {unit_id} in session {session_id} has {(spike_times_diff < 1e-3).sum()} spike pairs within 1ms')
Thanks,
Yoni