Package ca.nengo.util

Examples of ca.nengo.util.Probe


            network.addProjection(input.getOrigin(FunctionInput.ORIGIN_NAME), ensemble.getTermination("input"));

//          Probe vProbe = network.getSimulator().addProbe("ensemble", 0, "V", true);
//          Probe nProbe = network.getSimulator().addProbe("ensemble", 0, "N", true);
//          Probe iProbe = network.getSimulator().addProbe("ensemble", 0, "I", true);
            Probe rProbe = network.getSimulator().addProbe("ensemble", "rate", true);

            network.setMode(SimulationMode.RATE);
            network.run(0, 1);

//          Plotter.plot(ensemble.getSpikePattern());
//          Plotter.plot(vProbe.getData(), "V");
//          Plotter.plot(nProbe.getData(), "N");
//          Plotter.plot(iProbe.getData(), "I");
            Plotter.plot(rProbe.getData(), "Rate");

        } catch (StructuralException e) {
            e.printStackTrace();
        } catch (SimulationException e) {
            e.printStackTrace();
View Full Code Here


    Network network = new NetworkImpl();
    network.addNode(input);
    network.addNode(neuron);
    network.addProjection(input.getOrigin(FunctionInput.ORIGIN_NAME), t);
   
    Probe v = network.getSimulator().addProbe("neuron", IzhikevichSpikeGenerator.V, true);
    Probe u = network.getSimulator().addProbe("neuron", IzhikevichSpikeGenerator.U, true);
   
    network.run(0, 1);
   
    Plotter.plot(v.getData(), "voltage");
    Plotter.plot(u.getData(), "recovery");
  }
View Full Code Here

    FunctionInput fin = new FunctionInput("fin", new Function[]{new ConstantFunction(1,0)}, Units.UNK);
    net.addNode(fin);
   
    net.addProjection(fin.getOrigin("origin"), a.getTermination("input"));
   
    Probe p = net.getSimulator().addProbe("a", "rate", true);
   
    net.getSimulator().run(0.0f, 1.0f, 0.001f);
   
    float[][] results1 = p.getData().getValues();
   
    net.reset(false);
   
    net.getSimulator().run(0.0f, 1.0f, 0.001f);
   
    float[][] results2 = p.getData().getValues();
   
    for(int i=0; i < results1.length; i++)
      for(int j=0; j < results1[i].length; j++)
        TestUtil.assertClose(results1[i][j], results2[i][j], 0.0001f);
   
View Full Code Here

    network.addProjection(input.getOrigin(FunctionInput.ORIGIN_NAME), interm);
    Thread.sleep(500);
    /*
     * Add probes
     */
    Probe integratorXProbe = network.getSimulator().addProbe("integrator", NEFEnsemble.X, true);
    Thread.sleep(500);
    /*
     * Test adding removing probes
     */
    network.getSimulator().removeProbe(integratorXProbe);
 
View Full Code Here

    Thread.sleep(500);

    /*
     * Add probes
     */
    Probe integratorXProbe = network.getSimulator().addProbe("integrator",
        NEFEnsemble.X, true);
    Thread.sleep(500);
    /*
     * Test adding removing probes
     */
 
View Full Code Here

TOP

Related Classes of ca.nengo.util.Probe

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.