pupil#
Types specifically for carrying and manipulating pupil measurements
- class perceptivo.types.pupil.Pupil(ellipse: perceptivo.types.units.Ellipse, frame: perceptivo.types.video.Frame)#
Bases:
object
A single-frame measurement of a pupil
- Variables
ellipse (
Ellipse
) – Fit ellipse given frameparams (
Pupil_Params
) – Pupil parameterization!
- ellipse: perceptivo.types.units.Ellipse#
- class perceptivo.types.pupil.Pupil_Params(threshold: float, max_diameter: float)#
Bases:
object
Parameters to use with
video.pupil.PupilExtractor
classes to parameterize- Variables
- class perceptivo.types.pupil.Dilation(params: perceptivo.types.pupil.Pupil_Params, pupils: List[perceptivo.types.pupil.Pupil], timestamps: List[datetime.datetime])#
Bases:
object
A timeseries of pupil diameters and timestamps corresponding to a pupil dilation event
- Variables
ellipses (List[Pupil]) – List of ellipses from a pupil measurement
timestamps (List[datetime.datetime]) – List of timestamps of equal length to
ellipses
sound (
types.sound.Sound
) – Sound that was presented for this pupil response
- Properties:
max_diameter (float): maximum diameter reached during a given sample diameters (typing.List[float]): List of diameters in pixels of equal length to
timestamps
response (bool): True/False whether the sound was heard, calculated by dividingthe maximum measured pupil dilation in pixels / maximum possible dilation in pixels and comparing to the detection threshold. Aka (
Dilation.max_diameter
/Pupil_Params.max_diameter
) >Pupil_Params.threshold
- pupils: List[perceptivo.types.pupil.Pupil]#
- timestamps: List[datetime.datetime]#