You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support retrieving the current value of state variables without recording #390
I propose to extend the get() method of Population, PopulationView and Assembly to allow returning the current value of state variables, such as the membrane potential.
There is no particular timeline for implementing this. I would be happy for you to look into it.
A few suggestions for the implementation:
in the definition for common.Population.get(), you will see that the parameters are retrieved through a private method _get_parameter_dict(), which then calls _get_parameters(). The latter method is implemented separately for each simulator, i.e. as neuron.Population._get_parameters(), nest.Population._get_parameters(), etc.
to retrieve state variables through Population.get(), I suggest first creating a method _get_state_variables() for each simulator Population class.
implementing _get_state_variables() should be quite simple
for NEURON, something like [cell._cell.v for cell in population.all_cells] will give you the values of v for a whole population
for NEST, the equivalent is nest.GetStatus(p.all_cells.tolist(), 'V_m')
for Brian, I don't remember off the top of my head how to access the state variables, but I think it's quite simple
you will have to take care of translating variable names (e.g. 'v' --> 'V_m' for NEST) and units (e.g. pA --> nA for currents in NEST). The information needed for this is mostly in the celltype definitions in standardmodels.cells or in nest.recording, etc.
I wrote a few lines of code as you suggested, I tested it with Neuron and I could read the membrane potentials. I haven't tried it with Brian or Nest. Thank you for your valuable insights.
Activity
NeuralEnsemble#390
ruthvik92 commentedon Jul 26, 2017
Hello,
Does the current version has this feature?
apdavison commentedon Jul 29, 2017
No, this has not yet been implemented.
ruthvik92 commentedon Aug 8, 2017
Any idea about when this feature will be released? May be I could try looking into this if this is not a juggernaut task.
apdavison commentedon Aug 8, 2017
There is no particular timeline for implementing this. I would be happy for you to look into it.
A few suggestions for the implementation:
common.Population.get(), you will see that the parameters are retrieved through a private method_get_parameter_dict(), which then calls_get_parameters(). The latter method is implemented separately for each simulator, i.e. asneuron.Population._get_parameters(),nest.Population._get_parameters(), etc.Population.get(), I suggest first creating a method_get_state_variables()for each simulatorPopulationclass._get_state_variables()should be quite simple[cell._cell.v for cell in population.all_cells]will give you the values ofvfor a whole populationnest.GetStatus(p.all_cells.tolist(), 'V_m')standardmodels.cellsor innest.recording, etc.ruthvik92 commentedon Aug 23, 2017
I wrote a few lines of code as you suggested, I tested it with Neuron and I could read the membrane potentials. I haven't tried it with Brian or Nest. Thank you for your valuable insights.