MCPcopy Index your code
hub / github.com/mne-tools/mne-python / export_raw

Function export_raw

mne/export/_export.py:12–93  ·  view source on GitHub ↗

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,
)

Source from the content-addressed store, hash-verified

10
11@verbose
12def 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

Callers 1

exportMethod · 0.85

Calls 6

_check_fnameFunction · 0.90
warnFunction · 0.90
_export_raw_bdfFunction · 0.90
_export_rawFunction · 0.90
_export_raw_edfFunction · 0.90
_infer_check_export_fmtFunction · 0.85

Tested by

no test coverage detected