This module conatins a function to produce a dataset which simulates a collection of 2D images This dataset is saved as a 3D image (each slice being a subject) and a 3D array
example of use: surrogate_2d_dataset(nbsubj=1,fid=”/tmp/toto.dat”,verbose=1)
todo: rewrite it as a class
Author : Bertrand Thirion, 2008-2009
Create surrogate (simulated) 2D activation data with spatial noise.
| Parameters: | nbsubj: integer, optionnal :
dimx: integer, optionnal :
dimy: integer :
sk: float, optionnal :
noise_level: float, optionnal :
pos: 2D ndarray of integers, optionnal :
ampli: 1D ndarray of floats, optionnal :
spatial_jitter: float, optionnal :
signal_jitter: float, optionnal :
width: float or ndarray, optionnal :
out_text_file: string or None, optionnal :
out_image_file: string or None, optionnal :
verbose: boolean, optionnal :
seed=False: int, optionnal :
|
|---|---|
| Returns: | dataset: 3D ndarray :
|
Create surrogate (simulated) 3D activation data with spatial noise.
| Parameters: | nbsubj: integer, optionnal :
shape=(20,20,20): tuple of integers, :
mask=None: brifti image instance, :
sk: float, optionnal :
noise_level: float, optionnal :
pos: 2D ndarray of integers, optionnal :
ampli: 1D ndarray of floats, optionnal :
spatial_jitter: float, optionnal :
signal_jitter: float, optionnal :
width: float or ndarray, optionnal :
out_text_file: string or None, optionnal :
out_image_file: string or None, optionnal :
verbose: boolean, optionnal :
seed=False: int, optionnal :
|
|---|---|
| Returns: | dataset: 3D ndarray :
|
Create surrogate (simulated) 3D activation data with spatial noise.
| Parameters: | shape=(20,20,20): tuple of integers, :
mask=None: brifti image instance, :
n_scans: int, optional, :
dmtx: arrau of shape(n_scans, n_rows), :
sk: float, optionnal :
noise_level: float, optionnal :
out_image_file: string or None, optionnal :
verbose: boolean, optionnal :
seed=False: int, optionnal :
|
|---|---|
| Returns: | dataset: ndarray of shape (shape[0], shape[1], shape[2], n_scans) :
|