neuralib.atlas.brainrender.probe.ProbeShank

class neuralib.atlas.brainrender.probe.ProbeShank[source]

Bases: object

shank reconstruction class

__init__(dorsal, ventral, bg)[source]
Parameters:
  • dorsal (ndarray) – Array[float, 3 | [S, 3]]

  • ventral (ndarray) – Array[float, 3 | [S, 3]]

  • bg (BrainGlobeAtlas) – BrainGlobeAtlas

Methods

__init__(dorsal, ventral, bg)

as_theoretical(depth[, interval, ...])

as theoretical array

interp([interp_range, ret_type])

extend_depth foreach shank

load_csv(file, plane_type, bg[, verbose])

Load from csv file

load_numpy(file, bg)

Load numpy array.

map_brainrender()

map allen ccf brain space to brainrender

Attributes

n_shanks

number of shanks

__init__(dorsal, ventral, bg)[source]
Parameters:
  • dorsal (ndarray) – Array[float, 3 | [S, 3]]

  • ventral (ndarray) – Array[float, 3 | [S, 3]]

  • bg (BrainGlobeAtlas) – BrainGlobeAtlas

classmethod load_numpy(file, bg)[source]

Load numpy array. Array[float, [2, 3] | [S, 2, 3]]

S = Number of shanks. If 2D then single shank 2 = Dorsal and ventral 3 = AP, DV, ML coordinates

Parameters:
  • file (str | Path | PathLike[str])

  • bg (BrainGlobeAtlas)

Return type:

Self

classmethod load_csv(file, plane_type, bg, verbose=True)[source]

Load from csv file

Parameters:
  • file (str | Path | PathLike[str]) – csv file

  • plane_type (Literal['coronal', 'sagittal', 'transverse']) – {‘coronal’, ‘sagittal’, ‘transverse’}

  • bg (BrainGlobeAtlas) – BrainGlobeAtlas

  • verbose (bool)

Returns:

Return type:

Self

property n_shanks: int

number of shanks

map_brainrender()[source]

map allen ccf brain space to brainrender

Return type:

Self

interp(interp_range=None, ret_type=<class 'numpy.ndarray'>)[source]

extend_depth foreach shank

Parameters:
  • interp_range (tuple[float, float] | None)

  • ret_type (type) – if as list, then list[Array[float, [P, 3]]]. if numpy array Array[float, [P * S, 3]]

Returns:

list[Array[float, [P, 3]]] | Array[float, [P * S, 3]]

Return type:

list[ndarray] | ndarray

as_theoretical(depth, interval=None, remove_outside_brain=True)[source]

as theoretical array

Parameters:
  • depth (int) – implanted depth

  • interval (int | None) – interval between shanks

  • remove_outside_brain (bool) – remove the point outside the brain

Returns:

Return type:

ndarray