Skip to main content

A Custom Jupyter Widget Library for Interactive Visualization with yt

Project description

widgyts

Documentation Status codecov status DOI

A fully client-side pan-and-zoom widget, using WebAssembly, for variable mesh datasets from yt. It runs in the browser, so once the data hits your notebook, it's super fast and responsive!

If you'd like to dig into the Rust and WebAssembly portion of the code, you can find it at https://github.com/data-exp-lab/rust-yt-tools/ and in the npm package @data-exp-lab/yt-tools.

Check out our SciPy 2018 talk and the associated slides for more info!

Documentation

Our documentation is hosted at readthedocs. Take a look here.

Installation

To install using pip from the most recent released version:

$ pip install widgyts

To install using pip from this directory:

$ git clone https://github.com/yt-project/widgyts.git
$ cd widgyts
$ pip install .

For a development installation (requires npm),

$ git clone https://github.com/yt-project/widgyts.git
$ cd widgyts
$ pip install -e .
$ jupyter serverextension enable --py --sys-prefix widgyts
$ jupyter nbextension install --py --symlink --sys-prefix widgyts
$ jupyter nbextension enable --py --sys-prefix widgyts

Note that in previous versions, serverextension was not provided and you were required to set up your own mimetype in your local configuration. This is no longer the case and you are now able to use this server extension to set up the correct wasm mimetype.

To install the jupyterlab extension, you will need to make sure you are on a recent enough version of Jupyterlab, preferably 0.35 or above. For a development installation, do:

$ jupyter labextension install js

To install the latest released version,

$ jupyter labextension install @data-exp-lab/yt-widgets

Using

To use this, you will need to have yt installed. Importing it monkeypatches the Slice and Projection objects, so you are now able to do:

#!python
import yt
import widgyts

ds = yt.load("data/IsolatedGalaxy/galaxy0030/galaxy0030")
s = ds.r[:,:,0.5]
s.display("density")

and for a projection:

#!python
ds = yt.load("data/IsolatedGalaxy/galaxy0030/galaxy0030")
p = ds.r[:].integrate("density", axis="x")
p.display()

There are a number of traits you can set on the resultant objects, as well.

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

widgyts-0.5.0.tar.gz (267.5 kB view details)

Uploaded Source

File details

Details for the file widgyts-0.5.0.tar.gz.

File metadata

  • Download URL: widgyts-0.5.0.tar.gz
  • Upload date:
  • Size: 267.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for widgyts-0.5.0.tar.gz
Algorithm Hash digest
SHA256 a10b8063e03dc6bb40f62e303116c755ac5bcf8c01ac1b4a8171890c32d416d8
MD5 7aaf86b5509b78734e4156b74ec7ff10
BLAKE2b-256 f755c5b2c92702865e055a0849e81c221296058c0a5a0ce0b92f6395b98491b0

See more details on using hashes here.

Supported by

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