This is the readme for the Brian code associated with the paper:

Y Sweeney, J Hellgren-Kotaleski, and M Hennig (2015). 
A diffusive homeostatic signal maintains neural heterogeneity and
responsiveness in cortical networks. PLoS Comp. Biol. DOI:

An up-to-date version of the code may be found at

To see the code used to implement the numerical diffusion method, see
code/ . Brief instructions on how to
include this in an existing brian model are contained within.

To see a simplified python script containing a spiking network model
with diffusive homeostasis implemented (written in brian) see
code/ .

To generate the data for each figure run the
script from command line using 'python', where
X is the figure number. A lot of text output will be created showing
the progress. You will need to be in the same directory as the
'' file, and other .py files.

Python with numpy ( and the brian simulator
( will need to be installed. These scripts were
tested on a machine with OSX 10.10, Python v2.7.10, numpy v1.9.2, and
brian v1.4.1

IPython Notebook ( will be required in order to interact with the IPython Notebooks containing the plots.

As the simulations can take quite a long time to run (several hours on
a multicore machine) and the resulting datafiles are quite large (~1
GB total), sample data generated from the code are provided for each
figure and may be downloaded from figshare.

Figure 1:

Figure 4: 

Figure 5:

For any queries, comments or requests please do not hesitate to
contact me at