Skip to article frontmatterSkip to article content

xOPR

Overview

xOPR is a Python library designed to make accessing Open Polar Radar’s data archives easy, scalable, and reproducible.

xOPR offers access to most of the OPR data catalog, but not absolutely every line. Check out our availability maps for details.

Installing xOPR

To install xOPR, use:

pip install xopr

Or, using uv (our recommendation!):

uv add xopr

Getting Started

Minimal example of loading and plotting a single frame of radar data:

import numpy as np
import xopr

opr = xopr.OPRConnection()

stac_items = opr.query_frames(collections=["2022_Antarctica_BaslerMKB"], segment_paths=["20221228_01"], max_items=1)
frames = opr.load_frames(stac_items)

(10*np.log10(frames[0].Data)).plot.imshow(x='slow_time', y='twtt', cmap='gray', yincrease=False)

To learn more, we recommend looking through the notebooks on the left side navigation.

Design

For details on the initial design planning of xopr, please see this OPR wiki page.

For current design and terminology, see the design notes page.

xOPR acts as an interface to OPR data. It has two primary roles: helping create queries to the OPR STAC catalog to find data and returning radar data in the form of an Xarray Dataset.

xOPR acts as an interface to OPR data. It has two primary roles: helping create queries to the OPR STAC catalog to find data and returning radar data in the form of an Xarray Dataset.