コード例 #1
0
ファイル: build_cortex.py プロジェクト: srijanie03/bmtk
import numpy as np
import math
import random

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

net = NetworkBuilder("V1")
net.add_nodes(N=80, pop_name='Scnn1a',
              positions=positions_columinar(N=80, center=[0, 50.0, 0], max_radius=30.0, height=100.0),
              rotation_angle_yaxis=xiter_random(N=80, min_x=0.0, max_x=2*np.pi),
              rotation_angle_zaxis=xiter_random(N=80, min_x=0.0, max_x=2*np.pi),
              tuning_angle=np.linspace(start=0.0, stop=360.0, num=80, endpoint=False),
              location='L4',
              ei='e',
              level_of_detail='biophysical',
              params_file='472363762_fit.json',
              morphology_file='Scnn1a.swc',
              set_params_function='Biophys1')

net.add_nodes(N=20, pop_name='PV',
              positions=positions_columinar(N=20, center=[0, 50.0, 0], max_radius=30.0, height=100.0),
              rotation_angle_yaxis=xiter_random(N=20, min_x=0.0, max_x=2*np.pi),
              rotation_angle_zaxis=xiter_random(N=20, min_x=0.0, max_x=2*np.pi),
              location='L4',
              ei='i',
              level_of_detail='biophysical',
              params_file='472912177_fit.json',
              morphology_file='Pvalb.swc',
              set_params_function='Biophys1')
コード例 #2
0
ファイル: build_cortex.py プロジェクト: tmchartrand/bmtk
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
ファイル: build_network.py プロジェクト: tmchartrand/bmtk
    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',
        model_processing='aibs_perisomatic',
        **model_props)

# Build intfire type cells
for model_props in point_models:
    n_cells = 75  # Just assume 75 cells for both point inhibitory and point excitatory
    positions = positions_columinar(N=n_cells,
                                    center=[0, 10.0, 0],
                                    max_radius=50.0,
                                    height=200.0)