Skip to content

Commit

Permalink
Merge branch '0.9.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
dafrose committed Apr 18, 2020
2 parents b8aa5b1 + bd79a12 commit 3d0a8aa
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
25 changes: 20 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
# PyRates
PyRates is a framework for neural modeling and simulations, developed by Richard Gast and Daniel Rose at the Max Planck Institute of Human Cognitive and Brain Sciences, Leipzig, Germany.

Basic features:
---------------
## Basic features:

- Different backends: `Numpy` for fast simulations of small- to medium-sized networks. `Tensorflow` for efficient parallelization on GPUs/CPUs, `Fortran` for parameter continuations.
- Each model is internally represented by a `networkx` graph of nodes and edges, with the former representing the model units (i.e. single cells, cell populations, ...) and the latter the information transfer between them. In principle, this allows to implement any kind of dynamic neural system that can be expressed as a graph via PyRates.
- Solutions of initial value problems via different numerical solvers (e.g. full interface to `scipy.integrate.solve_ivp`)
Expand All @@ -21,16 +21,31 @@ Basic features:
- Model configuration and simulation can be done within a few lines of code.
- Various templates for rate-based population models are provided that can be used for neural network simulations imediatly.

Installation
------------
## Installation

PyRates can be installed via the `pip` command. We recommend to use `Anaconda` to create a new python environment with Python >= 3.6 and then simply run the following line from a terminal with the environment being activated:
```
pip install pyrates
```
Alternatively, it is possible to clone this repository and run the following line from the directory in which the repository was cloned:

You can install optional (non-default) packages by specifying one or more options in brackets, e.g.:
```
pip install pyrates[tf,plot]
```

Available options are `tf`, `plot`, `proc`, `cluster`, `numba` and `all`.
The latter includes all optional packages.

Alternatively, it is possible to clone this repository and run one of the following lines
from the directory in which the repository was cloned:
```
python setup.py install
```
or
```
pip install .[<options>]
```

Finally, a singularity container of the most recent version of this software can be found [here](https://singularity.gwdg.de/containers/3).
This container provides a stand-alone version of PyRates including all necessary Python tools to be run, independent of local operating systems.
To be able to use this container, you need to install [Singularity](https://singularity.lbl.gov/) on your local machine first.
Expand Down
2 changes: 1 addition & 1 deletion pyrates/backend/numpy_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -1388,7 +1388,7 @@ def add_input_layer(self, inputs: list, T: float, continuous=True) -> NumpyVar:
time = np.linspace(0, T, inputs[0][0].shape[0])

for (inp, target_var, idx) in inputs:
in_name = f"{inp.short_name}_inp" if hasattr(inp, 'short_name') else "var_inp"
in_name = f"{inp.short_name}_inp" if hasattr(inp, 'short_name') else f"{target_var.short_name}_inp"
if len(inp.shape) > 1:
inp = inp.squeeze()
f = interp1d(time, inp, axis=0, copy=False, kind='linear')
Expand Down

0 comments on commit 3d0a8aa

Please sign in to comment.