MCPcopy
hub / github.com/mne-tools/mne-python / save

Method save

mne/io/base.py:1737–1892  ·  view source on GitHub ↗

Save raw data to file. Parameters ---------- fname : path-like File name of the new dataset. This has to be a new filename unless data have been preloaded. Filenames should end with ``raw.fif`` (common raw data), ``raw_sss.fif``

(
        self,
        fname,
        picks=None,
        tmin=0,
        tmax=None,
        buffer_size_sec=None,
        drop_small_buffer=False,
        proj=False,
        fmt="single",
        overwrite=False,
        split_size="2GB",
        split_naming="neuromag",
        verbose=None,
    )

Source from the content-addressed store, hash-verified

1735
1736 @verbose
1737 def save(
1738 self,
1739 fname,
1740 picks=None,
1741 tmin=0,
1742 tmax=None,
1743 buffer_size_sec=None,
1744 drop_small_buffer=False,
1745 proj=False,
1746 fmt="single",
1747 overwrite=False,
1748 split_size="2GB",
1749 split_naming="neuromag",
1750 verbose=None,
1751 ):
1752 """Save raw data to file.
1753
1754 Parameters
1755 ----------
1756 fname : path-like
1757 File name of the new dataset. This has to be a new filename
1758 unless data have been preloaded. Filenames should end with
1759 ``raw.fif`` (common raw data), ``raw_sss.fif``
1760 (Maxwell-filtered continuous data),
1761 ``raw_tsss.fif`` (temporally signal-space-separated data),
1762 ``_meg.fif`` (common MEG data), ``_eeg.fif`` (common EEG data),
1763 or ``_ieeg.fif`` (common intracranial EEG data). You may also
1764 append an additional ``.gz`` suffix to enable gzip compression.
1765 %(picks_all)s
1766 %(tmin_raw)s
1767 %(tmax_raw)s
1768 buffer_size_sec : float | None
1769 Size of data chunks in seconds. If None (default), the buffer
1770 size of the original file is used.
1771 drop_small_buffer : bool
1772 Drop or not the last buffer. It is required by maxfilter (SSS)
1773 that only accepts raw files with buffers of the same size.
1774 proj : bool
1775 If True the data is saved with the projections applied (active).
1776
1777 .. note:: If ``apply_proj()`` was used to apply the projections,
1778 the projectons will be active even if ``proj`` is False.
1779 fmt : 'single' | 'double' | 'int' | 'short'
1780 Format to use to save raw data. Valid options are 'double',
1781 'single', 'int', and 'short' for 64- or 32-bit float, or 32- or
1782 16-bit integers, respectively. It is **strongly** recommended to
1783 use 'single', as this is backward-compatible, and is standard for
1784 maintaining precision. Note that using 'short' or 'int' may result
1785 in loss of precision, complex data cannot be saved as 'short',
1786 and neither complex data types nor real data stored as 'double'
1787 can be loaded with the MNE command-line tools. See raw.orig_format
1788 to determine the format the original data were stored in.
1789 %(overwrite)s
1790 To overwrite original file (the same one that was loaded),
1791 data must be preloaded upon reading.
1792 split_size : str | int
1793 Large raw files are automatically split into multiple pieces. This
1794 parameter specifies the maximum size of each piece. If the

Callers 15

test_warnFunction · 0.45
test_acq_skipFunction · 0.45
test_concatFunction · 0.45
test_subject_infoFunction · 0.45
test_output_formatsFunction · 0.45
test_multiple_filesFunction · 0.45
test_split_filesFunction · 0.45
test_bids_split_filesFunction · 0.45
test_split_numbersFunction · 0.45
test_load_bad_channelsFunction · 0.45

Calls 13

_get_buffer_sizeMethod · 0.95
_check_fnameFunction · 0.85
check_fnameFunction · 0.85
_get_split_sizeFunction · 0.85
warnFunction · 0.85
setup_projFunction · 0.85
activate_projFunction · 0.85
_validate_typeFunction · 0.85
_check_optionFunction · 0.85
_RawFidWriterCfgClass · 0.85
_RawFidWriterClass · 0.85

Tested by 15

test_warnFunction · 0.36
test_acq_skipFunction · 0.36
test_concatFunction · 0.36
test_subject_infoFunction · 0.36
test_output_formatsFunction · 0.36
test_multiple_filesFunction · 0.36
test_split_filesFunction · 0.36
test_bids_split_filesFunction · 0.36
test_split_numbersFunction · 0.36
test_load_bad_channelsFunction · 0.36