• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python nest.set_verbosity函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中nest.set_verbosity函数的典型用法代码示例。如果您正苦于以下问题:Python set_verbosity函数的具体用法?Python set_verbosity怎么用?Python set_verbosity使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了set_verbosity函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: setUp

    def setUp(self):
        # test parameter
        self.rtol = 0.05

        # neuron parameters
        self.neuron_params = {'mu': 1.5, 'sigma': 0.5, 'tau': 5.}

        # simulation parameters
        self.simtime = 10000.
        self.dt = 0.1
        self.tstart = 10. * self.neuron_params['tau']

        nest.set_verbosity('M_WARNING')
        nest.ResetKernel()
        nest.SetKernelStatus(
            {'resolution': self.dt, 'use_wfr': False, 'print_time': True})

        # set up rate neuron and devices
        self.rate_neuron_ipn = nest.Create(
            'lin_rate_ipn', params=self.neuron_params)
        self.rate_neuron_opn = nest.Create(
            'lin_rate_opn', params=self.neuron_params)
        self.multimeter = nest.Create(
            "multimeter", params={'record_from': ['rate', 'noise'],
                                  'interval': self.dt, 'start': self.tstart})

        # record rates and noise
        nest.Connect(
            self.multimeter, self.rate_neuron_ipn + self.rate_neuron_opn)
开发者ID:gtrensch,项目名称:nest-simulator,代码行数:29,代码来源:test_rate_neuron.py


示例2: setUp

    def setUp(self):
        nest.set_verbosity('M_WARNING')
        nest.ResetKernel()

        # settings
        self.dendritic_delay = 1.0
        self.decay_duration = 5.0
        self.synapse_model = "stdp_triplet_synapse"
        self.syn_spec = {
            "model": self.synapse_model,
            "delay": self.dendritic_delay,
            "receptor_type": 1,  # set receptor 1 post-synaptically, to not generate extra spikes
            "weight": 5.0,
            "tau_plus": 16.8,
            "tau_plus_triplet": 101.0,
            "Aplus": 0.1,
            "Aminus": 0.1,
            "Aplus_triplet": 0.1,
            "Aminus_triplet": 0.1,
            "Kplus": 0.0,
            "Kplus_triplet": 0.0,
            "Wmax": 100.0,
        }
        self.post_neuron_params = {
            "tau_minus": 33.7,
            "tau_minus_triplet": 125.0,
        }

        # setup basic circuit
        self.pre_neuron = nest.Create("parrot_neuron")
        self.post_neuron = nest.Create("parrot_neuron", 1, params=self.post_neuron_params)
        nest.Connect(self.pre_neuron, self.post_neuron, syn_spec=self.syn_spec)
开发者ID:JanneM,项目名称:nest-simulator,代码行数:32,代码来源:test_stdp_triplet_synapse.py


示例3: run_simulation

def run_simulation():
    '''Performs a simulation, including network construction'''

    # open log file
    with Logger(params['log_file']) as logger:

        nest.ResetKernel()
        nest.set_verbosity(M_INFO)

        logger.log(str(memory_thisjob()) + ' # virt_mem_0')

        sdet = build_network(logger)

        tic = time.time()

        nest.Simulate(params['presimtime'])

        PreparationTime = time.time() - tic

        logger.log(str(memory_thisjob()) + ' # virt_mem_after_presim')
        logger.log(str(PreparationTime) + ' # presim_time')

        tic = time.time()

        nest.Simulate(params['simtime'])

        SimCPUTime = time.time() - tic

        logger.log(str(memory_thisjob()) + ' # virt_mem_after_sim')
        logger.log(str(SimCPUTime) + ' # sim_time')

        if params['record_spikes']:
            logger.log(str(compute_rate(sdet)) + ' # average rate')

        print(nest.GetKernelStatus())
开发者ID:gtrensch,项目名称:nest-simulator,代码行数:35,代码来源:hpc_benchmark.py


示例4: setUp

    def setUp(self):
        # test parameter to compare analytic solution to simulation
        self.rtol = 1.0

        # test parameters
        self.N = 100
        self.rate_ex = 1.5 * 1e4
        self.J = 0.1

        # simulation parameters
        self.simtime = 500.
        self.dt = 0.1
        self.start = 200.

        nest.set_verbosity('M_WARNING')
        nest.ResetKernel()
        nest.SetKernelStatus(
            {'resolution': self.dt, 'use_wfr': False, 'print_time': True})

        # set up driven integrate-and-fire neuron

        self.iaf_psc_delta = nest.Create(
            'iaf_psc_delta', self.N)  # , params={"C_m": 1.0})

        self.poisson_generator = nest.Create(
            'poisson_generator', params={'rate': self.rate_ex})
        nest.Connect(self.poisson_generator, self.iaf_psc_delta,
                     syn_spec={'weight': self.J, 'delay': self.dt})

        self.spike_detector = nest.Create(
            "spike_detector", params={'start': self.start})
        nest.Connect(
            self.iaf_psc_delta, self.spike_detector)

        # set up driven siegert neuron

        neuron_status = nest.GetStatus(self.iaf_psc_delta)[0]
        siegert_params = {'tau_m': neuron_status['tau_m'],
                          't_ref': neuron_status['t_ref'],
                          'theta': neuron_status['V_th'] -
                          neuron_status['E_L'],
                          'V_reset': neuron_status['V_reset'] -
                          neuron_status['E_L']}
        self.siegert_neuron = nest.Create(
            'siegert_neuron', params=siegert_params)

        self.siegert_drive = nest.Create(
            'siegert_neuron', 1, params={'mean': self.rate_ex})
        J_mu_ex = neuron_status['tau_m'] * 1e-3 * self.J
        J_sigma_ex = neuron_status['tau_m'] * 1e-3 * self.J ** 2
        syn_dict = {'drift_factor': J_mu_ex, 'diffusion_factor':
                    J_sigma_ex, 'model': 'diffusion_connection'}
        nest.Connect(
            self.siegert_drive, self.siegert_neuron, syn_spec=syn_dict)

        self.multimeter = nest.Create(
            "multimeter", params={'record_from': ['rate'],
                                  'interval': self.dt})
        nest.Connect(
            self.multimeter, self.siegert_neuron)
开发者ID:apeyser,项目名称:nest-simulator,代码行数:60,代码来源:test_siegert_neuron.py


示例5: single_neuron

def single_neuron(spike_times, sim_duration):
    nest.set_verbosity('M_WARNING')  # reduce NEST output
    nest.ResetKernel()  # reset simulation kernel
    # create LIF neuron with exponential synaptic currents
    neuron = nest.Create('iaf_psc_exp')
    # create a voltmeter
    voltmeter = nest.Create('voltmeter', params={'interval': 0.1})
    # create a spike generator
    spikegenerator = nest.Create('spike_generator')
    # ... and let it spike at predefined times
    nest.SetStatus(spikegenerator, {'spike_times': spike_times})
    # connect spike generator and voltmeter to the neuron
    nest.Connect(spikegenerator, neuron)
    nest.Connect(voltmeter, neuron)
    # run simulation for sim_duration
    nest.Simulate(sim_duration)
    # read out recording time and voltage from voltmeter
    times = nest.GetStatus(voltmeter)[0]['events']['times']
    voltage = nest.GetStatus(voltmeter)[0]['events']['V_m']
    # plot results
    plt.plot(times, voltage)
    plt.xlabel('Time (ms)')
    plt.ylabel('Membrane potential (mV)')
    filename = 'single_neuron.png'
    plt.savefig(filename, dpi=300)
开发者ID:BerndSchuller,项目名称:UP-Tasks,代码行数:25,代码来源:single_neuron.py


示例6: setUp

    def setUp(self):
        """Set up the test."""
        nest.set_verbosity('M_WARNING')
        nest.ResetKernel()

        # settings
        self.dendritic_delay = 1.0
        self.decay_duration = 5.0
        self.synapse_model = "vogels_sprekeler_synapse"
        self.syn_spec = {
            "model": self.synapse_model,
            "delay": self.dendritic_delay,
            "weight": 5.0,
            "eta": 0.001,
            "alpha": 0.1,
            "tau": 20.,
            "Kplus": 0.0,
            "Wmax": 15.,
        }

        # setup basic circuit
        self.pre_neuron = nest.Create("parrot_neuron")
        self.post_neuron = nest.Create("parrot_neuron")
        nest.Connect(self.pre_neuron, self.post_neuron,
                     syn_spec=self.syn_spec)
开发者ID:DimitriPlotnikov,项目名称:nest-simulator,代码行数:25,代码来源:test_vogels_sprekeler_synapse.py


示例7: test_ConnectNeuronsWithClopathSynapse

    def test_ConnectNeuronsWithClopathSynapse(self):
        """Ensures that the restriction to supported neuron models works."""

        nest.set_verbosity('M_WARNING')

        # Specify supported models
        supported_models = [
            'aeif_psc_delta_clopath',
            'hh_psc_alpha_clopath',
        ]

        # Connect supported models with Clopath synapse
        for nm in supported_models:
            nest.ResetKernel()

            n = nest.Create(nm, 2)

            nest.Connect(n, n, {"rule": "all_to_all"},
                         {"model": "clopath_synapse"})

        # Compute not supported models
        not_supported_models = [n for n in nest.Models(mtype='nodes')
                                if n not in supported_models]

        # Ensure that connecting not supported models fails
        for nm in not_supported_models:
            nest.ResetKernel()

            n = nest.Create(nm, 2)

            # try to connect with clopath_rule
            with self.assertRaises(nest.kernel.NESTError):
                nest.Connect(n, n, {"rule": "all_to_all"},
                             {"model": "clopath_synapse"})
开发者ID:gtrensch,项目名称:nest-simulator,代码行数:34,代码来源:test_clopath_synapse.py


示例8: setUp

    def setUp(self):
        nest.ResetKernel()
        nest.SetKernelStatus({"total_num_virtual_procs": 4})
        nest.ResetNetwork()
        nest.set_verbosity('M_DEBUG')

        self.sim_time = 10000
        self.sim_step = 100

        nest.SetKernelStatus(
            {'structural_plasticity_update_interval': self.sim_time + 1})

        self.se_integrator = []
        self.sim_steps = None
        self.ca_nest = None
        self.ca_python = None
        self.se_nest = None
        self.se_python = None

        # build
        self.pop = nest.Create('iaf_psc_alpha', 10)
        self.local_nodes = nest.GetNodes([0], {'model': 'iaf_psc_alpha'}, True)[0]
        self.spike_detector = nest.Create('spike_detector')
        nest.Connect(self.pop, self.spike_detector, 'all_to_all')
        noise = nest.Create('poisson_generator')
        nest.SetStatus(noise, {"rate": 800000.0})
        nest.Connect(noise, self.pop, 'all_to_all')
开发者ID:hesam-setareh,项目名称:nest-simulator,代码行数:27,代码来源:test_growth_curves.py


示例9: setUp

 def setUp(self):
     nest.ResetKernel()
     nest.set_verbosity('M_ERROR')
     self.num_procs = 1
     if mpi_test:
         self.comm = MPI.COMM_WORLD
         self.rank = self.comm.Get_rank()
         assert(nest.Rank() == self.rank)
         self.num_procs = 2
     self.exclude_synapse_model = [
         'stdp_dopamine_synapse',
         'stdp_dopamine_synapse_lbl',
         'stdp_dopamine_synapse_hpc',
         'stdp_dopamine_synapse_hpc_lbl',
         'rate_connection_instantaneous',
         'rate_connection_instantaneous_lbl',
         'rate_connection_delayed',
         'rate_connection_delayed_lbl',
         'gap_junction',
         'gap_junction_lbl',
         'diffusion_connection',
         'diffusion_connection_lbl',
         'clopath_synapse',
         'clopath_synapse_lbl'
     ]
开发者ID:gtrensch,项目名称:nest-simulator,代码行数:25,代码来源:test_disconnect.py


示例10: setupSimulation

    def setupSimulation(self):
        """Set up the simulation."""
        print("[INFO] Setting up simulation.")
        # NEST stuff
        nest.ResetKernel()
        nest.set_verbosity('M_INFO')
        nest.EnableStructuralPlasticity()
        nest.SetKernelStatus(
            {
                'resolution': self.dt
            }
            )
        nest.SetStructuralPlasticityStatus(
            {
                'structural_plasticity_update_interval':
                self.spUpdateInterval, }
            )

        self.setupSPSynapses()
        self.setupLayered()

        self.setupSpikeRecorders()
        self.calciumFile = open(self.calciumFileName, 'w')
        self.synapticElementsFile = open(self.synapticElementsFileName, 'w')

        print("[INFO] Setup complete.")
开发者ID:UHBiocomputation,项目名称:Butz-vanOoyen2013,代码行数:26,代码来源:ButzVanOoyen2014.py


示例11: test_targets

    def test_targets(self):
        nest.ResetKernel()
        nest.set_verbosity('M_ALL')
        # Testing with 2 MPI processes
        nest.SetKernelStatus(
            {
                'resolution': 0.1,
                'total_num_virtual_procs': 2
            }
        )
        # Update the SP interval
        nest.EnableStructuralPlasticity()
        nest.SetStructuralPlasticityStatus({
            'structural_plasticity_update_interval':
            100,
        })

        growth_curve = {
            'growth_curve': "gaussian",
            'growth_rate': 0.0001,  # Beta (elements/ms)
            'continuous': False,
            'eta': 0.1,
            'eps': 0.7,
        }
        structural_p_elements_E = {
            'Den_ex': growth_curve,
            'Den_in': growth_curve,
            'Axon_ex': growth_curve
        }
        neuronDict = {'V_m': -60.,
                      't_ref': 5.0, 'V_reset': -60.,
                      'V_th': -50., 'C_m': 200.,
                      'E_L': -60., 'g_L': 10.,
                      'E_ex': 0., 'E_in': -80.,
                      'tau_syn_ex': 5., 'tau_syn_in': 10.,
                      'I_e': 220.}

        nest.SetDefaults("iaf_cond_exp", neuronDict)
        neuronsE = nest.Create('iaf_cond_exp', 1, {
            'synaptic_elements': structural_p_elements_E})

        # synapses
        synDictE = {'model': 'static_synapse',
                    'weight': 3.,
                    'pre_synaptic_element': 'Axon_ex',
                    'post_synaptic_element': 'Den_ex'}

        nest.SetStructuralPlasticityStatus({
            'structural_plasticity_synapses': {
                'synapseEE': synDictE,
            }
        })

        try:
            nest.Simulate(200 * 1000)
        except:
            print(sys.exc_info()[0])
            self.fail("Exception during simulation")
开发者ID:gtrensch,项目名称:nest-simulator,代码行数:58,代码来源:mpitest_issue_578_sp.py


示例12: build_and_connect_nodes

    def build_and_connect_nodes(self, sigma, theta):
        """ sets up an erfc neuron and spin detector. """
        nest.set_verbosity('M_WARNING')
        nest.ResetKernel()

        self.neuron = nest.Create('erfc_neuron', 1,
                                  {'sigma': sigma, 'theta': theta})
        self.detector = nest.Create('spin_detector', 1)
        nest.Connect(self.neuron, self.detector)
开发者ID:apeyser,项目名称:nest-simulator,代码行数:9,代码来源:test_erfc_neuron.py


示例13: setUpNetwork

 def setUpNetwork(self, conn_dict=None, syn_dict=None, N1=None, N2=None):
     if N1 == None:
         N1 = self.N1
     if N2 == None:
         N2 = self.N2
     self.pop1 = nest.Create('iaf_neuron', N1)
     self.pop2 = nest.Create('iaf_neuron', N2)
     nest.set_verbosity('M_FATAL')
     nest.Connect(self.pop1, self.pop2, conn_dict, syn_dict)
开发者ID:MogeiWang,项目名称:nest,代码行数:9,代码来源:test_connect_parameters.py


示例14: test_rate_copy_model

    def test_rate_copy_model(self):

        # neuron parameters
        neuron_params = {'tau': 5., 'sigma': 0.}
        drive = 1.5
        weight = 0.5

        # simulation parameters
        simtime = 100.
        dt = 0.001

        nest.set_verbosity('M_WARNING')
        nest.ResetKernel()
        nest.SetKernelStatus(
            {'resolution': dt, 'use_wfr': True, 'print_time': False})

        # set up rate neuron network
        rate_neuron_drive = nest.Create(
            'lin_rate_ipn', params={'mu': drive, 'sigma': 0.})

        rate_neuron_1 = nest.Create(
            'lin_rate_ipn', params=neuron_params)
        rate_neuron_2 = nest.Create(
            'lin_rate_ipn', params=neuron_params)

        multimeter = nest.Create(
            'multimeter', params={
                'record_from': ['rate'],
                'precision': 10,
                'interval': dt})

        # create new connection
        nest.CopyModel('rate_connection_instantaneous', 'rate_connection_new')

        # record rates and connect neurons
        neurons = rate_neuron_1 + rate_neuron_2

        nest.Connect(
            multimeter, neurons, 'all_to_all', {'delay': 10.})

        nest.Connect(rate_neuron_drive, rate_neuron_1,
                     'all_to_all', {'model': 'rate_connection_instantaneous',
                                    'weight': weight})

        nest.Connect(rate_neuron_drive, rate_neuron_2,
                     'all_to_all', {'model': 'rate_connection_new',
                                    'weight': weight})

        # simulate
        nest.Simulate(simtime)

        # make sure rates are identical
        events = nest.GetStatus(multimeter)[0]['events']
        senders = events['senders']
        rate_1 = np.array(events['rate'][np.where(senders == rate_neuron_1)])
        rate_2 = np.array(events['rate'][np.where(senders == rate_neuron_2)])
        assert(np.sum(np.abs(rate_2 - rate_1)) < 1e-12)
开发者ID:gtrensch,项目名称:nest-simulator,代码行数:57,代码来源:test_rate_copy_model.py


示例15: run_protocol

    def run_protocol(self, dt):

        """Set up a network with pre-post spike pairings with t_post - t_pre = dt"""

        nest.set_verbosity("M_WARNING")
        nest.ResetKernel()

        # set pre and postsynaptic spike times
        delay = 1.  # delay for connections
        dspike = 100.  # ISI

        # set the correct real spike times for generators (correcting for delays)
        pre_times = [100., 100. + dspike]
        post_times = [k+dt for k in pre_times]

        # create spike_generators with these times
        pre_spikes = nest.Create("spike_generator", 1, {"spike_times": pre_times})
        post_spikes = nest.Create("spike_generator", 1, {"spike_times": post_times})

        # create parrot neurons and connect spike_generators
        pre_parrot = nest.Create("parrot_neuron", 1)
        post_parrot = nest.Create("parrot_neuron", 1)

        nest.Connect(pre_spikes, pre_parrot, syn_spec={"delay": delay})
        nest.Connect(post_spikes, post_parrot, syn_spec={"delay": delay})

        # create spike detector
        spikes = nest.Create("spike_detector")
        nest.Connect(pre_parrot, spikes)
        nest.Connect(post_parrot, spikes)

        # connect both parrot neurons with a stdp synapse onto port 1
        # thereby spikes transmitted through the stdp connection are
        # not repeated postsynaptically.
        syn_spec = {
           "model": "stdp_synapse",
           "receptor_type": 1,  # set receptor 1 postsynaptically, to not generate extra spikes
        }
        conn_spec = {
           "rule": "one_to_one",
        }
        nest.Connect(pre_parrot, post_parrot, syn_spec=syn_spec, conn_spec=conn_spec)

        # get STDP synapse and weight before protocol
        syn = nest.GetConnections(source=pre_parrot, synapse_model="stdp_synapse")
        syn_status = nest.GetStatus(syn)[0]
        w_pre = syn_status['weight']

        last_time = max(pre_times[-1], post_times[-1])
        nest.Simulate(last_time + 2 * delay)

        # get weight post protocol
        syn_status = nest.GetStatus(syn)[0]
        w_post = syn_status['weight']

        return w_pre, w_post
开发者ID:AidanRocke,项目名称:nest-simulator,代码行数:56,代码来源:test_parrot_neuron.py


示例16: create_network

def create_network(network_obj, weight, JENoise, noise_rate, resolution=0.1,
                   verbose=True, print_time=False):

    ncells = network_obj['ncells']
    ncons = network_obj['ncons']

    if verbose:
        print "Constructing NEST network of %i nodes and %i connections." % (
            ncells, ncons)

    nest.ResetKernel()

    nthreads = cpu_count()

    if verbose:
        nest.set_verbosity('M_INFO')
    else:
        nest.set_verbosity('M_ERROR')

    nest.SetKernelStatus(dict(local_num_threads=nthreads, resolution=0.1,
                              print_time=print_time, overwrite_files=True))

    neuron_params = dict(C_m=1.0, tau_m=20.0, t_ref=2.0, E_L=0.0, V_th=20.0)
    nest.SetDefaults("iaf_neuron", neuron_params)
    neuronsE = nest.Create("iaf_neuron", n=ncells)

    # save GID offset of first neuron - this has the advantage that the output
    # later will be independent of the point at which the neurons were created
    GIDoffset = neuronsE[0]

    espikes = nest.Create("spike_detector")
    nest.ConvergentConnect(neuronsE, espikes)

    noise = nest.Create("poisson_generator", n=1, params=dict(rate=noise_rate))

    # Warning: delay is overwritten later if weights are given!
    nest.SetDefaults("tsodyks_synapse",
                     dict(delay=1.5, tau_rec=500., tau_fac=0., U=0.3))
    nest.CopyModel("tsodyks_synapse", "exc", dict(weight=weight))
    nest.CopyModel("static_synapse", "poisson", dict(weight=JENoise))

    # every neuron gets the same noisy input???
    nest.DivergentConnect(noise, neuronsE, model="poisson")

    for node in network_obj['nodes']:

        presyn_index = node['id']
        postsyn_indices = node['connectedTo']

        nest.DivergentConnect(
            [neuronsE[presyn_index]],                   # from, list of len 1
            [neuronsE[ii] for ii in postsyn_indices],   # to, list
            model='exc',                                # synapse model
        )

    return ncells, ncons, neuronsE, espikes, noise, GIDoffset
开发者ID:alimuldal,项目名称:konnectomics-public,代码行数:56,代码来源:fake_spikes.py


示例17: nestSetup

 def nestSetup(self):
     """Common nest stuff."""
     # NEST stuff
     nest.ResetKernel()
     nest.set_verbosity('M_INFO')
     nest.SetKernelStatus(
         {
             'resolution': self.dt
         }
         )
开发者ID:UHBiocomputation,项目名称:Butz-vanOoyen2013,代码行数:10,代码来源:ButzVanOoyen2014.py


示例18: setUp

 def setUp(self):
     nest.ResetKernel()
     nest.set_verbosity("M_ERROR")
     self.exclude_synapse_model = [
         "stdp_dopamine_synapse",
         "stdp_dopamine_synapse_lbl",
         "stdp_dopamine_synapse_hpc",
         "stdp_dopamine_synapse_hpc_lbl",
         "gap_junction",
         "gap_junction_lbl",
     ]
开发者ID:Silmathoron,项目名称:nest-simulator,代码行数:11,代码来源:test_disconnect.py


示例19: test_ParrotNeuronIncomingMultiplicity

    def test_ParrotNeuronIncomingMultiplicity(self):
        """
        Check parrot_neuron heeds multiplicity information in incoming spikes.

        This test relies on the fact that poisson_generator transmits
        multiple spikes during a time step using multiplicity, and that 
        these spikes are delivered directly, i.e., without multiplicity-
        unrolling in send_remote().
        
        We create a high-rate poisson_generator. If parrot_neuron
        ignored multiplicity, it would only transmit one spike per time
        step. We chain two parrot_neurons to check against any loss.
        
        Note: Even though we test parrot_neuron_ps, we drive it with the
        plain poisson_generator, since only that generator uses multiplicity.
        """

        # set up source spike generator, as well as parrot neurons
        h = 0.1  # ms
        rate = 1000000.  # spikes / s
        delay = 1.  # ms
        t_base = 1000.  # ms
        t_sim = t_base + 3 * delay  # after t_sim, spikes from t_base arrived
        spikes_expected = rate * t_base / 1000.
        spikes_std = math.sqrt(spikes_expected)

        # if the test is to be meaningful we must expect signficantly more
        # spikes than time steps
        assert spikes_expected - 3 * spikes_std > 10. * t_sim / h, \
               "Internal inconsistency: too few spikes."

        nest.set_verbosity('M_WARNING')
        nest.ResetKernel()
        nest.SetKernelStatus({
            'resolution': h,
            'grng_seed': 123,
            'rng_seeds': [456]
        })

        source = nest.Create('poisson_generator', params={'rate': rate})
        parrots = nest.Create('parrot_neuron_ps', 2)
        detect = nest.Create('spike_detector', params={'precise_times': True})

        nest.Connect(source, parrots[:1], syn_spec={'delay': delay})
        nest.Connect(parrots[:1], parrots[1:], syn_spec={'delay': delay})
        nest.Connect(parrots[1:], detect)

        nest.Simulate(_round_up(t_sim))

        n_spikes = nest.GetStatus(detect)[0]['n_events']
        assert n_spikes > spikes_expected - 3 * spikes_std, \
               "parrot_neuron loses spikes."
        assert n_spikes < spikes_expected + 3 * spikes_std, \
               "parrot_neuron adds spikes."
开发者ID:jgarridoalcazar,项目名称:nest-simulator,代码行数:54,代码来源:test_parrot_neuron_ps.py


示例20: setUp

 def setUp(self):
     nest.ResetKernel()
     nest.set_verbosity('M_ERROR')
     self.exclude_synapse_model = [
         'stdp_dopamine_synapse',
         'stdp_dopamine_synapse_lbl',
         'stdp_dopamine_synapse_hpc',
         'stdp_dopamine_synapse_hpc_lbl',
         'gap_junction',
         'gap_junction_lbl'
     ]
开发者ID:DimitriPlotnikov,项目名称:nest-simulator,代码行数:11,代码来源:test_disconnect_multiple.py



注:本文中的nest.set_verbosity函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python nest.sli_run函数代码示例发布时间:2022-05-27
下一篇:
Python io.read_sequences函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap