U
    f»{jã  ã                   @   s6   d Z ddlZddlZddlmZ dd„ Zej ¡  dS )a‚  Import BTi / 4D MagnesWH3600 data to fif file.

Notes
-----
1. Currently direct inclusion of reference channel weights
   is not supported. Please use \'mne_create_comp_data\' to include
   the weights or use the low level functions from this module to
   include them by yourself.
2. The informed guess for the 4D name is E31 for the ECG channel and
   E63, E63 for the EOG channels. Please check and adjust if those channels
   are present in your dataset but 'ECG 01' and 'EOG 01', 'EOG 02' don't
   appear in the channel names of the raw object.

Examples
--------
.. code-block:: console

     $ mne bti2fiff --pdf C,rfDC -o my_raw.fif

é    N)Úread_raw_btic               	   C   sT  ddl m}  | tƒ}|jdddddd� |jd	d
ddddd� |jdddddd� |jdddddd� |jddddddd� |jd d!d"d#d$d%d� |jd&d'd#d(d)d� |jd*d+d#d,d-d� | ¡ \}}|j}|d.kræ| ¡  t d/¡ |j	}|j
}|j}|j}|j}	|j}
|j d0¡}|dk�r(|d1 }t|||||	|
|d2�}| |¡ | ¡  d.S )3zRun command.r   )Úget_optparserz-pz--pdfÚ	pdf_fnamezInput data file nameÚFILE)ÚdestÚhelpÚmetavarz-cz--configÚconfig_fnamezInput config file nameÚconfig)r   r   r   Údefaultz--head_shapeÚhead_shape_fnamezHeadshape file nameZhs_filez-oz--out_fnameÚ	out_fnamezName of the resulting fiff fileZas_data_fname)r   r   r   z-rz--rotation_xÚ
rotation_xÚfloatz0Compensatory rotation about Neuromag x axis, degg       @)r   Útyper   r   z-Tz--translationÚtranslationÚstrzDefault translation, meter)g        g{®Gáz”?g)\�Âõ(¼?z--ecg_chÚecg_chz4D ECG channel nameZE31z--eog_chÚeog_chz4D EOG channel nameszE63,E64Né   ú,z_raw.fif)r   r	   r   r   r   r   r   )Zmne.commands.utilsr   Ú__file__Ú
add_optionÚ
parse_argsr   Ú
print_helpÚsysÚexitr	   r   r   r   r   r   Úsplitr   ÚsaveÚclose)r   ÚparserÚoptionsÚargsr   r	   r   r   r   r   r   r   Úraw© r$   úX/var/www/html/bwave/python/venv/lib/python3.8/site-packages/mne/commands/mne_bti2fiff.pyÚrun&   sv    
 ÿ
 þ þ
þþþ
þ
þ

  ý
r&   )Ú__doc__r   ZmneZmne.ior   r&   ÚutilsZrun_command_if_mainr$   r$   r$   r%   Ú<module>   s
   9