Skip to main content

A Jupyter widget for playing with CAR Leaflet maps

Project description

A tool to visualize and play with CMB maps. psplay is a jupyter extension to allowinteractive visualization of CMB maps through Leaflet library. psplay alsoprovides a set of tools based on pspy to compute and to showCMB power spectra.All the specific javascript library developed for psplay is done by Sigurd Naess.The build process and javascript architecture is highly inspired by`ipyleaflet <https://github.com/jupyter-widgets/ipyleaflet>`_ project… image:: https://img.shields.io/pypi/v/psplay.svg?style=flat :target: https://pypi.python.org/pypi/psplay/.. image:: https://img.shields.io/npm/v/jupyter-leaflet-car :target: https://www.npmjs.com/package/jupyter-leaflet-car.. image:: https://travis-ci.com/xgarrido/psplay.svg?branch=master :target: https://travis-ci.com/xgarrido/psplayExamples——–* From simulated CAR map to psplay <https://github.com/xgarrido/psplay/blob/master/examples/car_simulation_to_analysis.ipynb>`_* `From HEALPIX map file to psplay <https://github.com/xgarrido/psplay/blob/master/examples/healpix_simulation_to_analysis.ipynb>`_Installation————To install, you will need to have or to install ``numpy`. Then, run.. code:: shell $ pip install psplay [–user]``psplay`` runs within a Jupyter notebook and we recommend to use JupyterLab to fully enjoy psplay``To enable the extension within Jupyter, you will need to install several JupyterLab extensionsespecially the Python ``plotly library and the Jupyter widgets.For JupyterLab > 2.0.0, you can do.. code:: shell $ jupyter labextension install plotlywidget jupyterlab-plotly $ jupyter labextension install @jupyter-widgets/jupyterlab-manager @jupyter-widgets/jupyterlab-sidecarFinally, you need to install the jupyter-leaflet-car extension.. code:: shell $ jupyter labextension install jupyter-leaflet jupyter-leaflet-carInstallation from sources————————-For a development installation (requires npm).. code:: shell $ git clone https://github.com/xgarrido/psplay.git $ cd psplay $ pip install -e .If you are using the classic Jupyter Notebook you need to install the nbextension:.. code:: shell $ jupyter nbextension install –py –symlink –sys-prefix psplay $ jupyter nbextension enable –py –sys-prefix psplayIf you are using JupyterLab, you need to install the labextension:.. code:: shell $ jupyter labextension install @jupyter-widgets/jupyterlab-manager jsNote for developers:- the -e pip option allows one to modify the Python code in-place. Restart the kernel in order to see the changes.- the --symlink argument on Linux or OS X allows one to modify the JavaScript code in-place. This feature is not available with Windows.For automatically building the JavaScript code every time there is a change, run the followingcommand from the psplay/js/ directory:.. code:: shell $ npm run watchIf you are on JupyterLab you also need to run the following in a separate terminal:.. code:: shell $ jupyter lab –watchEvery time a JavaScript build has terminated you need to refresh the Notebook page in order to loadthe JavaScript code again.

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

psplay-0.0.6.tar.gz (591.9 kB view hashes)

Uploaded Source

Supported by

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