neuralib.imaging.cellular.CellularCoordinates

final class neuralib.imaging.cellular.CellularCoordinates[source]

Bases: object

Container with coordinates information (in mm) for each ROIs

Dimension parameters:

N: number of neurons

P: number of plane types

__init__(neuron_idx, ap, ml, *, plane_index=None, source_plane_index=None, value=None, unit='mm')

Method generated by attrs for class CellularCoordinates.

Parameters:
  • neuron_idx (ndarray)

  • ap (ndarray)

  • ml (ndarray)

  • plane_index (int | ndarray | None)

  • source_plane_index (ndarray | None)

  • value (ndarray | None)

  • unit (Literal['mm', 'um'])

Return type:

None

Methods

__init__(neuron_idx, ap, ml, *[, ...])

Method generated by attrs for class CellularCoordinates.

ap_rotate()

check(attribute, value)

in_relative_bregma(fov)

TODO check register cellular coordinates to IBL coordinates space

ml_rotate(x, y, deg)

calculate the values for x axis rotation

to_um()

unit from mm to um

with_selection(mask)

masking for cell selection

with_value(value)

assign value for CellularCoordinates

Attributes

neuron_idx

neuron index.

ap

anterior posterior coordinates (default in mm).

ml

medial lateral coordinates (default in mm).

plane_index

optic plane index.

source_plane_index

neuron's corresponding image plane.

value

metric (i.e., used in topographical analysis).

unit

unit of the coordinates.

neuron_idx: ndarray

neuron index. Array[float, N]

ap: ndarray

anterior posterior coordinates (default in mm). Array[float, N]

ml: ndarray

medial lateral coordinates (default in mm). Array[float, N]

plane_index: int | ndarray | None

optic plane index. i.e., used for depth analysis. If array type, Array[int, P]

source_plane_index: ndarray | None

neuron’s corresponding image plane. Array[float, N]

value: ndarray | None

metric (i.e., used in topographical analysis). Array[float, N]

unit: Literal['mm', 'um']

unit of the coordinates. {‘mm’, ‘um’}

__init__(neuron_idx, ap, ml, *, plane_index=None, source_plane_index=None, value=None, unit='mm')

Method generated by attrs for class CellularCoordinates.

Parameters:
  • neuron_idx (ndarray)

  • ap (ndarray)

  • ml (ndarray)

  • plane_index (int | ndarray | None)

  • source_plane_index (ndarray | None)

  • value (ndarray | None)

  • unit (Literal['mm', 'um'])

Return type:

None

check(attribute, value)[source]
to_um()[source]

unit from mm to um

Return type:

Self

with_value(value)[source]

assign value for CellularCoordinates

Parameters:

value (ndarray) – value array for the corresponding coordinates. Array[float, N]

Returns:

Return type:

Self

with_selection(mask)[source]

masking for cell selection

Parameters:

mask (ndarray) – numpy bool array. Array[bool, N]

Return type:

Self

in_relative_bregma(fov)[source]

TODO check register cellular coordinates to IBL coordinates space

Parameters:

fov (ObjectiveFov) – ObjectiveFov

Return type:

Self

static ml_rotate(x, y, deg)[source]

calculate the values for x axis rotation

Parameters:
  • x (ndarray) – coordinate x. Array[float, N]

  • y (ndarray) – coordinate Y. Array[float, N]

  • deg (float) – rotation degree

Returns:

value to be subtracted. dx (N,) and dy (N,)

Return type:

tuple[ndarray, ndarray]

static ap_rotate()[source]