Measure: Measurement methods

MeasureR Documentation

Measurement methods

Description

[Experimental]
These methods perform measurements on PRecording and PCollection objects on a per-sweep basis. They are designed to efficiently collect data e.g. for time series, dose-response or point statistics

Usage

MeasureSweeps(
  X,
  Trace,
  Sweeps = GetSweepNames(X),
  Time,
  label,
  FUN = mean,
  ReturnPObject = T
)

MeasureStimResp(X, StimTrace = "V-mon", RespTrace = "I-mon", Time, FUN = mean)

Arguments

X

A PRecording or PCollection object

Trace

The name of the trace to perform measurements on

Sweeps

List of sweeps to keep

Time

either a range of time points to keep or two particular time points

label

A label (if Sweeps has length 1) or a prefix. Will be used to name the columns in the results table

FUN

function to apply on sweep. Can be anything that woks with apply(). But will be usually be mean(), max(), min(), or a basic operator like - .

ReturnPObject

whether to return a PRecording/PCollection or a matrix.

StimTrace

The name of the trace that contains the stimulus

RespTrace

The name of the trace that contains the response

Value

MeasureSweeps: A PRecording or PCollection, respectiveley with an updated MetaData Slot or, if ReturnPObject=F a matrix.

MeasureStimResp: A a data.frame with five columns: "Name","Group","Stimulus","StimTimes","Response"

Functions

  • MeasureSweeps: This function performs the actual measurements. It subsets an object by Trace and Sweeps. If FUN is a binary operator, then applies it to the exact time points given in Time, else, it applies it to the range indicated by Time.

  • MeasureStimResp: This is a convenience method providing easy to process data.frames for generation of time series and dose-response curves

Examples

data("PRecording")
# Get values needed for a Stimulus-Response-Curve. Apply function (FUN) mean to
# the interval 0.8s -1s (end of stimulus) from each sweep of V-mon (StimTrace)
# and I-mon (RespTrace)
MeasureStimResp(SampleData,
                StimTrace = "V-mon",
                RespTrace = "I-mon",
                Time = c(0.8,1),
                FUN = mean)

moritzlindner/PatchR documentation built on April 30, 2024, 1:40 a.m.