This doesn't work:
import mne
mne.viz.eyetracking.plot_gaze
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Cell In[4], line 1
----> 1 mne.viz.eyetracking.plot_gaze
File ~/miniforge3/envs/mnedev/lib/python3.11/site-packages/lazy_loader/__init__.py:89, in attach.<locals>.__getattr__(name)
87 return attr
88 else:
---> 89 raise AttributeError(f"No {package_name} attribute {name}")
AttributeError: No mne.viz attribute eyetracking
But this works.
from mne.viz.eyetracking import plot_gaze
plot_gaze(...)
I guess I always used the latter pattern in the tests. I am still not very familiar with lazy_loader but I think we need to add "eyetracking" to:
|
__all__ = [ |
|
"Brain", |
|
"ClickableImage", |
|
"EvokedField", |
|
"Figure3D", |
|
"_RAW_CLIP_DEF", |
|
"_get_plot_ch_type", |
|
"_get_presser", |
|
"_plot_sources", |
|
"_scraper", |
|
"add_background_image", |
|
"adjust_axes", |
|
"backends", |
|
"centers_to_edges", |
|
"circular_layout", |
|
"close_3d_figure", |
|
"close_all_3d_figures", |
|
"compare_fiff", |
|
"concatenate_images", |
|
"create_3d_figure", |
|
"get_3d_backend", |
|
"get_brain_class", |
|
"get_browser_backend", |
|
"iter_topography", |
|
"link_brains", |
|
"mne_analyze_colormap", |
|
"plot_alignment", |
|
"plot_arrowmap", |
|
"plot_bem", |
|
"plot_brain_colorbar", |
|
"plot_bridged_electrodes", |
|
"plot_ch_adjacency", |
|
"plot_channel_labels_circle", |
|
"plot_chpi_snr", |
|
"plot_compare_evokeds", |
|
"plot_cov", |
|
"plot_csd", |
|
"plot_dipole_amplitudes", |
|
"plot_dipole_locations", |
|
"plot_drop_log", |
|
"plot_epochs", |
|
"plot_epochs_image", |
|
"plot_epochs_psd", |
|
"plot_epochs_psd_topomap", |
|
"plot_events", |
|
"plot_evoked", |
|
"plot_evoked_field", |
|
"plot_evoked_image", |
|
"plot_evoked_joint", |
|
"plot_evoked_topo", |
|
"plot_evoked_topomap", |
|
"plot_evoked_white", |
|
"plot_filter", |
|
"plot_head_positions", |
|
"plot_ica_components", |
|
"plot_ica_overlay", |
|
"plot_ica_properties", |
|
"plot_ica_scores", |
|
"plot_ica_sources", |
|
"plot_ideal_filter", |
|
"plot_layout", |
|
"plot_montage", |
|
"plot_projs_joint", |
|
"plot_projs_topomap", |
|
"plot_raw", |
|
"plot_raw_psd", |
|
"plot_raw_psd_topo", |
|
"plot_regression_weights", |
|
"plot_sensors", |
|
"plot_snr_estimate", |
|
"plot_source_estimates", |
|
"plot_source_spectrogram", |
|
"plot_sparse_source_estimates", |
|
"plot_tfr_topomap", |
|
"plot_topo_image_epochs", |
|
"plot_topomap", |
|
"plot_vector_source_estimates", |
|
"plot_volume_source_estimates", |
|
"set_3d_backend", |
|
"set_3d_options", |
|
"set_3d_title", |
|
"set_3d_view", |
|
"set_browser_backend", |
|
"snapshot_brain_montage", |
|
"ui_events", |
|
"use_3d_backend", |
|
"use_browser_backend", |
|
] |
and eyetracking to: from . import _scraper, backends, ui_events
I can submit a new PR or sneak a bugfix into #12237
This doesn't work:
But this works.
I guess I always used the latter pattern in the tests. I am still not very familiar with
lazy_loaderbut I think we need to add"eyetracking"to:mne-python/mne/viz/__init__.pyi
Lines 1 to 88 in 4ccd30f
and
eyetrackingto:from . import _scraper, backends, ui_eventsI can submit a new PR or sneak a bugfix into #12237