Lab 1: Simple LIF Neuron Models in PyNN and Nest
undone tell them how to get the virtual box running
- Just run lab1.py (python3 lab1.py from a shell).
- Get lab1.py or
lab1py.txt and rename it lab1.py.
- (python3 lab1.py from a shell).
- Have a look through the code. For now you can ignore comments
and functions.
- 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).
Print out the spikes
- Get printPk1Spikes.py or
printPklSpikespy.txt
(python3 printPklSpikes.py lab1Spikes.pkl). Nothing.
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.
Comment out the cells.inject line and comment int the cells[0] line.
printPklSpikes should give you 1 spike.
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.
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.
Change the timestep (comment in the 0.1). See how there are more spikes
and the voltage change is different.
Try with a different reset (comment change step 7).
Explore different parameter settings, input values, and neuron models.