.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "_auto_examples/plot_trc_to_fif.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr__auto_examples_plot_trc_to_fif.py: ============================== Convert TRC file to mne format ============================== Here we convert a trc file recorded with a Micromed system to fif, the common format used in mne framework. .. GENERATED FROM PYTHON SOURCE LINES 9-14 .. code-block:: Python # Author: Etienne de Montalivet # # License: BSD-3-Clause .. GENERATED FROM PYTHON SOURCE LINES 15-21 .. code-block:: Python from micromed_io.to_mne import create_mne_from_micromed_recording from pathlib import Path fname = Path("../data/sample.TRC") mne_raw = create_mne_from_micromed_recording(fname) .. rst-class:: sphx-glr-script-out .. code-block:: none WARNING:root:MKR channel(s) is not close to 50mV. If no trigger received, then data are corrupted. Creating RawArray with float64 data, n_channels=14, n_times=349632 Range : 0 ... 349631 = 0.000 ... 170.718 secs Ready. .. GENERATED FROM PYTHON SOURCE LINES 22-23 Info from trc file is parsed and stored in mne.Info .. GENERATED FROM PYTHON SOURCE LINES 23-24 .. code-block:: Python mne_raw.info .. raw:: html
General
Measurement date November 06, 2023 14:35:06 GMT
Experimenter Unknown
Participant Chb
Channels
Digitized points Not available
Good channels 14 EEG
Bad channels None
EOG channels Not available
ECG channels Not available
Data
Sampling frequency 2048.00 Hz
Highpass 0.00 Hz
Lowpass 1024.00 Hz


.. GENERATED FROM PYTHON SOURCE LINES 25-28 As you see, markers sent by serial connection to Micromed are parsed from the trc file and stored as mne.Annotations scalings: 7e-3 comes from Micromed +/- 3.2mV .. GENERATED FROM PYTHON SOURCE LINES 28-29 .. code-block:: Python mne_raw.plot(scalings=7e-3, duration=20, start=20) .. image-sg:: /_auto_examples/images/sphx_glr_plot_trc_to_fif_001.png :alt: plot trc to fif :srcset: /_auto_examples/images/sphx_glr_plot_trc_to_fif_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none Using matplotlib as 2D backend. .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 2.144 seconds) .. _sphx_glr_download__auto_examples_plot_trc_to_fif.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_trc_to_fif.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_trc_to_fif.py ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_