micromed_io.to_mne.create_mne_from_micromed_recording#
- micromed_io.to_mne.create_mne_from_micromed_recording(recording_file: str | Path, sub_channels: List[str] | None = None, start_time: float = 0.0, stop_time: float | None = None, ch_types: List[str] | str = 'eeg') RawArray #
Create a mne Raw instance from a Micromed recording.
- Parameters:
- recording_fileUnion[str, Path]
The micromed recording file.
- sub_channelsList[str], optional
The channels to pick from the recording. If None, all channels are picked.
- start_timefloat, optional
The start time (in seconds) of the recording data to include in the mne Raw instance. Defaults to 0.0.
- stop_timefloat, optional
The stop time (in seconds) of the recording data to include in the mne Raw instance. If None, all data until the end of the recording is included. Defaults to None.
- ch_typesUnion[List[str], str], optional
The list of channel types. Types must be in [‘grad’, ‘mag’, ‘ref_meg’, ‘eeg’, ‘seeg’, ‘dbs’, ‘ecog’, ‘eog’, ‘emg’, ‘ecg’, ‘resp’, ‘bio’, ‘misc’, ‘stim’, ‘exci’, ‘syst’, ‘ias’, ‘gof’, ‘dipole’, ‘chpi’, ‘fnirs_cw_amplitude’, ‘fnirs_fd_ac_amplitude’, ‘fnirs_fd_phase’, ‘fnirs_od’, ‘hbo’, ‘hbr’, ‘csd’].
- Returns:
- mne.io.RawArray
A mne Raw instance containing the requested channels.
Notes
Data is returned in volts.
Some info are hardcoded, such as:
device_info type: Micromed
device_info site: Unknown
Please update the code if needed.
Examples
>>> from micromed_io.to_mne import create_mne_from_micromed_recording >>> mne_raw = create_mne_from_micromed_recording("path/to/file.TRC", start_time=10.0, stop_time=20.0)