[Mne_analysis] problem with reading raw data

Denis A. Engemann denis-alexander.engemann at inria.fr
Mon Jun 17 17:48:30 EDT 2019
Search archives:

        External Email - Use Caution        

Hi Xiaoping,

I tried to read the file and reproduce your error.
In my experience this type of error might be due to corrupted files.
Can you try with another file or can you try copying over the same file once more from your server?

Best,
Denis

> On Jun 17, 2019, at 5:14 PM, Xiaoping Fang <xpfang4 at gmail.com> wrote:
> 
>         External Email - Use Caution        
> 
> 
> Hello,
> 
> I have trouble reading some of my raw data files. They seem pretty random -- two are empty room recordings from two different participants recorded at the end of the session, three are task files, while the other files are fine. The error is "file does not start with a file id tag". Below are the details. Could you help me with this? Thank you very much! 
> 
> Link to one of the data files: https://drive.google.com/open?id=1hwOH0Gh0KOqFpFl0-4HHlr6oZliROaL8  
> 
> Output:
> Opening raw data file EmptyRoom_raw.fif...
> 
> ---------------------------------------------------------------------------
> ValueError
>                                 Traceback (most recent call last)
> 
> <ipython-input-87-3e7740fb39a4> in <module>
>       6     fname_projs = "erm-proj.fif"
>       7     fname_erm_wproj = "EmptyRoom_wproj_raw.fif"
> ----> 8     raw_erm = mne.io.read_raw_fif(fname_erm, preload=True)
>       9     raw_erm.add_proj([],remove_existing=True)
>      10     raw_erm.info['bads'] = ['MEG0432','MEG2233','MEG2543']
> 
> 
> 
> ~/anaconda3/lib/python3.7/site-packages/mne/io/fiff/raw.py in read_raw_fif(fname, allow_maxshield, preload, verbose)
>     468
>      """
> 
>     469
>      return Raw(fname=fname, allow_maxshield=allow_maxshield,
> 
> --> 470
>                 preload=preload, verbose=verbose)
> 
> 
> </Users/xif20/anaconda3/lib/python3.7/site-packages/mne/externals/decorator.py:decorator-gen-160> in __init__(self, fname, allow_maxshield, preload, verbose)
> 
> 
> 
> ~/anaconda3/lib/python3.7/site-packages/mne/utils/_logging.py in wrapper(*args, **kwargs)
>      87             with use_log_level(verbose_level):
>      88                 return function(*args, **kwargs)
> ---> 89         return function(*args, **kwargs)
>      90
>      return FunctionMaker.create(
> 
>      91         function, 'return decfunc(%(signature)s)',
> 
> 
> 
> ~/anaconda3/lib/python3.7/site-packages/mne/io/fiff/raw.py in __init__(self, fname, allow_maxshield, preload, verbose)
>      83             raw, next_fname, buffer_size_sec = \
>      84
>                  self._read_raw_file(next_fname, allow_maxshield,
> 
> ---> 85
>                                      preload, do_check_fname)
> 
>      86             do_check_fname = False
>      87             raws.append(raw)
> 
> 
> 
> </Users/xif20/anaconda3/lib/python3.7/site-packages/mne/externals/decorator.py:decorator-gen-161> in _read_raw_file(self, fname, allow_maxshield, preload, do_check_fname, verbose)
> 
> 
> 
> ~/anaconda3/lib/python3.7/site-packages/mne/utils/_logging.py in wrapper(*args, **kwargs)
>      87             with use_log_level(verbose_level):
>      88                 return function(*args, **kwargs)
> ---> 89         return function(*args, **kwargs)
>      90
>      return FunctionMaker.create(
> 
>      91         function, 'return decfunc(%(signature)s)',
> 
> 
> 
> ~/anaconda3/lib/python3.7/site-packages/mne/io/fiff/raw.py in _read_raw_file(self, fname, allow_maxshield, preload, do_check_fname, verbose)
>     151             whole_file = True
>     152         fname_rep = _get_fname_rep(fname)
> --> 153         ff, tree, _ = fiff_open(fname, preload=whole_file)
>     154         with ff as fid:
>     155             #   Read the measurement info
> 
> 
> 
> </Users/xif20/anaconda3/lib/python3.7/site-packages/mne/externals/decorator.py:decorator-gen-6> in fiff_open(fname, preload, verbose)
> 
> 
> 
> ~/anaconda3/lib/python3.7/site-packages/mne/utils/_logging.py in wrapper(*args, **kwargs)
>      87             with use_log_level(verbose_level):
>      88                 return function(*args, **kwargs)
> ---> 89         return function(*args, **kwargs)
>      90
>      return FunctionMaker.create(
> 
>      91         function, 'return decfunc(%(signature)s)',
> 
> 
> 
> ~/anaconda3/lib/python3.7/site-packages/mne/io/open.py in fiff_open(fname, preload, verbose)
>     129     #   Check that this looks like a fif file
>     130     if tag.kind != FIFF.FIFF_FILE_ID:
> --> 131         raise ValueError('file does not start with a file id tag')
>     132
>  
> 
>     133     if tag.type != FIFF.FIFFT_ID_STRUCT:
> 
> 
> 
> ValueError: file does not start with a file id tag
> 
> 
> Best,
> Xiaoping
> 
> -- 
> Xiaoping Fang
> 
> Graduate Student - Psychology
> Learning Research and Development Center
> Center for Neural Basis of Cognition
> University of Pittsburgh
> https://sites.google.com/site/xpfang4
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis





More information about the Mne_analysis mailing list