bursts.modify_conductance: Transform the conductance states according to a user-defined...

Description Usage Arguments Value Examples

Description

Transform the conductance states according to a user-defined function of conductance level.

Usage

1

Arguments

bursts

the list of segments

fun

a function on conductance levels

Value

A modified copy of the original bursts

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
infile <- system.file("extdata", "example4.dwt", package = "scbursts")
dwells <- dwt.read(infile)
dwells_c <- risetime.correct_gaussian(Tr=35.0052278, dwells, units="us")
bursts <- bursts.defined_by_tcrit(dwells_c, 100, units="ms")

### Collapse into three subconductance states
fun <- function(amp) {
    if (amp < 0.3)
        return(0)
    else if (amp >= 0.3 && amp < 0.6)
        return(0.5)
    else
        return(1)
}

bursts_d <- bursts.modify_conductance(bursts, fun)

scbursts documentation built on July 6, 2019, 5:02 p.m.