In mne 1.1.dev0 it looks like there's an issue with saving/reloading a CrossSpectralDensity object that has SSP vectors. After reloading from a hdf5 file, csd.projs is a list of dicts rather than a list of Projectors. Using that with e.g. mne.beamformer.make_dics would return the TypeError: All entries in projs list must be Projection instances, but projs[0] is type <class 'dict'>
As you can see, the original csd.projs is an mne.io.proj.Projection, while after reloading it is a dict. It's easy enough to convert this dict back to an Projection via
In mne 1.1.dev0 it looks like there's an issue with saving/reloading a CrossSpectralDensity object that has SSP vectors. After reloading from a hdf5 file, csd.projs is a list of dicts rather than a list of Projectors. Using that with e.g.
mne.beamformer.make_dics
would return the TypeError: All entries in projs list must be Projection instances, but projs[0] is type <class 'dict'>For example using the sample data:
As you can see, the original csd.projs is an mne.io.proj.Projection, while after reloading it is a dict. It's easy enough to convert this dict back to an Projection via
but this introduces more opportunities for things to go wrong.
And maybe an issue for a separate... issue, there is also a problem saving/loading hdf5 files when the filename is a pathlib.Path object. For example:
Will get you the message 'PosixPath' object has no attribute 'endswith', which is coming from this bit in
_import_h5io_funcs
:The easy workaround is to load the file using
csd_test = mne.time_frequency.read_csd(str(fname_csd))
but this probably defeats the purpose of Path.