SQUAD - Dataset

This submodule defines all the Data components used in the Qimchi Dash app.

class qimchi.components.data.squad.datasets.XarrayDataFolder(*args, **kwargs)[source]

Bases: Database

Base class for database folders in Qimchi

static update_state_dropdown_vals(sess_id: str, measurement: str, measurement_type: str, device_id: str, device_type: str, wafer_id: str) None[source]

Update the state with the wafer id, device type, device id, measurement type, and measurement.

static update_wafer_id(wafer_options: List[str], dataset_path: str | Path, dataset_type: str, *_) List[str][source]

Update the wafer ID options based on the dataset path and type. This function is triggered by the submit button and updates the wafer ID options in the dropdown. This in turn triggers other dropdowns sequentially.

Parameters:
  • wafer_options (List[str]) – Current wafer ID options

  • dataset_path (str | Path) – Path to the dataset

  • dataset_type (str) – Type of the dataset

Returns:

Whether the data selector is set List[str]: Updated wafer ID

Return type:

bool

static update_data(sess_id: str, sig_curr: int, measurement: str, measurement_type: str, device_id: str, device_type: str, wafer_id: str, dataset_path: str | Path, *_) dict[source]

Update the data store with the Zarr file content.

Parameters:
  • sess_id (str) – Session ID

  • sig_curr (int) – The current signal value

  • measurement (str) – Measurement name

  • measurement_type (str) – Measurement type

  • device_id (str) – Device ID

  • device_type (str) – Device type

  • wafer_id (str) – Wafer ID

  • dataset_path (str | Path) – Path to the dataset

Returns:

The updated data store

Return type:

dict

Raises:

PreventUpdate – If the path is not a file or not a Zarr file

static update_selected_measurement(_prev_clicks: int, _next_clicks: int, curr_mmnt: str, mmnt_options: list, sess_id: str) int[source]

Updates selected measurement based on button clicks or dropdown selection.

Parameters:
  • _prev_clicks (int) – Number of clicks on the previous button

  • _next_clicks (int) – Number of clicks on the next button

  • curr_mmnt (str) – Current selected measurement

  • mmnt_options (list) – List of measurement options

  • sess_id (str) – Session ID

Returns:

New selected measurement

Return type:

str

Raises:

PreventUpdate – If the options are not available

options()[source]

Dropdowns in the selector.

Returns:

Div element containing the dropdowns for the selector

Return type:

dash.html.Div

class qimchi.components.data.squad.datasets.XarrayData(*args, **kwargs)[source]

Bases: Data

Base class for data files in Qimchi

static update_data(sess_id: str, sig_curr: int, path: str, *_)[source]

Update the data store with the Zarr file content.

Parameters:
  • sess_id (str) – Session ID to load the state for

  • sig_curr (int) – The current signal value

  • path (str) – Path to the Zarr file

Returns:

The updated data store

Return type:

dict

Raises:

PreventUpdate – If the path is not a file or not a Zarr file