single_cell_parsercellPySection_get_seg_conductance

PySection._get_seg_conductance

single_cell_parser.cell.PySection._get_seg_conductance(seg, var, param_name)

Get the conductance of a segment.

Given a segment and a variable name, this function retrieves the conductance of the specified variable in the segment.

Parameters:
  • seg (nrn.Segment) – The segment to retrieve the conductance from.

  • var (str) – The variable name of the mechanism e.g. NaTa_t.

  • param_name (str) – The parameter name of the mechanism e.g. gNaTa_tbar.

Returns:

The conductance of the specified variable in the segment.

Return type:

float

Raises:
  • ValueError – If the segment does not have the specified variable.

  • AssertionError – If the segment is not an instance of nrn.Segment.