OdourResponseFromSpikes: Produce table of spiking responses (optionally subtracting...

Description Usage Arguments Value Author(s) See Also Examples

Description

Details: If baseline window is of different duration to response window the baseline count is normalised to estimate the number of spikes that would have occurred during the response window. ie if you have a 1s response window and a 5s baseline window and you get 10 spikes in the response period and 5 spikes in the baseline period, the response will be returned as 10-5/5 = 9 spikes.

Usage

1
2
OdourResponseFromSpikes(spiketimes, responseWindow,
  baselineWindow = NULL, freq = FALSE)

Arguments

spiketimes

list of spiketimes collected by CollectSpikesFromSweeps

responseWindow

vector of start and end time of odour response (in ms)

baselineWindow

vector of start and end time of baseline period (in ms)

freq

Calculate Spike rate in Hz rather than number of spikes per response window

Value

dataframe with a column for each odour and row for each sweep

Author(s)

jefferis

See Also

Other OdourResponse: PlotOdourResponseFromSpikes

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
spikes=CollectSpikesFromSweeps(
  system.file('igor','spikes','nm20110914c4',package='gphys'),
  subdir='BLOCKI',sweeps=0:4)
od=OdourResponseFromSpikes(spikes,response=c(2200,2700),baseline=c(0,2000))
summary(od)
apply(od,2,function(x) c(mean=mean(x),sd=sd(x)))

# show baseline response frequency only (by treating that as response)
od2=OdourResponseFromSpikes(spikes,response=c(0,2000),freq=TRUE)
summary(od2)

jefferis/gphys documentation built on June 5, 2019, 9:45 p.m.