Error Using tSSS Following Brainstorm Update

Hello,

I am running into errors when applying tSSS to my MEG data collected with an Elekta/MEGIN system. I receive the following error (see attached) and am wondering if this could be due to a recent update in Brainstorm? Otherwise, everything has been held constant in my processing pipeline (where tSSS had previously worked) and my MNE and python versions are up to date. Please let me know how I may fix this issue.

Best regards,
Rachel

It is probably the update of MNE-Python that caused the problem, rather than the update of Brainstorm.

I updated Brainstorm to work with MNE-Python 1.0.3:
https://github.com/brainstorm-tools/brainstorm3/commit/8c886e24593692d89d0e322105ef11682888e7e1

I also updated the documentation for installing MNE-Python for Matlab:
https://neuroimage.usc.edu/brainstorm/MnePython

Please update Brainstorm and try again.

@Alexandre
Would there be a way to test that these two Matlab functions still work after MNE-Python updates?

And possibly some hints on keeping this tutorial page up-to-date?
https://neuroimage.usc.edu/brainstorm/MnePython

Example files:
channel.zip (1.2 MB)
data.zip (892.0 KB)

Example out_mne_channel:

>> out_mne_channel('/path/to/channel.mat')

MNE> Fix CTF/Brainstorm=>Neuromag transformations
    Quaternion matching (desired vs. transformed):
       1.75   67.92   -0.00 mm <->    1.75   67.92   -0.00 mm (orig :  -52.45   45.43 -264.57 mm) diff =    0.000 mm
      -1.75  -67.92    0.00 mm <->   -1.75  -67.92   -0.00 mm (orig :   46.65  -47.54 -265.69 mm) diff =    0.000 mm
     106.07    0.00   -0.00 mm <->  106.07    0.00   -0.00 mm (orig :   65.76   75.83 -240.13 mm) diff =    0.000 mm
    Coordinate transformations established.
TODO: Export CTF compensators

ans = 

  Python Info with properties:

              ch_names: [1×340 py.list]
    compensation_grade: [1×1 py.int]

    <Info | 12 non-empty values
     bads: []
     ch_names: UDIO001, UPPT001, UTRG001, SCLK01, BG1, BG2, BG3, BP1, BP2, BP3, ...
     chs: 3 Stimulus, 34 misc, 26 Reference Magnetometers, 274 Magnetometers, 1 ECG, 2 EOG
     ctf_head_t: CTF/4D/KIT head -> head transform
     custom_ref_applied: False
     dev_ctf_t: MEG device -> CTF/4D/KIT head transform
     dev_head_t: MEG device -> head transform
     dig: 253 items (6 Cardinal, 6 HPI, 241 Extra)
     highpass: 0.0 Hz
     lowpass: 500.0 Hz
     meas_date: unspecified
     nchan: 340
     projs: cardiac: SSP_pca, MEG, 07-Nov-2021 14:31:03: off, blink: ...
     sfreq: 1000.0 Hz
    >

Example out_mne_data (Raw):

>> out_mne_data('/path/to/data.mat', 'Raw', '/path/to/channel.mat')
Warning: File not found in database: /path/to/data.mat 
> In out_mne_data (line 71) 
MNE> Fix CTF/Brainstorm=>Neuromag transformations
    Quaternion matching (desired vs. transformed):
       1.75   67.92   -0.00 mm <->    1.75   67.92   -0.00 mm (orig :  -52.45   45.43 -264.57 mm) diff =    0.000 mm
      -1.75  -67.92    0.00 mm <->   -1.75  -67.92   -0.00 mm (orig :   46.65  -47.54 -265.69 mm) diff =    0.000 mm
     106.07    0.00   -0.00 mm <->  106.07    0.00   -0.00 mm (orig :   65.76   75.83 -240.13 mm) diff =    0.000 mm
    Coordinate transformations established.
TODO: Export CTF compensators
Creating RawArray with float64 data, n_channels=340, n_times=361
    Range : -60 ... 300 =     -0.100 ...     0.500 secs
Ready.

ans = 

C:\Users\franc\AppData\Local\Programs\Python\Python38\lib\site-packages\mne\utils\_logging.py:493: DeprecationWarning: The verbose class attribute has been deprecated in 1.0 and will be removed in 1.1, pass verbose to methods as required to change log levels instead
  warn('The verbose class attribute has been deprecated in 1.0 and will '
  Python RawArray with properties:

           annotations: [1×1 py.mne.annotations.Annotations]
              ch_names: [1×340 py.list]
    compensation_grade: [1×1 py.int]
             filenames: [1×1 py.tuple]
            first_samp: [1×1 py.int]
            first_time: -0.1000
             last_samp: [1×1 py.numpy.int32]
               n_times: [1×1 py.numpy.int32]
                  proj: 1
                 times: [1×1 py.numpy.ndarray]
               verbose: [1×1 py.NoneType]
               preload: 1
           orig_format: [1×6 py.str]
                  info: [1×1 py.mne.io.meas_info.Info]
       buffer_size_sec: 1

    <RawArray | 340 x 361 (0.6 s), ~1.4 MB, data loaded>

Example out_mne_data (Evoked):

>> out_mne_data('/path/to/data.mat', 'Evoked', '/path/to/channel.mat')
Warning: File not found in database: /path/to/data.mat 
> In out_mne_data (line 71) 
MNE> Fix CTF/Brainstorm=>Neuromag transformations
    Quaternion matching (desired vs. transformed):
       1.75   67.92   -0.00 mm <->    1.75   67.92   -0.00 mm (orig :  -52.45   45.43 -264.57 mm) diff =    0.000 mm
      -1.75  -67.92    0.00 mm <->   -1.75  -67.92   -0.00 mm (orig :   46.65  -47.54 -265.69 mm) diff =    0.000 mm
     106.07    0.00   -0.00 mm <->  106.07    0.00   -0.00 mm (orig :   65.76   75.83 -240.13 mm) diff =    0.000 mm
    Coordinate transformations established.
TODO: Export CTF compensators

ans = 

C:\Users\franc\AppData\Local\Programs\Python\Python38\lib\site-packages\mne\utils\_logging.py:493: DeprecationWarning: The verbose class attribute has been deprecated in 1.0 and will be removed in 1.1, pass verbose to methods as required to change log levels instead
  warn('The verbose class attribute has been deprecated in 1.0 and will '
  Python EvokedArray with properties:

              ch_names: [1×340 py.list]
    compensation_grade: [1×1 py.int]
                  data: [1×1 py.numpy.ndarray]
                  kind: [1×7 py.str]
                  proj: 1
                  tmax: 0.5000
                  tmin: -0.1000
               verbose: [1×1 py.NoneType]
               comment: [1×23 py.str]
                  last: [1×1 py.int]
                 times: [1×1 py.numpy.ndarray]
                 first: [1×1 py.int]
              baseline: [1×1 py.NoneType]
                 picks: [1×1 py.NoneType]
               preload: 1
                  nave: [1×1 py.int]
                  info: [1×1 py.mne.io.meas_info.Info]

    <Evoked | 'Avg: deviant (39 files)' (average, N=39), -0.1 – 0.5 sec, baseline off, 340 ch, ~1.4 MB>

Example out_mne_data (Epoched):

>> out_mne_data('/path/to/data.mat', 'Epoched', '/path/to/channel.mat')
Warning: File not found in database: /path/to/data.mat 
> In out_mne_data (line 71) 
MNE> Fix CTF/Brainstorm=>Neuromag transformations
    Quaternion matching (desired vs. transformed):
       1.75   67.92   -0.00 mm <->    1.75   67.92   -0.00 mm (orig :  -52.45   45.43 -264.57 mm) diff =    0.000 mm
      -1.75  -67.92    0.00 mm <->   -1.75  -67.92   -0.00 mm (orig :   46.65  -47.54 -265.69 mm) diff =    0.000 mm
     106.07    0.00   -0.00 mm <->  106.07    0.00   -0.00 mm (orig :   65.76   75.83 -240.13 mm) diff =    0.000 mm
    Coordinate transformations established.
TODO: Export CTF compensators
Not setting metadata
1 matching events found
No baseline correction applied
Created an SSP operator (subspace dimension = 3)
3 projection items activated
0 bad epochs dropped

ans = 

C:\Users\franc\AppData\Local\Programs\Python\Python38\lib\site-packages\mne\utils\_logging.py:493: DeprecationWarning: The verbose class attribute has been deprecated in 1.0 and will be removed in 1.1, pass verbose to methods as required to change log levels instead
  warn('The verbose class attribute has been deprecated in 1.0 and will '
  Python EpochsArray with properties:

           annotations: [1×1 py.NoneType]
              ch_names: [1×340 py.list]
    compensation_grade: [1×1 py.int]
              filename: [1×1 py.NoneType]
              metadata: [1×1 py.NoneType]
                  proj: 1
                 times: [1×1 py.numpy.ndarray]
                  tmax: 0.5000
                  tmin: -0.1000
               verbose: [1×1 py.NoneType]
              drop_log: [1×1 py.tuple]
              baseline: [1×1 py.NoneType]
                 picks: [1×1 py.numpy.ndarray]
               preload: 1
                  flat: [1×1 py.NoneType]
             selection: [1×1 py.numpy.ndarray]
                reject: [1×1 py.NoneType]
               detrend: [1×1 py.NoneType]
           reject_tmax: [1×1 py.NoneType]
              event_id: [1×1 py.dict]
                  info: [1×1 py.mne.io.meas_info.Info]
           reject_tmin: [1×1 py.NoneType]
                events: [1×1 py.numpy.ndarray]

    <EpochsArray |  1 events (all good), -0.1 - 0.5 sec, baseline off, ~1.4 MB, data loaded,
     'Avg: deviant': 1>

Thank you for your quick response. I updated Brainstorm and was able to successfully apply tSSS to my data. However, I now receive an error when trying to review the raw files (see attached).
figure_error

Best,
Rachel

Hi Rachel,

Try this solution for that error:

I realized that there was a problem in the update mechanism when there are changes to brainstorm.jar. Frequently, the brainstorm.jar cannot not be replaced automatically with the newer version.

I fixed this in this commit (forcing downloading a new .jar at startup after an update):

@rkspooner94 If you haven't done anything yet: simply update Brainstorm again.