Esempio n. 1
0
def stub_simulation(mat_out, data_params={}, input_params={},
        topology_params={}, latency=1.0):
    # Build the output spike trains
    trains, _, _ = NetworkBuilder.build_spike_trains(mat_out, time_offs=latency,
            input_params=input_params, topology_params=topology_params)

    # Encapsulate the perfect spike trains in the PyNNLess output format, add
    # empty elements for the input populations
    data_params = DataParameters(data_params)
    nin = (data_params["n_bits_in"]
            * TopologyParameters(topology_params)["multiplicity"])
    return ([{}, {"spikes": [train for train in trains]}])
Esempio n. 2
0
def stub_simulation(mat_out,
                    data_params={},
                    input_params={},
                    topology_params={},
                    latency=1.0):
    # Build the output spike trains
    trains, _, _ = NetworkBuilder.build_spike_trains(
        mat_out,
        time_offs=latency,
        input_params=input_params,
        topology_params=topology_params)

    # Encapsulate the perfect spike trains in the PyNNLess output format, add
    # empty elements for the input populations
    data_params = DataParameters(data_params)
    nin = (data_params["n_bits_in"] *
           TopologyParameters(topology_params)["multiplicity"])
    return ([{}, {"spikes": [train for train in trains]}])