MCPcopy
hub / github.com/mne-tools/mne-python / _check_time_unit

Function _check_time_unit

mne/viz/utils.py:2175–2184  ·  view source on GitHub ↗
(time_unit, times)

Source from the content-addressed store, hash-verified

2173
2174
2175def _check_time_unit(time_unit, times):
2176 if not isinstance(time_unit, str):
2177 raise TypeError(f"time_unit must be str, got {type(time_unit)}")
2178 if time_unit == "s":
2179 pass
2180 elif time_unit == "ms":
2181 times = 1e3 * times
2182 else:
2183 raise ValueError(f"time_unit must be 's' or 'ms', got {time_unit!r}")
2184 return time_unit, times
2185
2186
2187def _plot_masked_image(

Callers 7

_handle_timeFunction · 0.85
plot_evoked_topomapFunction · 0.85
_topomap_animationFunction · 0.85
_plot_evokedFunction · 0.85
plot_evoked_whiteFunction · 0.85
plot_evoked_jointFunction · 0.85
plot_compare_evokedsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected