mne.datasets.sleep_physionet.age.fetch_data¶
- mne.datasets.sleep_physionet.age.fetch_data(subjects, recording=(1, 2), path=None, force_update=False, update_path=None, base_url='https://physionet.org/physiobank/database/sleep-edfx/sleep-cassette/', on_missing='raise', verbose=None)[source]¶
Get paths to local copies of PhysioNet Polysomnography dataset files.
This will fetch data from the publicly available subjects from PhysioNet’s study of age effects on sleep in healthy subjects 12. This corresponds to a subset of 153 recordings from 37 males and 41 females that were 25-101 years old at the time of the recordings. There are two night recordings per subject except for subjects 13, 36 and 52 which have one record missing each due to missing recording hardware.
See more details in physionet website.
- Parameters
- subjects
list
ofint
The subjects to use. Can be in the range of 0-82 (inclusive), however the following subjects are not available: 39, 68, 69, 78 and 79.
- recording
list
ofint
The night recording indices. Valid values are : [1], [2], or [1, 2]. The following recordings are not available: recording 1 for subject 36 and 52, and recording 2 for subject 13.
- path
None
|str
Location of where to look for the PhysioNet data storing location. If None, the environment variable or config parameter
MNE_DATASETS_PHYSIONET_SLEEP_PATH
is used. If it doesn’t exist, the “~/mne_data” directory is used. If the Polysomnography dataset is not found under the given path, the data will be automatically downloaded to the specified folder.- force_updatebool
Force update of the dataset even if a local copy exists.
- update_pathbool |
None
If True, set the MNE_DATASETS_EEGBCI_PATH in mne-python config to the given path. If None, the user is prompted.
- base_url
str
The URL root.
- on_missing‘raise’ | ‘warn’ | ‘ignore’
What to do if one or several recordings are not available. Valid keys are ‘raise’ | ‘warn’ | ‘ignore’. Default is ‘error’. If on_missing is ‘warn’ it will proceed but warn, if ‘ignore’ it will proceed silently.
- verbosebool,
str
,int
, orNone
If not None, override default verbose level (see
mne.verbose()
and Logging documentation for more). If used, it should be passed as a keyword-argument only.
- subjects
- Returns
- paths
list
List of local data paths of the given type.
- paths
Notes
For example, one could do:
>>> from mne.datasets import sleep_physionet >>> sleep_physionet.age.fetch_data(subjects=[0])
This would download data for subject 0 if it isn’t there already.
References
- 1
M. S. Mourtazaev, B. Kemp, A. H. Zwinderman, and H. A. C. Kamphuisen. Age and gender affect different characteristics of slow waves in the sleep EEG. Sleep, 18(7):557–564, 1995. doi:10.1093/sleep/18.7.557.
- 2
Ary L. Goldberger, Luis A. N. Amaral, Leon Glass, Jeffrey M. Hausdorff, Plamen Ch. Ivanov, Roger G. Mark, Joseph E. Mietus, George B. Moody, Chung-Kang Peng, and H. Eugene Stanley. PhysioBank, PhysioToolkit, and PhysioNet: Components of a new research resource for complex physiologic signals. Circulation, 2000. doi:10.1161/01.CIR.101.23.e215.