Module eyekit.tools
Miscellaneous utility functions.
Functions
def align_to_screenshot(text_block, screenshot_path, *, output_path=None, show_text=True, show_guide_lines=True, show_bounding_boxes=False)
-
Given a
TextBlock
and the path to a PNG screenshot file, produce an image showing the original screenshot overlaid with the text block (shown in green). If no output path is provided, the output image is written to the same directory as the screenshot file. This is useful for establishingTextBlock
parameters (position, font size, etc.) that match what participants actually saw in your experiment. def font_size_at_72dpi(font_size, at_dpi=96)
-
Convert a font size at some dpi to the equivalent font size at 72dpi. Typically, this can be used to convert a Windows-style 96dpi font size to the equivalent size at 72dpi.
def discard_short_fixations(fixation_sequence, threshold=50)
-
Deprecated in 0.4. Use
FixationSequence.discard_short_fixations()
. def discard_out_of_bounds_fixations(fixation_sequence, text_block, threshold=100)
-
Deprecated in 0.4. Use
FixationSequence.discard_out_of_bounds_fixations()
. def snap_to_lines(fixation_sequence, text_block, method='warp', **kwargs)
-
Deprecated in 0.4. Use
FixationSequence.snap_to_lines()
.