c,rfDC format to FIF format

Dear MNE’s,
I am using mne python to draw the topology map of MEG data, but I have encountered a problem. The drawing function requires the data to be in FIF format, but the data I use is in c,rfDC format. I am wondering if there is any way to convert the format used to FIF format?
Thank you!

Hello @chuna2002 and welcome to the forum!

You can simply read the data with MNE. No need to convert to FIF first:

https://mne.tools/stable/auto_tutorials/io/10_reading_meg_data.html#d-neuroimaging-bti-data-dir

Best wishes,
Richard

Thanks for your reply!
I know there is a way to read the data in c,rfDC format,but this format cannot use the plot_topomap() and plot_asrrowmap() function which use the data in FIF format , so I would like to know if there’s a way to switch between these two forms.
ChuNa

Once data has been read by MNE, all functions should work with it. Please share your code and pinpoint exactly what is not working so we can get a better understanding of your problem. Please also share the output of

import mne
mne.sys_info()

Thanks!

import mne
pdf_fname = ('D:/A/104012/6-Wrkmem/4D/c,rfDC')
config_fname = ('D:/A/104012/6-Wrkmem/4D/config')
head_shape_fname = ('D:/A/104012/6-Wrkmem/4D/e,rfhp1.0Hz,COH')
sphere = mne.make_sphere_model(r0=(0., 0., 0.), head_radius=0.080)
t0 = 0.07  # peak of the response
raw = mne.io.read_raw_bti(pdf_fname, config_fname, head_shape_fname, convert=False, rename_channels=False, preload=True)
pos=raw.info
for i in range(287):
    if pos['ch_names'][i].startswith('A') is False:
        print(pos['ch_names'][i])
        raw.info['bads'].append(pos['ch_names'][i])
print(raw.info['bads'])
condition = 'TRIGGER'
evoked = mne.read_evokeds(pdf_fname, condition=condition, baseline=None)
times = np.arange(0.05, 0.151, 0.02)
evoked.plot_topomap(times, ch_type='mag')

You cannot read the raw data as evoked …

1 Like

Thanks!I have solved my problem. :smiley:

Great! What did you do?