hocvar

Access and test hoc variables.

AUTHORS:

  • THOMAS MCTAVISH (2010-04-05): initial version

EXAMPLES:

Retrieve the variables associated with an object:

>>>vars = get_variables(hoc, obj)
neuronpy.util.hocvar.get_variables(hoc, obj, vartype=0)[source]

Get the variables associated with an object.

Parameters:
  • hoc – is a hoc object such as would be obtained when importing neuron.
  • obj – is the object from which to retrieve its variable names. This can be a Section, Segment, Mechanism, or Point Process
  • vartype

    If vartype = 1, 2, or 3, the storage is for PARAMETER, ASSIGNED, or STATE variables respectively. If vartype = 0, the storage is for all three types.

    If vartype = -1, the count and names (and array size) of the GLOBAL variables are accessible, but any other method will generate an error message.

http://www.neuron.yale.edu/neuron/static/docs/help/neuron/neuron/classes/mechstan.html

Returns:a dict object where the keys are the names of the variables and the value is filled with the value.
neuronpy.util.hocvar.get_variables_from_mechanism(hoc, obj, vartype=0)[source]

Get the variables associated with a hoc object.

Parameters:
  • hoc – is a hoc object such as would be obtained when importing neuron.
  • obj – is the Mechanism or Point Process object from which to retrieve its variable names.
  • vartype

    If vartype = 1, 2, or 3, the storage is for PARAMETER, ASSIGNED, or STATE variables respectively. If vartype = 0, the storage is for all three types.

    If vartype = -1, the count and names (and array size) of the GLOBAL variables are accessible, but any other method will generate an error message.

http://www.neuron.yale.edu/neuron/static/docs/help/neuron/neuron/classes/mechstan.html

Returns:a dict object where the keys are the names of the variables and the value is filled with the value.
neuronpy.util.hocvar.get_variables_from_object(hoc, obj, vartype=0)[source]

Get the variables associated with a hoc object.

Parameters:
  • hoc – is a hoc object such as would be obtained when importing neuron.
  • obj – is the HocObject object from which to retrieve its variable names.
  • vartype

    If vartype = 1, 2, or 3, the storage is for PARAMETER, ASSIGNED, or STATE variables respectively. If vartype = 0, the storage is for all three types.

    If vartype = -1, the count and names (and array size) of the GLOBAL variables are accessible, but any other method will generate an error message.

http://www.neuron.yale.edu/neuron/static/docs/help/neuron/neuron/classes/mechstan.html

Returns:a dict object where the keys are the names of the variables and the value is filled with the value.
neuronpy.util.hocvar.get_variables_from_section(hoc, obj, vartype=0)[source]

Get the variables associated with a segment.

Parameters:
  • hoc – is a hoc object such as would be obtained when importing neuron.
  • obj – is the Section object from which to retrieve its variable names.
  • vartype

    If vartype = 1, 2, or 3, the storage is for PARAMETER, ASSIGNED, or STATE variables respectively. If vartype = 0, the storage is for all three types.

    If vartype = -1, the count and names (and array size) of the GLOBAL variables are accessible, but any other method will generate an error message.

http://www.neuron.yale.edu/neuron/static/docs/help/neuron/neuron/classes/mechstan.html

Returns:a dict object where the keys are the names of the variables and the value is filled with the value.
neuronpy.util.hocvar.get_variables_from_segment(hoc, obj, vartype=0)[source]

Get the variables associated with a segment.

Parameters:
  • hoc – is a hoc object such as would be obtained when importing neuron.
  • obj – is the Segment object from which to retrieve its variable names.
  • vartype

    If vartype = 1, 2, or 3, the storage is for PARAMETER, ASSIGNED, or STATE variables respectively. If vartype = 0, the storage is for all three types.

    If vartype = -1, the count and names (and array size) of the GLOBAL variables are accessible, but any other method will generate an error message.

http://www.neuron.yale.edu/neuron/static/docs/help/neuron/neuron/classes/mechstan.html

Returns:a dict object where the keys are the names of the variables and the value is filled with the value.

Previous topic

hoctranslate

Next topic

listutil

This Page