CST 4157 Page The Next Page
Middlesex Logo

Lab 1: Simple LIF Neuron Models in PyNN and Nest

undone tell them how to get the virtual box running

  1. Just run lab1.py (python3 lab1.py from a shell).
    1. Get lab1.py or lab1py.txt and rename it lab1.py.
    2. (python3 lab1.py from a shell).
    3. Have a look through the code. For now you can ignore comments and functions.
    4. The basic structure of standalone pynn files is usually initialize, make neurons and inputs, (generally record), make synapses, run, and then write the output (assuming record).
  2. Print out the spikes
    1. Get printPk1Spikes.py or printPklSpikespy.txt
    2. (python3 printPklSpikes.py lab1Spikes.pkl). Nothing.
    3. Comment in the dCSource and cells.inject line. Then run the printPkl line again. This should give you two spikes, one from each of the neurons.
  3. Comment out the cells.inject line and comment int the cells[0] line. printPklSpikes should give you 1 spike.
  4. Comment out the DCSource calls (steps 2 and 3). Run the code, then the printPklSpikes and see how you get 8 spikes, and how the times change.
  5. Now run lab1a.py or lab1apy.txt. This is largely the same thing (with a spike source) as lab1. Look at the png. file that is generated.
  6. Change the timestep (comment in the 0.1). See how there are more spikes and the voltage change is different.
  7. Try with a different reset (comment change step 7).
  8. Explore different parameter settings, input values, and neuron models.