DataBrowser#

Interactive Jupyter widget for browsing and loading datasets from Hugging Face Hub.

Notebook | Link |

|----------|——| | Demo | notebooks/browser.ipynb | | Open in Colab | colab_badge |

class quantem.data.DataBrowser(**kwargs: Any)[source]#

Bases: AnyWidget

Interactive browser for quantem.data datasets on HF Hub.

Displays a filterable table of available datasets. Click a dataset to see its metadata, then click Load to download it into memory.

Parameters:

technique (str, optional) – Initial technique filter (e.g. "4dstem", "hrtem").

Examples

>>> from quantem.data import DataBrowser
>>> browser = DataBrowser()
>>> browser  # displays widget in notebook
>>> # After selecting and loading a dataset in the UI:
>>> browser.data.shape
(256, 256)
catalog_json#

A trait for unicode strings.

selected_name#

A trait for unicode strings.

selected_info_json#

A trait for unicode strings.

loading#

A boolean (True, False) trait.

loaded_name#

A trait for unicode strings.

__init__(technique: str | None = None, **kwargs)[source]#

Public constructor

technique_filter#

A trait for unicode strings.

refresh()[source]#

Re-fetch the dataset catalog from HF Hub.

property data: ndarray | None#

The loaded dataset as a NumPy array, or None if nothing is loaded.

property metadata: dict | None#

Metadata dict for the loaded dataset, or None.

property techniques: list[str]#

Valid technique names.

summary()[source]#

Print a human-readable summary of the browser state.

__repr__() str[source]#

Return a simple repr to avoid expensive ipywidgets trait serialization.