getting an issue using

  • MNE version: 1.2
  • operating system: Windows 10

Hi I did the following and get an issue with writing the raw snirf files

# read raw Hitachi files  and load data 
        raw = Preprocessing_individual.read_hitachi([pos_file_path_1, pos_file_path_2]).load_data()
       # set montage - DigMontage 
        montage = Preprocessing_individual.self_montage(file_path=montage_path_pos, csv_file=montage_path_csv) 
        # read Events from Hitachi-Raw and create an annotation 
        events = mne.find_events(raw)
        event_dict  =  {'Sp':1,
             'Rot-TS':2 ,

        event_desc = {v: k for k, v in event_dict.items()}

        # write and set annotations 
        annotation = mne.annotations_from_events(events=events,['sfreq'],
        print(, snirf_path) # write snirf file 

I get the following issue:

  File ~\fNIRS-project\ in gen_file, snirf_path) # write snirf file

  File ~\Anaconda3\envs\old_mne\lib\site-packages\mne_nirs\io\snirf\ in write_raw_snirf
    assert len(picks) == len(raw.ch_names), 'Data must be fnirs_cw_amplitude'

AssertionError: Data must be fnirs_cw_amplitude

However, when I print, it is fnirs_cw_amplitude…

 ch_names: S1_D1 695, S1_D1 830, S2_D1 695, S2_D1 830, S2_D2 695, S2_D2 ...
 chs: 88 fNIRS (CW amplitude), 4 Stimulus
 custom_ref_applied: False
 description: Experiment data
 dig: 35 items (3 Cardinal, 30 EEG, 2 Extra)
 highpass: 0.0 Hz
 lowpass: 0.2 Hz
 meas_date: 2017-11-14 10:54:00 UTC
 nchan: 92
 projs: []
 sfreq: 10.0 Hz

Thank you for your help and support!
Best, Rebecka