:py:mod:`sovabids.datasets` =========================== .. py:module:: sovabids.datasets .. autoapi-nested-parse:: Module with dataset utilities. Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: sovabids.datasets.lemon_prepare sovabids.datasets.lemon_bidscoin_prepare sovabids.datasets.make_dummy_dataset sovabids.datasets.get_dummy_raw sovabids.datasets.save_dummy_vhdr sovabids.datasets.save_dummy_cnt sovabids.datasets.replace_brainvision_filename .. py:function:: lemon_prepare() Download and prepare a few files of the LEMON dataset. .. rubric:: Notes See the `LEMON dataset `_ . .. py:function:: lemon_bidscoin_prepare(src_path) Download and prepare a few files of the LEMON dataset to be used with BIDSCOIN. :param src_path: The path where the BIDSCOIN-ready LEMON files will be :type src_path: str .. seealso:: :obj:`datasets.lemon_prepare` .. py:function:: 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) Create a dummy dataset given some parameters. :param EXAMPLE: 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. :type EXAMPLE: str,PathLike|list , required :param PATTERN: The pattern in placeholder notation using the following fields: %dataset%, %task%, %session%, %subject%, %run%, %acquisition% :type PATTERN: str, optional :param DATASET: Name of the dataset. :type DATASET: str, optional :param NSUBS: Number of subjects. :type NSUBS: int, optional :param NSESSIONS: Number of sessions. :type NSESSIONS: int, optional :param NTASKS: Number of tasks. :type NTASKS: int, optional :param NACQS: Number of acquisitions. :type NACQS: int, optional :param NRUNS: Number of runs. :type NRUNS: int, optional :param PREFIXES: 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. :type PREFIXES: dict, optional :param ROOT: Path where the files will be generated. If None, the _data subdir will be used. :type ROOT: str, optional .. py:function:: get_dummy_raw(NCHANNELS=5, SFREQ=200, STOP=10, NUMEVENTS=10) Create a dummy MNE Raw file given some parameters. :param NCHANNELS: Number of channels. :type NCHANNELS: int, optional :param SFREQ: Sampling frequency of the data. :type SFREQ: float, optional :param STOP: Time duration of the data in seconds. :type STOP: float, optional :param NUMEVENTS: Number of events along the duration. :type NUMEVENTS: int, optional .. py:function:: save_dummy_vhdr(fpath, dummy_args={}) Save a dummy vhdr file. :param fpath: Path where to save the file. :type fpath: str, required :param kwargs: Dictionary with the arguments of the get_dummy_raw function. :type kwargs: dict, optional :returns: * *List with the Paths of the desired vhdr file, if those were succesfully created,* * *None otherwise.* .. py:function:: save_dummy_cnt(fpath) Save a dummy cnt file. :param fpath: Path where to save the file. :type fpath: str, required :returns: * *Path of the desired file if the file was succesfully created,* * *None otherwise.* .. py:function:: replace_brainvision_filename(fpath, newname)