U
    f»{j¬  ã                   @   s\   d dl mZ d dlZddlmZmZ ddlmZmZm	Z	 ddl
mZ eddd
œdd„ƒZdS )é    Né   )ÚverboseÚ_check_optioné   )Ú	_get_pathÚ_do_path_updateÚ_download_mne_dataset)ÚMNE_DATASETSÚevokedFT)r   c                C   sì   t d| dƒ | dkr&td }d|d< ntd }d|d< |d }|d }t|||d	�}t ||¡}t |d
d¡}	| dko–t |	¡o–tdd„ t |	¡D ƒƒ}
| dko°t t |d¡¡}|
s¾|rÐ|sÐt	||||ƒ |S t
|d d|||dd�}|S )aœ  Get path to local copy of the high frequency SEF dataset.

    Gets a local copy of the high frequency SEF MEG dataset
    :footcite:`NurminenEtAl2017`.

    Parameters
    ----------
    dataset : 'evoked' | 'raw'
        Whether to get the main dataset (evoked, structural and the rest) or
        the separate dataset containing raw MEG data only.
    path : None | str
        Where to look for the HF-SEF data storing location.
        If None, the environment variable or config parameter
        ``MNE_DATASETS_HF_SEF_PATH`` is used. If it doesn't exist, the
        "~/mne_data" directory is used. If the HF-SEF dataset
        is not found under the given path, the data
        will be automatically downloaded to the specified folder.
    force_update : bool
        Force update of the dataset even if a local copy exists.
    update_path : bool | None
        If True, set the MNE_DATASETS_HF_SEF_PATH in mne-python
        config to the given path. If None, the user is prompted.
    %(verbose)s

    Returns
    -------
    path : str
        Local path to the directory where the HF-SEF data is stored.

    References
    ----------
    .. footbibliography::
    Údataset)r
   Úrawr   Z
hf_sef_rawZdataset_nameZhf_sef_evokedÚ
config_keyÚfolder_name)ÚpathÚkeyÚnameZMEGZ	subject_ac                 s   s   | ]}d |kV  qdS )r   N© )Ú.0Úfilenamer   r   úY/var/www/html/bwave/python/venv/lib/python3.8/site-packages/mne/datasets/hf_sef/hf_sef.pyÚ	<genexpr>A   s     zdata_path.<locals>.<genexpr>r
   ZsubjectsZuntarT)r   Ú	processorr   Úforce_updateÚupdate_pathÚdownload)r   r	   r   ÚopÚjoinÚisdirÚanyÚosÚlistdirr   r   )r   r   r   r   r   Z	data_dictr   r   Z
final_pathZmegdirZhas_rawZ
has_evokedÚ	data_pathr   r   r   r!      s<    $
ÿÿÿ  ýr!   )r
   NFT)Úos.pathr   r   r   Úutilsr   r   r   r   r   Úconfigr	   r!   r   r   r   r   Ú<module>   s     ÿÿ