Пример #1
0
    'dynamics_params': 'IntFire1_exc_1.json'
}, {
    'model_name': 'LIF_inh',
    'ei': 'i',
    'dynamics_params': 'IntFire1_inh_1.json'
}]

# Build a network of 300 biophysical cells to simulate
internal = NetworkBuilder("internal")
for i, model_props in enumerate(bio_models):
    n_cells = 80 if model_props[
        'ei'] == 'e' else 30  # 80% excitatory, 20% inhib

    # Randomly get positions uniformly distributed in a column
    positions = positions_columinar(N=n_cells,
                                    center=[0, 10.0, 0],
                                    max_radius=50.0,
                                    height=200.0)

    internal.add_nodes(
        N=n_cells,
        x=positions[:, 0],
        y=positions[:, 1],
        z=positions[:, 2],
        rotation_angle_yaxis=xiter_random(N=n_cells,
                                          min_x=0.0,
                                          max_x=2 *
                                          np.pi),  # randomly rotate y axis
        rotation_angle_zaxis=xiter_random(N=n_cells,
                                          min_x=0.0,
                                          max_x=2 * np.pi),  #
        model_type='biophysical',
Пример #2
0
from bmtk.builder.networks import NetworkBuilder
from bmtk.builder.aux.node_params import positions_columinar, xiter_random
from bmtk.builder.aux.edge_connectors import distance_connector

import math
import numpy as np
import random


cortex = NetworkBuilder('mcortex')
cortex.add_nodes(N=100,
                 pop_name='Scnn1a',
                 positions=positions_columinar(N=100, center=[0, 50.0, 0], max_radius=30.0, height=100.0),
                 rotation_angle_yaxis=xiter_random(N=100, min_x=0.0, max_x=2*np.pi),
                 rotation_angle_zaxis=3.646878266,
                 potental='exc',
                 model_type='biophysical',
                 model_template='ctdb:Biophys1.hoc',
                 model_processing='aibs_perisomatic',
                 dynamics_params='472363762_fit.json',
                 morphology='Scnn1a_473845048_m.swc')

cortex.add_edges(source={'pop_name': 'Scnn1a'}, target={'pop_name': 'Scnn1a'},
                 connection_rule=distance_connector,
                 connection_params={'d_weight_min': 0.0, 'd_weight_max': 0.34, 'd_max': 50.0, 'nsyn_min': 0, 'nsyn_max': 10},
                 syn_weight=2.0e-04,
                 distance_range=[30.0, 150.0],
                 target_sections=['basal', 'apical', 'soma'],
                 delay=2.0,
                 dynamics_params='AMPA_ExcToExc.json',
                 model_template='exp2syn')
Пример #3
0
    },
    'LIF_inh': {
        'N': 40,
        'ei': 'i',
        'pop_name': 'LIF_inh',
        'model_type': 'point_process',
        'model_template': 'nest:iaf_psc_delta',
        'dynamics_params': 'iaf_psc_delta_inh.json'
    }
}

net = NetworkBuilder('cortex')
for model in LIF_models:
    params = LIF_models[model].copy()
    positions = positions_columinar(N=LIF_models[model]['N'],
                                    center=[0, 10.0, 0],
                                    max_radius=50.0,
                                    height=200.0)
    net.add_nodes(x=positions[:, 0],
                  y=positions[:, 1],
                  z=positions[:, 2],
                  **params)

net.add_edges(source={'ei': 'e'},
              connection_rule=random_connections,
              connection_params={'p': 0.1},
              syn_weight=2.0,
              delay=1.5,
              dynamics_params='ExcToInh.json',
              model_template='static_synapse')

net.add_edges(source={'ei': 'i'},