eumetsat_products_registry module

EUMETSAT Product Registry

This module provides a lightweight registry for storing metadata about EUMETSAT products used within VisuSat. It is primarily designed to:

  • Record product information (collection ID, name, level, number of categories),

  • Store this registry as a JSON file inside the data/ directory,

  • Reload the registry to reconstruct Product objects,

  • Provide helper functions to add, update, or retrieve registered products.

The registry is intentionally minimalistic and file-based to ensure transparency and ease of manual editing.

Notes

  • No code is executed when the module is imported (important for ReadTheDocs).

  • Users must explicitly call register_product() to add entries.

  • The JSON file is stored at data/eumetsat_products.json.

class visusat.eumetsat_products_registry.Product(collection_id, name, level, n_categories, description='')

Bases: object

Metadata for a single EUMETSAT product.

Parameters:
  • collection_id (str) – EUMETSAT collection identifier (e.g. "EO:EUM:DAT:0665").

  • name (str) – Short descriptive name.

  • level (str) – Product level (e.g. "L1c" or "L2").

  • n_categories (int) – Number of categories in the dataset (if applicable).

  • description (str, optional) – Longer textual description.

collection_id: str
description: str = ''
level: str
n_categories: int
name: str
visusat.eumetsat_products_registry.example_registry_entry()

Returns an example product entry (not automatically registered).

Useful for demonstration or tests.

Return type:

Product

visusat.eumetsat_products_registry.load_registry()

Load registry contents from the JSON file (if it exists).

This populates the global PRODUCTS dictionary.

Return type:

None

visusat.eumetsat_products_registry.register_product(product)

Add or update a product in the registry and save to disk.

Parameters:

product (Product) – The product metadata to register.

Return type:

None

Notes

Unlike earlier versions, this function is not called at import time. Users must call it explicitly.

visusat.eumetsat_products_registry.save_registry()

Save the in-memory registry to the JSON file.

Creates directories as needed.

Return type:

None