Export Raw to external formats. %(export_fmt_support_raw)s %(export_warning)s .. warning:: When exporting ``Raw`` with annotations, ``raw.info["meas_date"]`` must be the same as ``raw.annotations.orig_time``. This guarantees that the annotations are in the same
(
fname,
raw,
fmt="auto",
physical_range="auto",
add_ch_type=False,
*,
overwrite=False,
verbose=None,
)
| 10 | |
| 11 | @verbose |
| 12 | def export_raw( |
| 13 | fname, |
| 14 | raw, |
| 15 | fmt="auto", |
| 16 | physical_range="auto", |
| 17 | add_ch_type=False, |
| 18 | *, |
| 19 | overwrite=False, |
| 20 | verbose=None, |
| 21 | ): |
| 22 | """Export Raw to external formats. |
| 23 | |
| 24 | %(export_fmt_support_raw)s |
| 25 | |
| 26 | %(export_warning)s |
| 27 | |
| 28 | .. warning:: |
| 29 | When exporting ``Raw`` with annotations, ``raw.info["meas_date"]`` must be the |
| 30 | same as ``raw.annotations.orig_time``. This guarantees that the annotations are |
| 31 | in the same reference frame as the samples. When |
| 32 | :attr:`Raw.first_time <mne.io.Raw.first_time>` is not zero (e.g., after |
| 33 | cropping), the onsets are automatically corrected so that onsets are always |
| 34 | relative to the first sample. |
| 35 | |
| 36 | Parameters |
| 37 | ---------- |
| 38 | %(fname_export_params)s |
| 39 | raw : instance of Raw |
| 40 | The raw instance to export. |
| 41 | %(export_fmt_params_raw)s |
| 42 | %(physical_range_export_params)s |
| 43 | %(add_ch_type_export_params)s |
| 44 | %(overwrite)s |
| 45 | |
| 46 | .. versionadded:: 0.24.1 |
| 47 | %(verbose)s |
| 48 | |
| 49 | Notes |
| 50 | ----- |
| 51 | .. versionadded:: 0.24 |
| 52 | |
| 53 | %(export_warning_note_raw)s |
| 54 | %(export_eeglab_note)s |
| 55 | %(export_edf_note)s |
| 56 | """ |
| 57 | fname = str(_check_fname(fname, overwrite=overwrite)) |
| 58 | supported_export_formats = { # format : (extensions,) |
| 59 | "bdf": ("bdf",), |
| 60 | "brainvision": ( |
| 61 | "eeg", |
| 62 | "vmrk", |
| 63 | "vhdr", |
| 64 | ), |
| 65 | "edf": ("edf",), |
| 66 | "eeglab": ("set",), |
| 67 | } |
| 68 | fmt = _infer_check_export_fmt(fmt, fname, supported_export_formats) |
| 69 |
no test coverage detected