Skip to content

02 — Exploring instruments ​

Instrument objects expose core metadata, optional fields, extension data, references, and generated relationships.

python
import xeo

instrument = xeo.instruments.MSI_S2A
instrument

Core and optional metadata ​

Required catalogue fields are always available. Optional fields such as end_date and notes return None when absent, while optional link lists default to an empty list.

python
metadata = {
    "id": instrument.id,
    "name": instrument.name,
    "acronym": instrument.acronym,
    "type": instrument.type,
    "platform_type": instrument.platform_type,
    "platform": instrument.platform,
    "operator": instrument.operator,
    "contributors": instrument.contributors,
    "start_date": instrument.start_date,
    "end_date": instrument.end_date,
    "status": instrument.status,
    "availability": instrument.availability,
}
metadata

Extensions ​

Extensions contain domain-specific metadata. Use extension_names to discover them before reading a particular extension.

python
print(instrument.extension_names)
for name, extension in instrument.extensions.items():
    print(name, "->", list(extension))

Relationships ​

family contains related instruments with the same name or acronym. platform_companions contains other instruments carried by the same platform. Both fields store instrument identifiers that can be resolved through xeo.instruments.

python
family = [xeo.instruments[item] for item in instrument.family]
companions = [xeo.instruments[item] for item in instrument.platform_companions]

print("Family:", family)
print("Platform companions:", companions)

References document the metadata provenance. Data links point to locations where products can be accessed.

python
print("References:")
for reference in instrument.references:
    print("-", reference)

print("\nData links:")
for link in instrument.data_links:
    print("-", link)

Released under the MIT License.