patch package

patch.core module

patch.core.transform(obj)[source]

Transforms an object to its NEURON representation, if the __neuron__ magic method is present.

patch.core.transform_netcon(obj)[source]
patch.core.transform_record(obj)[source]

patch.interpreter module

class patch.interpreter.PythonHocInterpreter[source]

Bases: object

NetCon(source, target, *args, **kwargs)[source]
PointProcess(factory, target, *args, **kwargs)[source]

Creates a point process from a h.MyMechanism factory.

Parameters
  • factory (function) – A point process method from the HocInterpreter.

  • target (objects.Segment) – The Segment this point process has to be inserted into.

wrap(factory, name)[source]

patch.objects module

class patch.objects.NetCon(interpreter, ptr)[source]

Bases: patch.objects.PythonHocObject

class patch.objects.NetStim(*args, **kwargs)[source]

Bases: patch.objects.PythonHocObject, patch.objects.connectable

class patch.objects.PointProcess(*args, **kwargs)[source]

Bases: patch.objects.PythonHocObject, patch.objects.connectable

Wrapper for all point processes (membrane and synapse mechanisms). Use PythonHocInterpreter.PointProcess to construct these objects.

stimulate(**kwargs)[source]
class patch.objects.PythonHocObject(interpreter, ptr)[source]

Bases: object

class patch.objects.Section(*args, **kwargs)[source]

Bases: patch.objects.PythonHocObject, patch.objects.connectable

add_3d(points, diameters=None)[source]

Add a new 3D point to this section xyz data.

Parameters
  • points – A 2D array of xyz points.

  • diameters (float or array) – A scalar or array of diameters corresponding to the points. Default value is the section diameter.

connect(target, *args, **kwargs)[source]
connect_points(target, x=0.5)[source]
insert(*args, **kwargs)[source]
record(x=0.5)[source]
set_dimensions(length, diameter)[source]
set_segments(segments)[source]
wholetree()[source]
class patch.objects.Segment(*args, **kwargs)[source]

Bases: patch.objects.PythonHocObject, patch.objects.connectable

class patch.objects.Vector(interpreter, ptr)[source]

Bases: patch.objects.PythonHocObject

record(target)[source]
class patch.objects.connectable[source]

Bases: object

Module contents

patch.connection(source, target)[source]