Skip to content

data files

Nick Steinmetz edited this page Oct 8, 2019 · 14 revisions

Data format and general notes about files

Extraction

If you downloaded the files as one big zip file, you will extract that zip file to get "allData.tar", extract that tar file to get individual .tar files for each recording, and then extract each of these. It is convenient to do this last step using WinRAR in Windows by selecting all, right-clicking on one of them, and choosing "extract each to separate folder".

File naming

Files are named using the "ALF" naming convention, which you can read about in detail here. The main point is that each file contains a "property" of an "object", and the file name is objectName.propertyName.extension. The properties of a given object share the same number of n data elements (specifically, the same number of rows). So "spikes.times" and "spikes.clusters" give two properties of the "spikes" object, and each have one entry for each spike.

Files about timing

The only files with special content relate to timing: .times, .intervals, and .timestamps. These contain:

  • .times: a length-n vector of time values in seconds
  • .intervals: an (n x 2) array of start and end times in seconds
  • .timestamps: an (m x 2) array where the first column gives sample numbers or frame numbers at which timestamps are known, and the second column gives the timestamps of those samples. It is understood that time times of any unspecified samples should be linearly interpolated between those given. Thus the simplest such file, for an evenly sampled object, has m=2, and the first column is [1 n], and the second column is [firstSampleTime lastSampleTime].

File formats and how to load

The file formats are 'npy', 'tsv', or 'mj2'.

Npy refers to numpy files, which can be natively loaded in python, or loaded using "readNPY" from the npy-matlab repository in Matlab.

Tsv are tab-separated value text files with a header row, and can be read with any text file reader (like vim or notepad) or loaded with standard commands, for example in matlab: >> t = readtable('probes.rawFilename.tsv', 'FileType', 'text', 'Delimiter', '\t').

Mj2 are video files in the Motion JPEG 2000 codec. In matlab they can be read with VideoReader.

File contents

Here units are given in square brackets and file sizes in parentheses, e.g. [mm^2] (nFrames, 2) would be a property with two values for each of nFrames, and in units of millimeters squared.

Behavioral data

  • eye. Features extracted from the video of the right eye.
    • area.npy : [arb. units] (nFrames) The area of the pupil extracted with DeepLabCut. Note that it is relatively very small during the discrimination task and during the passive replay because the three screens are medium-grey at this time and black elsewhere - so the much brighter overall luminance levels lead to relatively constricted pupils.
    • blink.npy : [logical] (nFrames) Times when a blink was detected, to be excluded from analysis.
    • xyPos.npy : [arb. units] (nFrames,2) The 2D position of the center of the pupil in the video frame. This is not registered to degrees visual angle, but could be used to detect saccades or other changes in eye position.
    • timestamps.npy
  • face. Features extracted from the video of the frontal aspect of the subject, including the subject's face and forearms.
    • motionEnergy.npy : [arb. units] (nFrames) The integrated motion energy across the whole frame, i.e. sum( (thisFrame-lastFrame)^2 ). Some smoothing is applied before this operation.
    • timestamps.npy
  • lickPiezo. Voltage values from a thin-film piezo connected to the lick spout, so that values are proportional to deflection of the spout and licks can be detected as peaks of the signal.
    • raw.npy : [V] (nSamples)
    • timestamps.npy
  • licks. Extracted times of licks, from the lickPiezo signal.
    • times.npy (nLicks)
  • spontaneous. Intervals of sufficient duration when nothing else is going on (no task or stimulus presentation)
    • intervals.npy (nSpontaneousIntervals, 2)
  • wheel. The position reading of the rotary encoder attached to the rubber wheel that the mouse pushes left and right with his forelimbs.
    • position.npy : [encoder ticks] (nSamples) The wheel has radius 31 mm and 1440 ticks per revolution, so multiply by 2*pi*r/tpr=0.135 to convert to millimeters. Positive velocity (increasing numbers) correspond to clockwise turns (if looking at the wheel from behind the mouse), i.e. turns that are in the correct direction for stimuli presented to the left. Likewise negative velocity corresponds to right choices.
    • timestamps.npy
  • wheelMoves. Detected wheel movements
    • type.npy [enumerated type] (nDetectedMoves) : 0 for 'flinches' or otherwise unclassified movements, 1 for left/clockwise turns, 2 for right/counter-clockwise turns (where again "left" means "would be the correct direction for a stimulus presented on the left).
    • intervals.npy (nDetectedMoves, 2)

Visual discrimination task

  • trials.
    • feedbackType.npy :
    • feedback_times.npy :
    • goCue_times.npy :
    • included.npy :
    • intervals.npy :
    • repNum.npy :
    • response_choice.npy :
    • response_times.npy :
    • visualStim_contrastLeft.npy :
    • visualStim_contrastRight.npy :
    • visualStim_times.npy :

Receptive field mapping task

  • sparseNoise.
    • positions.npy :
    • times.npy :

Passive stimulus replay task

  • passiveBeeps.
    • times.npy :
  • passiveValveClick.
    • times.npy :
  • passiveVisual.
    • contrastLeft.npy :
    • contrastRight.npy :
    • times.npy :
  • passiveWhiteNoise. :
    • times.npy :

Neural data

  • channels.
    • brainLocation.tsv :
    • probe.npy :
    • rawRow.npy :
    • site.npy :
    • sitePositions.npy :
  • clusters.
    • _phy_annotation.npy :
    • depths.npy :
    • originalIDs.npy :
    • peakChannel.npy :
    • probes.npy :
    • templateWaveformChans.npy :
    • templateWaveforms.npy :
    • waveformDuration.npy :
  • probes.
    • description.tsv :
    • insertion.tsv :
    • rawFilename.tsv :
    • sitePositions.npy :
  • spikes.
    • amps.npy :
    • clusters.npy :
    • depths.npy :
    • times.npy :
Clone this wiki locally