Learn R Programming

nandb (version 0.2.1)

BestTau: Find the best tau for exponential filtering detrend.

Description

Say you have an image series that you wish to detrend before performing a brightness calculation. This function finds the best tau for an exponential filtering detrend. See vignette('Adaptive Detrending', package = 'nandb') for more details.

Usage

BestTau(arr3d, mst = NULL, tol = 1)

Arguments

arr3d

A 3-dimensional array (the image stack) where the \(n\)th slice is the \(n\)th image in the time series. To perform this on a file that has not yet been read in, set this argument to the path to that file (a string).

mst

Do you want to apply an intensity threshold prior to calculating brightness (via autothresholdr::mean_stack_thresh())? If so, set your thresholding method here.

tol

What size of error in the estimate of the ideal tau (aside from the error introduced by the random image simulation, see vignette('AdaptiveDetrend', package = 'nandb')) are you willing to tolerate? The default is 1.

Value

A number. The estimate of the ideal tau to use, with an attribute 'brightness.immobile' giving the brightness of the simulated (from all immobile particles) image series after detrending with this tau (this should be very close to 1).

Examples

Run this code
# NOT RUN {
img <- ReadImageData(system.file('extdata', '50.tif', package = 'nandb'))
BestTau(img, tol = 3)

# }

Run the code above in your browser using DataLab