[FieldTrip] ft_read_header didn't work on the matlab opened from terminal
胡益衡
yhhu2020 at ion.ac.cn
Fri Aug 30 10:06:04 CEST 2024
Dear Mikkel and Konstantinos
I tried to add 'fieldtrip/external/mne' to the path, and it came out new errors as below which happened in pretty low-level functions. The matlab was on Ubuntu 20.04 on work station in our lab.
>> hdr = ft_read_header('/data/meg/IPRM/rawdata/009/meg/IPRM_run01_raw_trans_ref_tsss.fif');
Unrecognized field name "FIFF_PROJ_ID".
Error in fiff_read_meas_info (line 152)
case FIFF.FIFF_PROJ_ID
Error in ft_read_header (line 1910)
info = fiff_read_meas_info(filename);
I downloaded the fieldtrip package from this work station and tried ft_read_header in my own computer which was Ubuntu 22.04. It was fine in both cases.
I guess maybe something happened to the matlab on our lab's work station. I am going to reboot the work station some day to check if it will be helpful.
Thanks
Yiheng
> -----原始邮件-----
> 发件人: "Mikkel C. Vinding" <mikkelcv at drcmr.dk>
> 发送时间: 2024-08-30 15:17:11 (星期五)
> 收件人: "FieldTrip discussion list" <fieldtrip at science.ru.nl>
> 抄送: 胡益衡 <yhhu2020 at ion.ac.cn>
> 主题: Re: [FieldTrip] ft_read_header didn't work on the matlab opened from terminal
>
> Dear Yiheng Hu
>
> See here:
> https://github.com/natmegsweden/NatMEG_Wiki/wiki/Undefined-function-'fiff_read_epochs'
>
> Best regards
> Mikkel
>
> On 2024-08-29 12:02, 胡益衡 via fieldtrip wrote:
> > Dear all,
> >
> > I suddenly found my ft_read_header function could not work and gave
> > errors as bellow if I opened the matlab from terminal.
> >
> > >> hdr = ft_read_header('hyh_raw_trans_ref_tsss.fif');
> > Transforming MEG channels according to the device to head transform
> > from the data
> > 306 MEG channel locations transformed
> > Error using ft_read_header
> > Undefined function 'fiff_read_epochs' for input arguments of type
> > 'char'.
> >
> > But ft_read_header works when I open matlab directly clicking the
> > desktop MATLAB icon. In both cases, I add fieldtrip folder to the path
> > and execute the ft_defaults [1] function before I run ft_read_header.
> >
> > Can someone tell me the reason?
> >
> > Thanks,
> >
> > Yiheng Hu
> >
> > Links:
> > ------
> > [1] https://www.fieldtriptoolbox.org/reference/ft_defaults
> > _______________________________________________
> > fieldtrip mailing list
> > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> > https://doi.org/10.1371/journal.pcbi.1002202
</yhhu2020 at ion.ac.cn></fieldtrip at science.ru.nl></mikkelcv at drcmr.dk>
More information about the fieldtrip
mailing list