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.3.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.3.0-py3-none-any.whl (2.0 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyviewarr-0.3.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.3.0.tar.gz
Algorithm Hash digest
SHA256 929cc5b19dcba56af63117db6f82bc0882bff428b4234197df2976f99f31f801
MD5 d3d81e6e66464462720b58e5cf3f5144
BLAKE2b-256 7526515c0a924259cd5c697d555b882c3b7b2220af8804d8aa4f0243d4608f04

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyviewarr-0.3.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.3.0-py3-none-any.whl.

File metadata

  • Download URL: pyviewarr-0.3.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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aa896c17989bc7719a05557476d00b9a83c076a6a1439b9aaf83e976eed890f5
MD5 9440def55317db1c5595d8c1e402392f
BLAKE2b-256 88649c858513a344c3fb6b5cbbefe1198fb7dfe6346f789e28dab7223bb13f1c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyviewarr-0.3.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