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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

pyviewarr-0.1.0-py2.py3-none-any.whl (1.7 MB view details)

Uploaded Python 2Python 3

File details

Details for the file pyviewarr-0.1.0-py2.py3-none-any.whl.

File metadata

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

File hashes

Hashes for pyviewarr-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 7dfff0a585f05e5d6200e2c5c9622cf5c0aa0e653659603b3909a845ff1c45da
MD5 4b3ae659baaffe7f9183e249c068a5be
BLAKE2b-256 172ad7f9004dffa4179b1c22bd85e969a780196421bd56f60501961238deff07

See more details on using hashes here.

Provenance

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