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

Method save

mne/time_frequency/tfr.py:2665–2685  ·  view source on GitHub ↗

Save time-frequency data to disk (in HDF5 format). Parameters ---------- fname : path-like Path of file to save to, which should end with ``-tfr.h5`` or ``-tfr.hdf5``. %(overwrite)s %(verbose)s See Also -------- mne.time_f

(self, fname, *, overwrite=False, verbose=None)

Source from the content-addressed store, hash-verified

2663
2664 @verbose
2665 def save(self, fname, *, overwrite=False, verbose=None):
2666 """Save time-frequency data to disk (in HDF5 format).
2667
2668 Parameters
2669 ----------
2670 fname : path-like
2671 Path of file to save to, which should end with ``-tfr.h5`` or ``-tfr.hdf5``.
2672 %(overwrite)s
2673 %(verbose)s
2674
2675 See Also
2676 --------
2677 mne.time_frequency.read_tfrs
2678 """
2679 _, write_hdf5 = _import_h5io_funcs()
2680 check_fname(fname, "time-frequency object", (".h5", ".hdf5"))
2681 fname = _check_fname(fname, overwrite=overwrite, verbose=verbose)
2682 out = self.__getstate__()
2683 if "metadata" in out:
2684 out["metadata"] = _prepare_write_metadata(out["metadata"])
2685 write_hdf5(fname, out, overwrite=overwrite, title="mnepython", slash="replace")
2686
2687 @verbose
2688 def to_data_frame(

Callers 15

test_cropFunction · 0.45
test_io_annotationFunction · 0.45
test_io_annotation_txtFunction · 0.45
test_date_noneFunction · 0.45
test_filterFunction · 0.45
test_epochs_io_projFunction · 0.45
test_epochs_io_preloadFunction · 0.45

Calls 6

__getstate__Method · 0.95
_import_h5io_funcsFunction · 0.85
check_fnameFunction · 0.85
_check_fnameFunction · 0.85
_prepare_write_metadataFunction · 0.85
write_hdf5Function · 0.85

Tested by 15

test_cropFunction · 0.36
test_io_annotationFunction · 0.36
test_io_annotation_txtFunction · 0.36
test_date_noneFunction · 0.36
test_filterFunction · 0.36
test_epochs_io_projFunction · 0.36
test_epochs_io_preloadFunction · 0.36