exp.fit.all.log.lin: exp.fit.all.log.lin

View source: R/exp.fit.all.log.lin.R

exp.fit.all.log.linR Documentation

exp.fit.all.log.lin

Description

Function takes a list of calcium imaging files by filenames in the current working directory (.mat files) and performs a simple exponential regression fit to normalize the deltaF/F signal. This function incorporates a linear to account for gradual rise in signal, which can alter the single exponential. Will output plots showing orignal and fitted values, as well as corrected values. If an object is assigned, this will be a vector of corrected values

Usage

## S3 method for class 'fit.all.log.lin'
exp(
  filename,
  skip.time,
  matlab = TRUE,
  show.plots = TRUE,
  linear = TRUE,
  nls = FALSE,
  startPulse = 29.5,
  endPulse = 60.5
)

Arguments

filename

filepaths of .mat files which have a "signal" and "time" field.

skip.time

number of seconds to skip at the beginning for the exponential fit. N=10 improves the fit.

nls

use nls to perform exponential fit: signal ~ y0 + exp((-time - T0) / tau)

Examples

data <- exp.fit.all.log.lin(files[1], skip.time = 10)


mikeod38/MF.matR documentation built on Feb. 3, 2023, 6:23 p.m.