Demo Notebook "simulate_surface_seeg_eeg_meg.ipynb"

49 views
Skip to first unread message

MICHELANGELO FABBRIZZI

unread,
Sep 4, 2023, 1:04:52 PM9/4/23
to TVB Users
Dear All,

I am trying to use the Notebook "simulate_surface_seeg_eeg_meg.ipynb", I have installed last version of TVB (2.7.2) and downloaded the last version of the notebook from GitHub https://github.com/the-virtual-brain/tvb-root/blob/master/tvb_documentation/demos/simulate_surface_seeg_eeg_meg.ipynb , at the same time when I run it as it is (no modification at all) I get the below Error: could anybody help?

Appreciated, regards,

Mic

--------------------------------------------------------------------------- ValueError Traceback (most recent call last) Cell In[2], line 48 37 default_cortex.coupling_strength = local_coupling_strength 39 sim = simulator.Simulator( 40 model=oscillator, 41 connectivity=white_matter, (...) 46 simulation_length=10.0 47 ) ---> 48 sim.configure() 50 eeg, meg, seeg, _ = sim.run() File /Applications/tvb-2.7.2.app/Contents/Resources/lib/python3.10/tvb/simulator/simulator.py:272, in Simulator.configure(self, full_configure) 270 self._configure_history() 271 # Configure Monitors to work with selected Model, etc... --> 272 self._configure_monitors() 273 # Estimate of memory usage. 274 self._census_memory_requirement() File /Applications/tvb-2.7.2.app/Contents/Resources/lib/python3.10/tvb/simulator/simulator.py:433, in Simulator._configure_monitors(self) 431 # Configure monitors 432 for monitor in self.monitors: --> 433 monitor.config_for_sim(self) File /Applications/tvb-2.7.2.app/Contents/Resources/lib/python3.10/tvb/simulator/monitors.py:688, in EEG.config_for_sim(self, simulator) 687 def config_for_sim(self, simulator): --> 688 super(EEG, self).config_for_sim(simulator) 689 self._ref_vec = numpy.zeros((self.sensors.number_of_sensors,)) 690 if self.reference: File /Applications/tvb-2.7.2.app/Contents/Resources/lib/python3.10/tvb/simulator/monitors.py:576, in Projection.config_for_sim(self, simulator) 574 else: 575 full_gain = numpy.zeros((self.gain.shape[0], self.gain.shape[1] + sub_gain.shape[1])) --> 576 full_gain[:, self.rmap if using_cortical_surface else cortical_indices] = self.gain 577 full_gain[:, non_cortical_indices] = self.analytic(*src) 578 self.gain = full_gain ValueError: shape mismatch: value array of shape (62,16384) could not be broadcast to indexing result of shape (62,16500)

MICHELANGELO FABBRIZZI

unread,
Sep 4, 2023, 1:09:25 PM9/4/23
to TVB Users
Apologize for the bad formatting, I attach the Notebook (available at the github link above) and a screenshot of the error.
simulate_surface_seeg_eeg_meg.ipynb
Error_Screenshot.png

Lia Domide

unread,
Sep 9, 2023, 5:15:20 PM9/9/23
to TVB Users
Hi Mic,

Thank you for reporting this here.

We have a bug reported on this topic: https://req.thevirtualbrain.org/browse/TVB-3018

Unfortunately I can not give a time estimation for when it will be fixed. But we are open to contributions, in case someone finds the resources and the inspiration.

Best,
Lia.
 

Lia Domide

unread,
Sep 10, 2023, 4:37:23 PM9/10/23
to TVB Users
In case it helps anyone:
In a recent change here, we adjusted the  simulate_surface_seeg_eeg_meg.ipynb to use a connectivity without subcortical regions for the surface simulation, to avoid our bug TVB-3018 (which is still there for now).

Reply all
Reply to author
Forward
0 new messages