neuralib.imaging.fov.ObjectiveFov

class neuralib.imaging.fov.ObjectiveFov[source]

Bases: object

Class for 2P Field Of View coordinates

Use IBL coordinates space

AP (+), anterior to the Bregma. (-) posterior to the Bregma

ML (+), right hemisphere. (-) left hemisphere
region_name: str

FOV name

am: ndarray

anteromedial (default in mm). Array[float, 2] in XY

pm: ndarray

posteromedial (default in mm). Array[float, 2] in XY

al: ndarray

anterolateral (default in mm). Array[float, 2] in XY

pl: ndarray

posterolateral (default in mm). Array[float, 2] in XY

rotation_angle_ml: float

objective ml direction rotation in deg

rotation_angle_ap: float

objective ap direction rotation in deg

unit: Literal['mm', 'um']
__init__(region_name, am, pm, al, pl, *, rotation_angle_ml=0, rotation_angle_ap=0, unit='mm')

Method generated by attrs for class ObjectiveFov.

Parameters:
  • region_name (str)

  • am (ndarray)

  • pm (ndarray)

  • al (ndarray)

  • pl (ndarray)

  • rotation_angle_ml (float)

  • rotation_angle_ap (float)

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

Return type:

None

property ap_distance: float

anterior to posterior distance of the FOV

property ml_distance: float

medial to lateral distance of the FOV

to_um()[source]

unit from mm to um

Return type:

Self

ap_invert()[source]

anterior posterior coordinates invert

Return type:

Self

ml_invert()[source]

medial lateral coordinates invert

Return type:

Self

invert_axis()[source]

invert both ap and ml axes

Return type:

Self

to_polygon(**kwargs)[source]

coordinates to matplotlib.patches.Polygon

Return type:

Polygon