sim.lif: Simulate optogenetic stimulation on a leaky-integrate-fire...

Description Usage Arguments Value Examples

Description

Simulate various kinds of neural measures (e.g. membrane potentials and spikes) from a LIF neuron.

Usage

1
sim.lif(n, I, C, R, Vth = 1, V0 = 0, bin = 5, dt = 0.05)

Arguments

n

Number of time bins. The total time is n times bin.

I

Input stimulus vector of length n.

C

Membrane capacitance of the simulated neuron.

R

Membrane resistance of the simulated neuron.

Vth

Membrane potential threshold for spiking.

V0

Membrane potential reset value after spiking.

bin

Time length for each time bin. Default 5 millisecond.

dt

Time length for each simulation step. Default 0.05 millisecond.

Value

a list of simulated neural spikes, optogenetic light flashes, and simulation parameters.

Examples

1
2
3
n<- 500
set.seed(100)
re <- sim.lif(n, rbinom(n, 1, 0.14), 7, 3)

rluo/pro documentation built on May 27, 2019, 9:28 a.m.

Related to sim.lif in rluo/pro...