GithubHelp home page GithubHelp logo

aashish24 / widgyts Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yt-project/widgyts

0.0 2.0 0.0 179 KB

Widgets for yt

Home Page: https://widgyts.readthedocs.io/

License: BSD 3-Clause "New" or "Revised" License

JavaScript 45.77% Python 49.96% TeX 4.27%

widgyts's Introduction

widgyts

Build Status Documentation Status codecov status

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/data-exp-lab/widgyts.git
$ cd widgyts
$ pip install .

For a development installation (requires npm),

$ git clone https://github.com/data-exp-lab/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.

widgyts's People

Contributors

munkm avatar matthewturk avatar vasu26 avatar xarthisius avatar nathanael-claussen avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.