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.

VecStim(pattern=None, *args, **kwargs)[source]
load_extension(extension)[source]
property time
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(pattern=None, **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=None)[source]
insert(*args, **kwargs)[source]
record(x=None)[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.VecStim(*args, **kwargs)[source]

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

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

Bases: patch.objects.PythonHocObject

record(target, *args, **kwargs)[source]
class patch.objects.connectable[source]

Bases: object

Module contents

patch.connection(source, target, strict=True)[source]
patch.get_data_file(*dirs)[source]

Retrieve a file from the data directory that is installed together with the package.