neuralib.atlas.brainrender.probe

class neuralib.atlas.brainrender.probe.ProbeRenderCLI[source]
DESCRIPTION: str = 'Probe track reconstruction'

parser description.

GROUP_PROBE = 'Probe Option'
implant_depth: int

implant depth in um

shank_interval: int | None

shank interval in um if multi-shank

dye_label_only: bool

only show the histology dye parts

remove_outside_brain: bool

remove reconstruction outside the brain

file: Path

multi-shank npy or csv file to be inferred

plane_type: Literal['coronal', 'sagittal', 'transverse']

cutting orientation to infer the multi-shank label point/probe_idx

post_parsing()[source]

called when all argument attributes are set but before run().

It is used for a common operation for a common option class, for example, checking arguments before doing things.

run()[source]

called when all argument attributes are set

render()[source]
class neuralib.atlas.brainrender.probe.ProbeShank[source]
__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 | bytes | BinaryIO | BufferedIOBase | BufferedReader)

  • bg (BrainGlobeAtlas)

Return type:

Self

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

infer

Parameters:
  • file (str | Path | bytes | BinaryIO | BufferedIOBase | BufferedReader)

  • plane_type (Literal['coronal', 'sagittal', 'transverse'])

  • bg (BrainGlobeAtlas)

  • verbose (bool)

Return type:

Self

property n_shanks: int
map_brainrender()[source]
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]
Parameters:
  • depth (int)

  • interval (int | None)

  • remove_outside_brain (bool)

Return type:

ndarray