tasknoise: Generate task-related noise

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/tasknoise.R

Description

Generates a Gaussian noise dataset with specified dimensions and standard deviation only when a task is performed or activation is present.

Usage

1
tasknoise(act.image, sigma, type=c("gaussian","rician"), vee=1)

Arguments

act.image

Array defining where and when activation is present.

sigma

Standard deviation of the noise.

type

Distribution of task-related noise. Default is gaussian.

vee

If type=="rician", the non-centrality parameter of the distribution.

Details

The function generates random Gaussian noise for those voxels in the dataset that show activation. The result is a noise array with specified dimensions and desired standard deviation.

Value

An array containing the noise.

Author(s)

M. Welvaert

See Also

temporalnoise, lowfreqdrift, physnoise, systemnoise, spatialnoise

Examples

1
2
3
4
5
6
d <- c(10,10,10)
sigma <- 5
nscan <- 100
act <- array(rep(0, prod(d)*nscan), dim=c(d,nscan))
act[2:4,2:4,2:4,c(20:30,40:50,60:70)] <- 1
out <- tasknoise(act, sigma)

NeuroStat/neuRosim documentation built on Sept. 14, 2019, 10:37 a.m.