MCPcopy Index your code
hub / github.com/mne-tools/mne-python / _check_calibration

Function _check_calibration

mne/preprocessing/eyetracking/utils.py:11–25  ·  view source on GitHub ↗
(
    calibration, want_keys=("screen_size", "screen_resolution", "screen_distance")
)

Source from the content-addressed store, hash-verified

9
10
11def _check_calibration(
12 calibration, want_keys=("screen_size", "screen_resolution", "screen_distance")
13):
14 missing_keys = []
15 for key in want_keys:
16 if calibration.get(key, None) is None:
17 missing_keys.append(key)
18
19 if missing_keys:
20 raise KeyError(
21 "Calibration object must have the following keys with valid values:"
22 f" {', '.join(missing_keys)}"
23 )
24 else:
25 return True
26
27
28def get_screen_visual_angle(calibration):

Callers 3

get_screen_visual_angleFunction · 0.85
convert_unitsFunction · 0.85
plot_gazeFunction · 0.85

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected