qualpipe_webapp.backend.backends.base.BackendAPI#

class qualpipe_webapp.backend.backends.base.BackendAPI[source]#

Bases: ABC

Abstract backend interface for data retrieval.

All backends (file, DB, etc.) must implement these methods.

abstractmethod fetch_data(obsid, tel_id, site, date, keys=None)[source]#

Fetch data for specific observation and telescope.

Parameters:
obsidint

Observation ID

tel_idint

The unique identifier for the telescope.

sitestr

Site identifier.

datestr

Observation date.

keysOptional[List[str]]

Specific data keys to fetch (None = all available)

Returns:
Mapping[str, DataItem]

Dictionary mapping data keys to DataItem objects

Parameters:
Return type:

Mapping[str, DataItem]

abstractmethod get_available_metrics(obsid, tel_id, site, date)[source]#

Get list of available data quality metrics for specific observation and telescope.

Parameters:
obsidint

Observation ID

tel_idint

The unique identifier for the telescope.

sitestr

Site identifier.

datestr

Observation date.

Returns:
list[str]

List of strings, each entry being an available metric.

Parameters:
Return type:

list[str]

abstractmethod get_ob_date_map()[source]#

Return mapping of date strings to observation IDs.

Format: {โ€œ2025-10-22โ€: [20251022230327, โ€ฆ], โ€ฆ}

Return type:

Mapping[str, list[int]]

abstractmethod scan_observations()[source]#

Scan storage and return available observations.

Return type:

list[ObservationInfo]