Skip to main content

Xarray tools for OPERA DISP

test docs coverage PyPI

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

pip install 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.6.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.6.0
File Size Uploaded Provenance Actions
disp_xr-0.6.0.tar.gz 6.0 MB With provenance Details for disp_xr-0.6.0.tar.gz

Built distribution (wheel)

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

Total release size: 6.3 MB

Release files / disp_xr-0.6.0.tar.gz

Download URL disp_xr-0.6.0.tar.gz
Size 6.0 MB
Tags Source
SHA-256 checksum
How to use checksums
3e0c8039c3735beceedf44364e1142b93492ec5a2e9c0d26db21d03f948676c9
BLAKE2b-256 checksum
How to use checksums
6fd24aa09c333112ebae68140cdaf17566603f66da84e293a9e2c362d4264e26
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 21, 2026.

Transparency log

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

Download URL disp_xr-0.6.0-py3-none-any.whl
Size 271.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0167d3e16be690b638c0336ee7f6ac819512e1edd3b6163cf511b50978819ed1
BLAKE2b-256 checksum
How to use checksums
4b48227321f3ce545350485a1895e6d7d6566adaae975bf7461ebf4f11df2ea8
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 21, 2026.

Transparency log

Security for disp-xr 0.6.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for disp_xr-0.6.0.tar.gz

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 21, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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