sovabids.datasets#

Module with dataset utilities.

Module Contents#

Functions#

lemon_prepare()

Download and prepare a few files of the LEMON dataset.

lemon_bidscoin_prepare(src_path)

Download and prepare a few files of the LEMON dataset to be used with BIDSCOIN.

make_dummy_dataset(EXAMPLE[, PATTERN, DATASET, NSUBS, ...])

Create a dummy dataset given some parameters.

get_dummy_raw([NCHANNELS, SFREQ, STOP, NUMEVENTS])

Create a dummy MNE Raw file given some parameters.

save_dummy_vhdr(fpath[, dummy_args])

Save a dummy vhdr file.

save_dummy_cnt(fpath)

Save a dummy cnt file.

replace_brainvision_filename(fpath, newname)

sovabids.datasets.lemon_prepare()[source]#

Download and prepare a few files of the LEMON dataset.

Notes

See the LEMON dataset .

sovabids.datasets.lemon_bidscoin_prepare(src_path)[source]#

Download and prepare a few files of the LEMON dataset to be used with BIDSCOIN.

Parameters:

src_path (str) – The path where the BIDSCOIN-ready LEMON files will be

See also

datasets.lemon_prepare

sovabids.datasets.make_dummy_dataset(EXAMPLE, PATTERN='T%task%/S%session%/sub%subject%_%acquisition%_%run%', DATASET='DUMMY', NSUBS=2, NSESSIONS=2, NTASKS=2, NACQS=2, NRUNS=2, PREFIXES={'subject': 'SU', 'session': 'SE', 'task': 'TA', 'acquisition': 'AC', 'run': 'RU'}, ROOT=None)[source]#

Create a dummy dataset given some parameters.

Parameters:
  • EXAMPLE (str,PathLike|list , required) – Path of the file to replicate as each file in the dummy dataset. If a list, it is assumed each item is a file. All of these items are replicated.

  • PATTERN (str, optional) – The pattern in placeholder notation using the following fields: %dataset%, %task%, %session%, %subject%, %run%, %acquisition%

  • DATASET (str, optional) – Name of the dataset.

  • NSUBS (int, optional) – Number of subjects.

  • NSESSIONS (int, optional) – Number of sessions.

  • NTASKS (int, optional) – Number of tasks.

  • NACQS (int, optional) – Number of acquisitions.

  • NRUNS (int, optional) – Number of runs.

  • PREFIXES (dict, optional) – Dictionary with the following keys:’subject’, ‘session’, ‘task’ and ‘acquisition’. The values are the corresponding prefix. RUN is not present because it has to be a number.

  • ROOT (str, optional) – Path where the files will be generated. If None, the _data subdir will be used.

sovabids.datasets.get_dummy_raw(NCHANNELS=5, SFREQ=200, STOP=10, NUMEVENTS=10)[source]#

Create a dummy MNE Raw file given some parameters.

Parameters:
  • NCHANNELS (int, optional) – Number of channels.

  • SFREQ (float, optional) – Sampling frequency of the data.

  • STOP (float, optional) – Time duration of the data in seconds.

  • NUMEVENTS (int, optional) – Number of events along the duration.

sovabids.datasets.save_dummy_vhdr(fpath, dummy_args={})[source]#

Save a dummy vhdr file.

Parameters:
  • fpath (str, required) – Path where to save the file.

  • kwargs (dict, optional) – Dictionary with the arguments of the get_dummy_raw function.

Returns:

  • List with the Paths of the desired vhdr file, if those were succesfully created,

  • None otherwise.

sovabids.datasets.save_dummy_cnt(fpath)[source]#

Save a dummy cnt file.

Parameters:

fpath (str, required) – Path where to save the file.

Returns:

  • Path of the desired file if the file was succesfully created,

  • None otherwise.

sovabids.datasets.replace_brainvision_filename(fpath, newname)[source]#