Skip to content

VR post sorting

Sarah Tennant edited this page Jan 31, 2019 · 17 revisions

Introduction

parameters

Specific parameters need to be set for the vr analysis environment.

  • stop_threshold this is the value in which the animals speed has to drop below for a stop to be extracted (<0.7 cm/second)
  • movement_channel this is the pin on the DAQ which has the movement of the animal along the track : prm.set_movement_channel('100_ADC2.continuous')
  • first_trial_channel this is the first pin on the DAQ which has the trial type information : prm.set_first_trial_channel('100_ADC4.continuous')
  • second_trial_channel this is the first pin on the DAQ which has the trial type information : prm.set_second_trial_channel('100_ADC5.continuous')

Structure of dataframes

The spatial data frame contains processed data describing the position of the animal in the virtual reality. The columns are organized as follows:

processed_position_data (name of the df in the main code)

  • time_ms : arrays of time in seconds, synchronized with the ephys data
  • position_cm : arrays of x coordinates of position of animal in virtual track in cm, synchronized with the ephys data
  • trial_number : arrays of the current trial number, synchronized with the ephys data
  • trial_type : arrays of the current trial type (beaconed, non beaconed, probe), synchronized with the ephys data
  • velocity : instant velocity of animal (cm/s), synchronized with the ephys data
  • speed : speed of animal averaged over 200 ms (cm/s), synchronized with the ephys data
  • stops : whether an animal has stopped (0/1 : no/yes), synchronized with the ephys data
  • filtered_stops : stops within 1 cm of each other are removed
  • stop_times : array of times which the animal has stopped

spatial_firing (this is the name of the df in the main code)

[every row is cluster] [column is a different analysis]

  • session_id : name of main recording folder (example: M5_2018-03-06_15-34-44_of)
  • cluster_id : id of cluster within session (1 - number of clusters)
  • tetrode : id of tetrode within session (1 - 4)
  • primary_channel : channel where the event was detected on (1 - 4)
  • firing_times : array of all firing event times that belong to cluster from the vr (in sampling points)
  • x_position_cm : array of position in cm corresponding with firing event times
  • trial_numbers : array of trial numbers corresponding with firing event times
  • trial_types : array of trial types corresponding with firing event times
  • number_of_spikes : total number of spikes during session
  • mean_firing_rate :
  • isolation :
  • noise_overlap :
  • peak_snr :
  • random_snippets :
  • speed_per_200ms : array of speed corresponding with firing event times
  • beaconed_position_cm : array of position in cm corresponding with firing event times in beaconed trials
  • beaconed_trial_number : array of trial number corresponding with firing event times in beaconed trials
  • nonbeaconed_position_cm : array of position in cm corresponding with firing event times in non beaconed trials
  • nonbeaconed_trial_number : array of trial number corresponding with firing event times in non beaconed trials
  • probe_position_cm : array of x position cm corresponding with firing event times in non beaconed trials
  • probe_trial_number :
  • avg_spike_per_bin_b :
  • avg_spike_per_bin_nb :
  • avg_spike_per_bin_p :
  • b_spike_number :
  • nb_spike_number :

Output figures

plots per cluster (curated)

Firing properties of each cluster

(1) Waveforms - 50 example waveforms from the cluster are plotted (grey) for each channel on the tetrode on which the event was detected, with an average waveform overlaid (red). The x axis represents number of data samples (30k/sec), and the y axis shows change in voltage in mV.

m1_d27_2018-10-05_11-17-55_11_waveforms

(2) 2 autocorrelograms - the first shows time between -10 and 10 milliseconds, the second shows between -250 and 250.

m5_2018-03-06_15-34- m5_2018-03-06_15-34-44_of_4_autocorrelogram_250ms

(3) Spike histograms - plots number of spikes against sampling points in units of 1e7, and firing rate against speed of the animal in cm/s.

m5_2018-03-06_15-34-44_of_4_spike_histogram

Spatial firing properties of each cluster in the VR

(4) Spike rasters

m1_d27_2018-10-05_11-17-55_track_firing_cluster_26_all

(5) Spike rate vs location

m1_d27_2018-10-05_11-17-55rate_map_cluster_26

Behaviour plots

(6) Stop raster

stop_raster