tasknoise: Generate task-related noise

View source: R/tasknoise.R

tasknoiseR Documentation

Generate task-related noise

Description

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

Usage

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

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)


neuRosim documentation built on Oct. 18, 2023, 5:09 p.m.