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.

Installing xopr

For now, xopr is available only directly from source on GitHub. To install xopr, use:

pip install xopr

Or, using uv:

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()

frames = opr.load_flight("2022_Antarctica_BaslerMKB", flight_id="20221228_01", data_product="CSARP_standard", max_items=1)

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

To learn more, check out our demo notebooks from the menu on the left side or on GitHub.

Design

For details on the initial design planning of xopr, please see this OPR wiki 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.