Getting Bold signal from Jansen Rit output

Skip to first unread message

Jul 12, 2021, 8:37:44 AMJul 12
to TVB Users
Hello fellow TVB Users,

I am using Jansen and Rit model in TVB (python 3) to simulate resting-state BOLD activity. 
My understanding is that the most reasonable way to do this with JR model is to take the output variables y1 and y2, subtract them to obtain the difference between the excitatory and inhibitory inputs to pyramidal cells. 
The next step for me is to apply the sigmoidal function to obtain the pulse density/firing rates and use them as the output to the 

I have the simulation output coming from 
t_ssamp, ssamp =

I am using a TimeSeriesRegion object as follows:
full_ssamp_tsr = TimeSeriesRegion(connectivity=s_conn,
                            data=ssamp,  time = ts_samp


which works and then I am trying to get the BOLD signal by using:
balloon_analyser = fmri_balloon.BalloonModel(time_series=full_ssamp_tsr., dt=.72, neural_input_transformation='abs_diff')
balloon_data = balloon_analyser.evaluate()

as a result I am getting error:

AttributeError: 'TimeSeriesRegion' object has no attribute 'connectivity'

This seems really strange, I have tried different inputs to the BalloonModel and neither raw time_series nor the newly created TimeSeriesRegion seem to work. Could it be because I am not using region labels?

LONG STORY SHORT: What would be the best way to get my BOLD output working?

I would very much appreciate any advice.


Jul 12, 2021, 9:30:06 AMJul 12
On 7/12/2021 2:37 PM, wrote:

> /*AttributeError: 'TimeSeriesRegion' object has no attribute 'connectivity'*

Can you provide a traceback please?

> TimeSeriesRegion seem to work. Could it be because I am not using region

It could be, and you can generate a dummy set of labels with e.g.

np.array(['region%d'%i for i in range(len(conn.weights))])


Jul 12, 2021, 9:43:00 AMJul 12
to TVB Users
Thank you Marmaduke,

I am also trying to get the sigmoidal implemented within the Bold monitor class, so perhaps that will solve the issues as well.
Below is the requested traceback:

Best regards

AttributeError                            Traceback (most recent call last)
<ipython-input-73-952b7528b03a> in <module>
     13 balloon_analyser = fmri_balloon.BalloonModel(time_series=full_ssamp_ts, dt=.72, neural_input_transformation='abs_diff')
     14 balloon_data = balloon_analyser.evaluate()
---> 15 balloon_data.configure()

/Applications/ in configure(self, *args, **kwargs)
    222         Override to compute uninitialized state of the class.
    223         """
--> 224         self.validate()

/Applications/ in validate(self)
    214             # read all declarative attributes. This will trigger errors if they are
    215             # in an invalid state, like beeing required but not set
--> 216             getattr(self, k)

/Applications/ in __getattr__(self, attr_name)
    167             if attr_name in self.space_labels:
    168                 return self.get_subspace_by_labels([attr_name])
--> 169         raise AttributeError("%r object has no attribute %r" % (self.__class__.__name__, attr_name))
    171     def _get_index_for_slice_label(self, slice_label, slice_idx):

AttributeError: 'TimeSeriesRegion' object has no attribute 'connectivity'


Jul 13, 2021, 1:37:23 AMJul 13
to TVB Users


It looks like the configure call is not required for the time series object. I suggest commenting that line out, and just trying to use the NumPy array for what you what to do next.



From: <> on behalf of <>
Sent: Monday, July 12, 2021 3:43:00 PM
To: TVB Users
Subject: Re: [TVB] Getting Bold signal from Jansen Rit output
You received this message because you are subscribed to the Google Groups "TVB Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

Jul 13, 2021, 12:07:31 PMJul 13
to TVB Users
Thank you Marmaduke. I will give it a go.
Reply all
Reply to author
0 new messages