MaskPolicy#
- class pypillometry.MaskPolicy(layers=(), unless=(), nan=True, name=None)[source]#
Bases:
objectWhich samples count as unusable (masked).
A sample is masked if its value is NaN (with nan), or if one of the layers is set and none of the layers in unless is set. Recording-wide layers (e.g.,
"excluded") mask a sample regardless of unless.The predefined policies are in POLICIES:
"default"(NaN, blinks, off-screen gaze, eye divergences, user masks and excluded periods are masked; interpolated samples are used),"strict"(interpolated samples are masked too) and"raw"(nothing is masked, not even NaN). All processing and analysis methods take the policy as their policy argument.- Parameters:
Examples
>>> d.mask("left", "pupil", policy=MaskPolicy(["blink"]))
Details