runSim: Runs simulations

Description Usage Arguments Value

View source: R/master.R

Description

Uses the mask variable to create length(rs) spheres of size rs with values equal to betas within the mask. A random voxel is chosen within the mask and a sphere is placed at that location. The spheres are masked by the mask image so that no parameter values exist outside the mask.

Usage

1
2
3
4
5
6
7
8
9
runSim(
  simdirs,
  simfunc,
  simfuncArgs = NULL,
  mask = NULL,
  method = c("bootstrap", "synthetic"),
  ncores = parallel::detectCores(),
  ...
)

Arguments

simdirs

Vector of simulation directories created by simSetup.

simfunc

Function to evaluate on the simulated data.

simfuncArgs

List of arguments passed to simfunc.

mask

mask image argument passed to genSimData. Only required for genSimData function if betaimg is not NULL or if method='synthetic'

method

method argument to generate sample data in genSimData. Data can be generated by bootstrapping or synthetically.

ncores

Number of cores to use.

...

Arguments passed to pbmclapply

Value

Returns the parameter image after writing it to file.path(outdir, 'signal.nii.gz').


simonvandekar/NIsim documentation built on Oct. 12, 2020, 5:06 p.m.