Skip to content
Snippets Groups Projects
Commit 7412fd37 authored by Maximilian Schmidt's avatar Maximilian Schmidt
Browse files

Add requirements file for add. requirements for figures of Schmidt2017, make...

Add requirements file for add. requirements for figures of Schmidt2017, make Fig5 script independent of R installation, update README file with information on requirements
parent bd8c7fa1
No related branches found
No related tags found
1 merge request!1Add all necessary files for the multi-area model
......@@ -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"/>
......@@ -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']
......
python-igraph
networkx
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment