eomatch.Matchup.return_matchup_dataset

eomatch.Matchup.return_matchup_dataset#

Matchup.return_matchup_dataset(collection_read_args: dict | None = None) DataTree[source]#

Return match-up dataset by downloading the products if required, reading in data for each product and assembling a match-up DataTree.

Per-collection vars_sel, read_params, and processors defaults are read from the read section of the context config (see _resolve_read_kwargs() for the full merge order). collection_read_args overrides those defaults at call time.

Basic usage — rely entirely on config defaults:

dt = matchup.return_matchup_dataset()

Select specific bands per collection — each collection has its own variable names, so override per collection keyed by STAC collection ID. vars_sel within a collection is a full replacement:

dt = matchup.return_matchup_dataset(
    collection_read_args={
        "S2_MSI_L1C":   {"vars_sel": {"meas": ["B02", "B03", "B04", "B08"]}},
        "LANDSAT_C2L1": {"vars_sel": {"meas": ["B2",  "B3",  "B4",  "B5" ]}},
    }
)

Apply specific processors per collection:

dt = matchup.return_matchup_dataset(
    collection_read_args={
        "S2_MSI_L1C": {"processors": {"toa_reflectance": {}}},
    }
)

Nudge a read parameter for one collectionread_params within a collection entry is merged at the sub-key level:

dt = matchup.return_matchup_dataset(
    collection_read_args={
        "LANDSAT_C2L1": {"read_params": {"use_chunks": True}},
    }
)
Parameters:

collection_read_args – per-collection call-time overrides, keyed by STAC collection ID. Each value is a dict with any of the keys vars_sel (full replacement), read_params (sub-key merge), and processors (full replacement). Takes precedence over config defaults for that collection.

Returns:

match-up DataTree with one node per sensor (sensor_1, sensor_2, …)

Raises:

ValueError – if no products are set on this matchup