Wiki source code of Code description
Version 4.1 by galluzziandrea on 2021/12/09 14:38
Hide last authors
| author | version | line-number | content |
|---|---|---|---|
| |
4.1 | 1 | == Introduction (path and modules) == |
| |
1.1 | 2 | |
| |
3.1 | 3 | First of all we check the path and import the necessary modules . |
| |
1.1 | 4 | |
| |
4.1 | 5 | === Check where I am and place myself in the right folder : === |
| |
3.1 | 6 | |
| |
2.2 | 7 | {{code language="python"}} |
| |
3.1 | 8 | # Import the os module |
| 9 | import os | ||
| 10 | |||
| 11 | #Print the current working directory | ||
| 12 | print("Current working directory: {0}".format(os.getcwd())) | ||
| 13 | |||
| 14 | # Change the current working directory | ||
| 15 | os.chdir('/mnt/user/shared/Slow waves in fading anesthesia/Nest3Python3') | ||
| 16 | |||
| 17 | # Print the current working directory | ||
| 18 | print("Current working directory: {0}".format(os.getcwd())) | ||
| |
2.2 | 19 | {{/code}} |
| |
1.1 | 20 | |
| |
4.1 | 21 | === import the modules necessary for the simulation === |
| |
1.1 | 22 | |
| 23 | {{code language="python"}} | ||
| |
3.1 | 24 | import nest |
| 25 | import time | ||
| 26 | from numpy import exp | ||
| 27 | import numpy | ||
| 28 | import math | ||
| 29 | import random | ||
| 30 | import multiprocessing | ||
| 31 | Inizio=time.time() | ||
| 32 | print('tempo di Inizio:',Inizio) | ||
| |
1.1 | 33 | {{/code}} |
| 34 | |||
| |
4.1 | 35 | === === |
| |
2.2 | 36 | |
| |
4.1 | 37 | ==== Results ==== |
| |
2.2 | 38 | |
| |
4.1 | 39 | ==== ==== |
- Introduction (path and modules):
- Check where I am and place myself in the right folder:
- Import the modules necessary for the simulation:
- Define necessary classes to import the Initialization Files:
- Import the initialization files:
- Defining general and nest.kernel parameters
- Building the network: neuronal populations , Poisson processes and spike detectors
- Connecting the network nodes: neuronal populations, Poisson processes and spike detectors
- Simulating: neuronal time evolution.
- Results: