From acbc4003f254c56f77fc3e4f1c1c1a60c4ec9ccb Mon Sep 17 00:00:00 2001 From: Maximilian Schmidt <max.schmidt@fz-juelich.de> Date: Sat, 31 Mar 2018 15:48:12 +0900 Subject: [PATCH] Add missing file, update README, fix formatting figure script, add missing requirement --- README.md | 2 +- .../Schmidt2018/Fig5_cc_laminar_pattern.py | 8 -------- figures/Schmidt2018/README.md | 2 +- .../Schmidt2018/additional_requirements.txt | 3 ++- figures/Schmidt2018/tex/define_pops.tex | 19 +++++++++++++++++++ 5 files changed, 23 insertions(+), 11 deletions(-) create mode 100644 figures/Schmidt2018/tex/define_pops.tex diff --git a/README.md b/README.md index 705b6d5..31f7c73 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 6c941ff..f9a78d0 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 9a8558f..518d859 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 59d4433..64b0cee 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 0000000..29c3012 --- /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: -- GitLab