Skip to main content

No project description provided

Project description

pyviewarr

A faster, more intuitive way to explore 2D data (i.e. monochromatic images) in Python notebooks.

  • Server-side slicing — view 1 MB of a 100 GB data cube without downloading 100 GB of data
  • Interactive re-stretching by right-clicking and dragging in X and Y (inspired by ds9)
  • Stepper buttons for moving along the leading axes of N-D data where N > 2
  • Linear, log, and symmetric linear (i.e. centered at zero with vmin == -vmax) scales
  • Panning and zooming (0 key resets, - zooms out, = zooms in)
  • A few good colormaps

Clanker code disclaimer: written in collaboration with Anthropic's Claude LLM. Use at your own risk.

Installation

pip install pyviewarr

or with uv:

uv add pyviewarr

Development

Be sure to clone with git clone --recurse-submodules (or, if you cloned first and then read this, git submodule update --init --recursive to initialize an existing clone).

The frontend part of the widget (i.e. viewarr itself) is written in Rust with egui, requiring a Rust compiler toolchain for wasm32-unknown-unknown and the wasm-pack tool installed.

Install rust with rustup: https://rustup.rs/

Now that you have cargo, install wasm-pack with cargo install wasm-pack.

Using uv for development will automatically manage virtual environments and dependencies for you.

uv run jupyter lab example.ipynb

Alternatively, create and manage your own virtual environment:

python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
jupyter lab example.ipynb

The widget front-end code bundles it's JavaScript dependencies. After setting up Python, make sure to install these dependencies locally:

npm install

While developing, you can run the following in a separate terminal to automatically rebuild JavaScript as you make changes:

npm run dev

Open example.ipynb in JupyterLab, VS Code, or your favorite editor to start developing. Changes made in js/ will be reflected in the notebook.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyviewarr-0.2.0.tar.gz (2.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyviewarr-0.2.0-py3-none-any.whl (2.0 MB view details)

Uploaded Python 3

File details

Details for the file pyviewarr-0.2.0.tar.gz.

File metadata

  • Download URL: pyviewarr-0.2.0.tar.gz
  • Upload date:
  • Size: 2.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyviewarr-0.2.0.tar.gz
Algorithm Hash digest
SHA256 e507200083ae6ed4e2cecdf75a08accb0670033aeb5424a8775210b746e650c4
MD5 23626155354ff3b44fe13f831d8a466c
BLAKE2b-256 002cde5e723b9b3afe6fbf8cf16d4e055d50ed55862491f7034b896f37496a26

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyviewarr-0.2.0.tar.gz:

Publisher: ci.yml on joseph-long/pyviewarr

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyviewarr-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: pyviewarr-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 2.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyviewarr-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8e9e363d221e2da018af425bad4f257687e6f9879fbde87536afaf9403e67c3a
MD5 dc110d6d165fef8a93170ba748c4fc70
BLAKE2b-256 74b649d4ada3c1b763144e966a05be97aaca7fc223de98ee4e99679cfbcb7bbf

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyviewarr-0.2.0-py3-none-any.whl:

Publisher: ci.yml on joseph-long/pyviewarr

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page