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.1-py3-none-any.whl (1.7 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyviewarr-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 1.7 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.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 04dd44e89fa8bd9de412c90af1b9bd2a369c2882fe0f4d54bc262cbef7ae2147
MD5 72dd5b9fe16deeb418e6ca7d3db6d071
BLAKE2b-256 7753280ae883e35b701381a8459be6cf9a245df249f5d6e9ecc20c3374ff0efa

See more details on using hashes here.

Provenance

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