DOI: 10.5522/04/25232962
title: Recording with a Neuropixels probe

description: These data were obtained by Nick Steinmetz (nick[dot]steinmetz@gmail.com), in the CortexLab at UCL, and were published in Jun JJ, Steinmetz, NA, Siegle, JH, Denman, DJ, Bauza, M, Barbarits, B, Lee, AK et al. Fully integrated silicon probes for high-density recording of neural activity. <i>Nature</i><i> </i>2017.A "Phase3" Neuropixels probe was inserted into the brain of an awake, head-fixed mouse for about an hour. This electrode array recorded 384 channels of neural data at 30 kHz and &lt;7 µV RMS noise levels. The sites are densely spaced in a "continuous tetrode"-like arrangement, so that the probe records from a 3.8 mm span of the brain.The probe recorded from visual cortex, hippocampus, and some parts of thalamus. Data was high-pass filtered at 300 Hz on-probe. After applying common average referencing, the data were spike-sorted automatically by Kilosort (software by M. Pachitariu; using the included <b>master_file.m</b>) and manually by N. Steinmetz using Phy (manual phase; software by C. Rossant). In total 242 well-isolated individual neurons were identified. Example raw data can be seen in <b>visctxRawExample.PNG</b>. The waveform and autocorrelogram of an example neuron can be seen in <b>vixctxNeuronExample.PNG.</b>In addition to neural data, a movie of the eye of the mouse was acquired at 100 Hz and a movie of the frontal aspect (face, forearms, anterior trunk) was recorded at 40 Hz. The mouse's forepaws rested on a wheel that could move left or right, and the movements of this wheel were recorded. Auditory and olfactory information was not recorded and the mouse was not guaranteed to be in silence or in an odor-free environment.The experiments that were runExperiment 1During the first phase of the recording, the mouse was shown visual stimuli (described below) on three monitors placed around the mouse at right angles to each other, covering about +/-135 degrees azimuth and +/-35 degrees elevation.Sparse noise stimuli for receptive field mapping 8 degree squares were displayed at random times for 1/6 of a second on each vertex of a 9x34 grid with 8 degree spacing covering the whole extent of the monitors. Background was grey and squares could be either white or black. The presentation consisted of three repeats of a single five-minute long pattern of squares.Experiment 2During the second phase of the recording, the monitors were turned off and the mouse was in complete or nearly-complete darkness.Loading the dataThe electrophysiology data is in a compressed file named <b>Hopkins_</b><b>20160722_g0_t0.imec.ap_CAR.</b><b>cbin</b> (29.6 GB). To decompress it, use mtscomp. This will require the associated metadata file, which has the same name, with extension ".ch" (120 KB). The result of the decompression must have the same name, with extension ".bin".The raw data (".bin" files) are binary files of type int16 and with 385 data rows (see params.py). In Matlab this can be read as follows:fn = 'rawDataSample.bin';fid = fopen(fn, 'r');dat = fread(fid, [385 Inf], '*int16');fclose(fid);chanMap = readNPY('channel_map.npy');dat = dat(chanMap+1,:);figure; imagesc(dat(:,1:30000));The preprocessed data is stored in a set of npy files. To load them in Python you can use numpy. To load them in Matlab, you can use the npy-matlab repository.You can view the data most easily with Phy. Please see this documentation for details about the meaning of the included files.To determine the physical location of each cluster, find the template number corresponding to that cluster by looking in spike_templates.npy, then get the template shape from templates.npy, find the peak channel, and get the position of that channel from channel_positions.npy. Alternatively, if you're working in Matlab you can use the function provided here to compute the depth of each spike, and then average the depth across spikes within a cluster.