Synthetic volume sources

I’m trying to simulate volume sources and obtain raw, sensor data.


src = mne.setup_volume_source_space(subject=subject, subjects_dir=subjects_dir, pos=9.0,)

bem = mne.read_bem_solution(subjects_dir + subject + '/bem/model/bem_model.fif', verbose=None)

fwd = mne.make_forward_solution(rec.info, trans='fsaverage', src=src, bem=bem)

...

source_simulator = mne.simulation.SourceSimulator(src, tstep=tstep, duration=100)
source_simulator.add_data(label_ACC, source_ACC, events)
source_simulator.add_data(label_PCC, source_PCC, events)

raw = mne.simulation.simulate_raw(info, stc=source_simulator, forward=fwd)

However I’m getting an error in last line:

  File "/anaconda3/envs/mne/lib/python3.10/site-packages/mne/simulation/source.py", line 259, in simulate_stc
    src_sel = np.intersect1d(src[hemi_ind]['vertno'],
  File "/anaconda3/envs/mne/lib/python3.10/site-packages/mne/source_space.py", line 326, in __getitem__
    out = super().__getitem__(*args, **kwargs)
IndexError: list index out of range

Is it possible to simulate volume sources? If yes, what is the right method?