diff --git a/README.md b/README.md index 705b6d5739513867e10ed99fa6b95fa1e0c10069..31f7c73dc21fe0a052d9d588282f0fb48094e85f 100644 --- a/README.md +++ b/README.md @@ -184,7 +184,7 @@ To install the required packages in a conda environment, execute: Note that NEST needs to be installed separately, see <http://www.nest-simulator.org/installation/>. -In addition, reproducing the figures of [1] requires networkx, python-igraph and pyx. To install these additional packages, execute: +In addition, reproducing the figures of [1] requires networkx, python-igraph, pycairo and pyx. To install these additional packages, execute: `pip install -r figures/Schmidt2018/additional_requirements.txt` diff --git a/figures/Schmidt2018/Fig5_cc_laminar_pattern.py b/figures/Schmidt2018/Fig5_cc_laminar_pattern.py index 6c941ff63f85c9b4695243c37bdc4fa623707064..f9a78d0c33ff71fa7b1309ea869d798106b94c85 100644 --- a/figures/Schmidt2018/Fig5_cc_laminar_pattern.py +++ b/figures/Schmidt2018/Fig5_cc_laminar_pattern.py @@ -2,7 +2,6 @@ import matplotlib.pyplot as pl import numpy as np import json import pyx -import subprocess import os from helpers import area_list, population_labels, layer_labels @@ -31,7 +30,6 @@ if NEURON_DENSITIES_AVAILABLE: print(width, height) pl.rcParams['figure.figsize'] = (width, height) - axes = {} gs1 = gridspec.GridSpec(1, 1) gs1.update(left=0.1, right=0.47, top=0.95, bottom=0.75, wspace=0.1, hspace=0.3) @@ -43,7 +41,6 @@ if NEURON_DENSITIES_AVAILABLE: axes['B2'] = pl.subplot(gs2[1:2, :1]) axes['B3'] = pl.subplot(gs2[2:3, :1]) - gs3 = gridspec.GridSpec(3, 1) gs3.update(left=0.6, right=0.95, top=0.65, bottom=0.1, wspace=0.1, hspace=0.8) axes['D'] = pl.subplot(gs3[:1, :1]) @@ -80,7 +77,6 @@ if NEURON_DENSITIES_AVAILABLE: 'horizontalalignment': 'left', 'verticalalignment': 'bottom'}, transform=axes[label].transAxes) - data = np.loadtxt(os.path.join(raw_datapath, 'RData_prepared_logdensities.txt'), skiprows=3, dtype='S10') target = np.array(data[:, 1], dtype=str) @@ -124,11 +120,9 @@ if NEURON_DENSITIES_AVAILABLE: y += overlap['visual'][area_key + '_M132'][FV91] / 100. neuron_densities[area] = {'overall': x / y} - def integrand(x, mu, sigma): return 1 / (sigma * np.sqrt(2 * np.pi)) * np.exp(-(x - mu) ** 2 / (2. * sigma ** 2)) - def probit(x,): if isinstance(x, np.ndarray): res = [integrate.quad(integrand, -1000., ii, @@ -137,11 +131,9 @@ if NEURON_DENSITIES_AVAILABLE: res = integrate.quad(integrand, -1000., x, args=(0., 1.))[0] return res - def chi2(x, y, z, n): return 1. / (n) * np.sum(((x - y) / z) ** 2) - """ Fit of SLN vs. architectural type differences """ diff --git a/figures/Schmidt2018/README.md b/figures/Schmidt2018/README.md index 9a8558fea1619b7c34fa26f2e88b99d8fa38bf3c..518d859d634ef1b42ce7a18fd753473a12385dae 100644 --- a/figures/Schmidt2018/README.md +++ b/figures/Schmidt2018/README.md @@ -6,7 +6,7 @@ Please note: Figures 2, 5, and 8 show slight deviations from the published figur Please note that the placement of areas in Figure 7 will deviate from the published figure, because their location depends on the force-directed algorithm implemented in `igraph` and `python-igraph` does not allow manual setting of the random seed for the algorithm. This is a mere visual issue and does not affect the scientific content. -Please note that, since we currently cannot publish the data on Neuronal Densities, Figure 2 can currently not be produced and executing it throws an error. +Please note that, since we currently cannot publish the data on Neuronal Densities, Figures 2 and 5 can currently not be produced and executing it throws an error. If snakemake is installed, the figures can be produced by executing diff --git a/figures/Schmidt2018/additional_requirements.txt b/figures/Schmidt2018/additional_requirements.txt index 59d44333521bc4985813c8eaf044ea231a970ef4..64b0cee41a9b06e1ab046dbe1e06a9ad4c9552f5 100644 --- a/figures/Schmidt2018/additional_requirements.txt +++ b/figures/Schmidt2018/additional_requirements.txt @@ -1,3 +1,4 @@ -python-igraph networkx +pycairo +python-igraph pyx diff --git a/figures/Schmidt2018/tex/define_pops.tex b/figures/Schmidt2018/tex/define_pops.tex new file mode 100644 index 0000000000000000000000000000000000000000..29c301299836efa6bcd1e542245d33dba0091526 --- /dev/null +++ b/figures/Schmidt2018/tex/define_pops.tex @@ -0,0 +1,19 @@ +\pnode(1.55, 0.9){s6E}{} +\pnode(1.55, 1.9){s5E}{} +\pnode(1.55, 2.9){s4E}{} +\pnode(1.55, 3.9){s23E}{} + +\pnode(4.75, 0.9){t6E}{} +\pnode(4.75, 1.9){t5E}{} +\pnode(4.75, 2.9){t4E}{} +\pnode(4.75, 3.9){t23E}{} + +\pnode(5.75, 0.9){t6I}{} +\pnode(5.75, 1.9){t5I}{} +\pnode(5.75, 2.9){t4I}{} +\pnode(5.75, 3.9){t23I}{} + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: t +%%% End: