diff --git a/README.md b/README.md index 9966533d2862cb8da2f8abc21f36d7fba4629570..c6a31fbc4829087433fe29bf21d8b8d46a5a8b11 100644 --- a/README.md +++ b/README.md @@ -176,6 +176,12 @@ 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 Schmidt et al. (2017) requires python-igraph and networkx. To install these additional packages, execute: + +`pip install -r figures/Schmidt2017/additional_requirements.txt` + +The SLN fit in `multiarea_model/data_multiarea/VisualCortex_Data.py` and `figures/Schmidt2017/Fig5_cc_laminar_pattern.py` requires an installation of R and the R library `aod` (<http://cran.r-project.org/package=aod>). Without R installation, both scripts will directly use the resulting values of the fit (see Fig. 5 of [1]). + ## Contributors All authors of the publications [1-3] made contributions to the scientific content. @@ -183,6 +189,6 @@ The code base was written by Maximilian Schmidt, Jannis Schuecker, and Sacha van ## Citation -If you use this code, we ask you to cite the appropriate papers in your publication. For the multi-area model itself, please [1] and [3]. If you use the mean-field theory or the stabilization method, please cite [2] in addition. We provide bibtex entries in `CITATION`. +If you use this code, we ask you to cite the appropriate papers in your publication. For the multi-area model itself, please cite [1] and [3]. If you use the mean-field theory or the stabilization method, please cite [2] in addition. We provide bibtex entries in `CITATION`. <img src="https://raw.githubusercontent.com/nest/nest-simulator/master/extras/logos/nest-simulated.png" alt="NEST simulated" width="200"/> diff --git a/figures/Schmidt2017/Fig5_cc_laminar_pattern.py b/figures/Schmidt2017/Fig5_cc_laminar_pattern.py index 40f1ad17bdba806bde910a8f1d38bc944e4fca6d..f46a51c06f5c6dee3c13bc0cacd74d7a29a891c6 100644 --- a/figures/Schmidt2017/Fig5_cc_laminar_pattern.py +++ b/figures/Schmidt2017/Fig5_cc_laminar_pattern.py @@ -147,12 +147,17 @@ Fit of SLN vs. architectural type differences SLN_array = np.array(data[:, 10], dtype=np.float) densities = np.array(data[:, 7], dtype=np.float) -proc = subprocess.Popen( - ["Rscript", os.path.join(datapath, 'SLN_logdensities.R')], - stdout=subprocess.PIPE) -out = proc.communicate()[0].decode('utf-8') -R_fit = [float(out.split('\n')[1].split(' ')[1]), - float(out.split('\n')[1].split(' ')[3])] +# Call R script to perform SLN fit +try: + proc = subprocess.Popen(["Rscript", + os.path.join(datapath, 'SLN_logdensities.R')], + stdout=subprocess.PIPE) + out = proc.communicate()[0].decode('utf-8') + R_fit = [float(out.split('\n')[1].split(' ')[1]), + float(out.split('\n')[1].split(' ')[3])] +except OSError: + print("No R installation, taking hard-coded fit parameters.") + R_fit = [-0.1516142, -1.5343200] print(R_fit) ax = axes['A'] diff --git a/figures/Schmidt2017/additional_requirements.txt b/figures/Schmidt2017/additional_requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..d60715850a454f9bd0f746c1ae3e834cb8284731 --- /dev/null +++ b/figures/Schmidt2017/additional_requirements.txt @@ -0,0 +1,2 @@ +python-igraph +networkx