neuralib.facemap.core.FaceMapResult

class neuralib.facemap.core.FaceMapResult[source]

Bases: object

Facemap result container

__init__(svd, meta, data, with_keypoints)[source]
Parameters:
  • svd (SVDVariables | None) – attr:~neuralib.tracking.facemap.core.SVDVariables

  • meta (KeyPointsMeta | None) – attr:~neuralib.tracking.facemap.core.KeyPointsMeta

  • data (Group | None) – facemap data result

  • with_keypoints (bool) – whether it has keypoint tracking

Methods

__init__(svd, meta, data, with_keypoints)

from_directory(directory)

init class loading from a directory

get(*keypoint)

get keypoint(s) dataframe

get_blink()

eye blinking array.

get_pupil()

pupil tracking result

get_pupil_area()

pupil area.

get_pupil_center_of_mass()

center of mass of pupil tracking.

get_pupil_location_movement()

Calculate the Euclidean distance from the origin for each point in a 2D array.

Attributes

keypoints

list of all keypoint name

with_keypoint

__init__(svd, meta, data, with_keypoints)[source]
Parameters:
  • svd (SVDVariables | None) – attr:~neuralib.tracking.facemap.core.SVDVariables

  • meta (KeyPointsMeta | None) – attr:~neuralib.tracking.facemap.core.KeyPointsMeta

  • data (Group | None) – facemap data result

  • with_keypoints (bool) – whether it has keypoint tracking

classmethod from_directory(directory)[source]

init class loading from a directory

Parameters:

directory (str | Path | PathLike[str]) – Facemap output directory

Return type:

Self

property with_keypoint: bool
get_pupil()[source]

pupil tracking result

Raises:

RuntimeError – If no pupil data is available.

Return type:

PupilDict

get_pupil_area()[source]

pupil area. Array[float, F]

Return type:

ndarray

get_pupil_center_of_mass()[source]

center of mass of pupil tracking. Array[float, [F, 2]]

Return type:

ndarray

get_pupil_location_movement()[source]

Calculate the Euclidean distance from the origin for each point in a 2D array. Array[float, F]

Return type:

ndarray

eye blinking array. Array[float, F]

Raises:

RuntimeError – If no blink data is available.

Return type:

ndarray

property keypoints: list[str]

list of all keypoint name

get(*keypoint)[source]

get keypoint(s) dataframe

Return type:

KeyPointDataFrame