Skip to main content

Xarray tools for OPERA DISP

test docs coverage

Documentation: https://mgovorcin.github.io/disp-xr/

Analysis tools using xarray for OPERA Surface Displacement from Sentinel-1 (DISP-S1) and Surface Displacement from NISAR (DISP-NISAR).

Quick start

import disp_xr as dxr

df = dxr.find_products("path/to/granules/")   # or "s3://bucket/prefix/"
ds = dxr.open_disp(df, corrections=True)       # lazy (time, y, x), CRS attached
ds = dxr.chain(ds)                        # displacement from the first date

ds.displacement.isel(x=4000, y=3000).plot()    # one pixel's time series

open_disp returns displacement as stored in the granules, relative to each ministack's reference date; stack_disp chains the ministacks. See docs/specs.md for the plan and CHANGELOG.md for what has changed.

Documentation

The documentation (install, getting started, concepts, command line, a gallery of examples and the API reference) is published at https://mgovorcin.github.io/disp-xr/ once the repository is public. It builds locally with mkdocs:

pixi run -e docs mkdocs serve    # http://127.0.0.1:8000

Development setup

Prerequisite installs

  1. Download source code:
git clone https://github.com/mgovorcin/disp-xr.git
  1. Install with pixi (recommended). It reads pyproject.toml and installs disp_xr in editable mode:
cd disp-xr
pixi install            # core environment
pixi install -e dev     # plus tests, linters, aws, plot, mintpy and notebook extras
pixi run -e test test   # run the tests
pixi run -e test check  # run the pre-commit hooks

Environments: default, test, docs and dev.

Or install the dependencies with conda/mamba, either to a new environment:

mamba env create --name disp_xr --file disp-xr/environment.yml
conda activate disp_xr

or install within your existing env with mamba.

  1. With conda/mamba only (pixi already did this), install disp_xr via pip in editable mode
python -m pip install --no-deps -e  disp-xr

Setup for contributing

We use pre-commit to automatically run linting, formatting, and mypy type checking. Additionally, we follow numpydoc conventions for docstrings. To install pre-commit locally, run:

pre-commit install

This adds a pre-commit hooks so that linting/formatting is done automatically. If code does not pass the checks, you will be prompted to fix it before committing. Remember to re-add any files you want to commit which have been altered by pre-commit. You can do this by re-running git add on the files.

Since we use black for formatting and flake8 for linting, it can be helpful to install these plugins into your editor so that code gets formatted and linted as you save.

Running the unit tests

Tests run on small synthetic DISP-S1 stacks written at run time (tests/fixtures/make_disp.py); no data download is needed. See tests/data/README.md.

pixi run -e test test   # pytest, including doctests in src/disp_xr
pixi run -e test cov    # with a coverage report

With conda/mamba, install the test extra and run pytest:

python -m pip install --no-deps -e .[test]
pytest

Tests marked xfail(strict=True) assert the correct behavior for known bugs listed in docs/code_review.md. When a fix lands, the test starts passing, pytest reports it as a failure (XPASS), and the marker is removed in the same change.

Metadata

Release files for disp-xr 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for disp-xr 0.5.0
File Size Uploaded
disp_xr-0.5.0.tar.gz 6.0 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for disp-xr 0.5.0
File Interpreter ABI Platform
disp_xr-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 6.2 MB

Release files / disp_xr-0.5.0.tar.gz

Download URL disp_xr-0.5.0.tar.gz
Size 6.0 MB
Tags Source
SHA-256 checksum
How to use checksums
35d2a315f1edb31f57d2fad27e65fc29569408e7be5500d82035afa66a1ef0f3
BLAKE2b-256 checksum
How to use checksums
90a6e6f41ac8fbceee2cd421b7d2fe6f6e50409df743379b4599a3805ed45b56
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

Release files / disp_xr-0.5.0-py3-none-any.whl

Download URL disp_xr-0.5.0-py3-none-any.whl
Size 263.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9332f62da731306f6b9238c27f264fde98a61726a43028299783053170636dc5
BLAKE2b-256 checksum
How to use checksums
3b3334dae02a48e061d4bc8185de38f0425eb1da2e5d36bc2ea3eddeae1b0191
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

Release history Release notifications | RSS feed

0.5.1

2 release files

This release

0.5.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page