How do I save a.fif file as.h5

p1 = mne.read_evokeds(“noPain_ave1_ave.fif”)
f = h5py.File(“sub/”,“w”)
f.create_dataset(“noPain”, data=p1)
f.close()
print(“p1”, p1)


Thank you for your answer

1 Like

this is currently not supported. Only certain data containers in MNE can be saved in hdf5

For this we use h5io as in :

https://github.com/mne-tools/mne-python/blob/aa4118655e70b57d99262aad70d4fe38ea6ecd63/mne/time_frequency/tfr.py#L2484

Alex

1 Like