Skip to content

Support retrieving the current value of state variables without recording #390

Open

Description

@apdavison

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.

Activity

  1. added this to the future milestone on Jan 6, 2016
  2. added a commit that references this issue on Mar 13, 2017
  3. ruthvik92 commented on Jul 26, 2017

    @ruthvik92

    Hello,
    Does the current version has this feature?

  4. apdavison commented on Jul 29, 2017

    @apdavison
    MemberAuthor

    No, this has not yet been implemented.

  5. ruthvik92 commented on Aug 8, 2017

    @ruthvik92

    Any idea about when this feature will be released? May be I could try looking into this if this is not a juggernaut task.

  6. apdavison commented on Aug 8, 2017

    @apdavison
    MemberAuthor

    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.
  7. ruthvik92 commented on Aug 23, 2017

    @ruthvik92

    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.

  8. modified the milestones: future, 1.0 on Apr 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions