"# Model paramters are most important among all the paramters, it directly affect the model itself and thus have a great impact on the simulation results. Model paramters define the connection, input, neuron, and network charateristics of the model, and therefore fall into four categories: **Connection paramters**, **Input paramters**, **Neuron paramters**, and **Network paramters**.\n",
"scale_down_to = 0.005 # Change it to 1. for running the fullscale network\n",
"cc_weights_factor = \n",
"# Scaling factor for cortico-cortical connections (chi) \n",
"# This scaling factor controls the cortico-cortical synaptic strength. If it is 1.0 then the inter-area synaptic strength is the same as the intra-areal. This factor changes the network activity from ground to metastable.\n",
" # # It defines how non-simulated areas will be replaced\n",
" # Whether to replace non-simulated areas by Poisson sources with the same global rate rate_ext ('hom_poisson_stat') or by specific rates ('het_poisson_stat') or by time-varying specific current ('het_current_nonstat'). In the two latter cases, the data to replace the cortico-cortical input is loaded from `replace_cc_input_source`\n",
|Ground state to metastable state |cc_weights_factor | |$^2$ |
|Replace non-simulated areas |replace_non_simulated_areas |'het_poisson_stat' |$^3$ |
|Simulation areas |sim_areas | |$^4$ |
%% Cell type:markdown id:a2161477 tags:
1. Scaling factor (`scale_down_to`) <br>
Scaling factor (scale_down_to) is the parameter which defines the the ratio of the full scale multi-area model being down-scaled to a model with fewer neurons and indegrees so as to be simulated on machines with lower computational ability and the simulation results can be obtained within relative shorter period of time.
Neurons and indegrees are both scaled down to 0.5%, where the model can usually be simulated on a local machine.<br>
**Warning**: This will not yield reasonable dynamical results from the network and is only meant to demonstrate the simulation workflow <br>
2. Ground state to metastable state (`cc_weights_factor`) <br>
Ground state to metastable state (cc_weights_factor) decides the switch of the model from ground state to metastable state. <br>
3. Replace non-simulated areas (`replace_non_simulated_areas`) <br>
Replace non-simulated areas (replace_non_simulated_areas) defines how non-simulated areas will be replaced. <br>
4. Simulation areas (`simulation_areas`) <br>
Simulation areas (simulation_areas) specifies the cortical areas included in the simulation process.
%% Cell type:code id:60265d52 tags:
``` python
# Model parameters
# Model paramters are most important among all the paramters, it directly affect the model itself and thus have a great impact on the simulation results. Model paramters define the connection, input, neuron, and network charateristics of the model, and therefore fall into four categories: **Connection paramters**, **Input paramters**, **Neuron paramters**, and **Network paramters**.
scale_down_to=0.005# Change it to 1. for running the fullscale network
cc_weights_factor=
# Scaling factor for cortico-cortical connections (chi)
# This scaling factor controls the cortico-cortical synaptic strength. If it is 1.0 then the inter-area synaptic strength is the same as the intra-areal. This factor changes the network activity from ground to metastable.
We try out best not to confuse users with too many parameters. However, if you want to change the default parameters, you can do so by passing a dictionary to the `default_params` argument of the `MultiAreaModel` class.
# # It defines how non-simulated areas will be replaced
# Whether to replace non-simulated areas by Poisson sources with the same global rate rate_ext ('hom_poisson_stat') or by specific rates ('het_poisson_stat') or by time-varying specific current ('het_current_nonstat'). In the two latter cases, the data to replace the cortico-cortical input is loaded from `replace_cc_input_source`
'replace_non_simulated_areas':'het_poisson_stat',
'g':-11.,
'K_stable':'K_stable.npy',
# Increase the external input to 2/3E and 5E in area TH
'fac_nu_ext_TH':1.2,
# Increase the external Poisson indegree onto 5E
'fac_nu_ext_5E':1.125,
# Increase the external Poisson indegree onto 6E
'fac_nu_ext_6E':1.41666667,
# Adjust the average indegree in V1 based on monkey data
The connectivity and neuron numbers are stored in the attributes of the model class. Neuron numbers are stored in `M.N` as a dictionary (and in `M.N_vec` as an array), indegrees in `M.K` as a dictionary (and in `M.K_matrix` as an array). Number of synapses can also be access via `M.synapses` (and in `M.syn_matrix` as an array). <br>
## S3. Data processing and simulation results analysis <a class="anchor" id="section_3"></a>
%% Cell type:markdown id:89c7b7cf tags:
The following instructions will work when the `simulate` parameter is set to `True` during the creation of the MultiAreaModel object, and the `M.simulation.simulate()` method is executed.
%% Cell type:code id:dc3b1820 tags:
``` python
# Uncomment the lines in this code cell below to test if the number of synapses created by NEST matches the expected values
# """
# Test if the correct number of synapses has been created.
# syn = M.synapses[target_area.name][target_pop][source_area.name][source_pop]
# assert(len(created_syn) == int(syn))
```
%% Cell type:markdown id:57401110 tags:
To obtain the connections information, you can extract the lists of connected sources and targets. Moreover, you can access additional synaptic details, such as synaptic weights and delays.
You can determine the area and subpopulation to which the neuron ID ranges belong by referring to the file `network_gids.txt`, which is automatically generated during network creation.
%% Cell type:code id:902f2800 tags:
``` python
# # Open the file using a with statement
# with open(os.path.join(M.simulation.data_dir,"recordings/network_gids.txt"), "r") as file: