physnoise: Generate physiological noise

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

View source: R/physnoise.R

Description

Generates a physiological noise dataset with specified dimensions and standard deviation. The physiological noise is defined as noise caused by heart beat and respiratory rate.

Usage

1
2
physnoise(dim, nscan, TR, sigma, freq.heart = 1.17, 
	freq.resp = 0.2, template, verbose = TRUE)

Arguments

dim

A vector specifying the dimensions of the image.

nscan

The number of scans in the dataset.

TR

The repetition time in seconds.

sigma

The standard deviation of the noise.

freq.heart

The frequency in Hz of the heart beat.

freq.resp

The frequency in Hz of the respiratory rate.

template

An array representing the anatomical structure or mask with dimensions equal to dim.

verbose

Logical indicating if warnings should be printed.

Details

The function generates physiological noise. Heart beat and respiratory rate are defined as sine and cosine functions with specified frequencies. Additional Gaussian noise creates variability over voxels. The result is a noise dataset with specified dimensions and desired standard deviation.

Value

An array containing the noise with dimensions specified in dim and nscan.

Author(s)

M. Welvaert

See Also

temporalnoise, lowfreqdrift, systemnoise, tasknoise, spatialnoise

Examples

1
2
3
4
5
d <- c(10,10,10)
sigma <- 5
nscan <- 100
TR <- 2
out <- physnoise(d, nscan, TR, sigma, verbose=FALSE)

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