jupyter_firefly_extensions v2.2.0
jupyter_firefly_extensions
A Jupyterlab extension for rendering FITS images with Firefly.
This package is in the development phase. jupyter_firefly_extensions is
installable via npm (Javascript side) and pip (Python side).
Overview
This extension adds the following features to JupyterLab:
- Double click or right-click on a FITS file and see it in a tab
- Start the full Firefly viewer in a tab.
- Use
FireflyClientin a Python notebook to start Firefly in a tab and send data (tables, images, charts) to it using theFireflyClientAPI - The
SlateWidgetis a full Firefly viewer widget that provides aFireflyClientinstance to embed a full Firefly in a notebook as a widget
Prerequisites
- JupyterLab ^0.35.1
- nodejs
- astropy ^3.0.0
- firefly_client ^2.1.1
The firefly_client package can be installed with pip install firefly_client.
Very Important: first setup the Firefly URL - 3 ways
Add the following line to your
~/.jupyter/jupyter_notebook_config.pyc.Firefly.url = 'http://localhost:8080/firefly'
Or
Add the following line to your
~/.jupyter/jupyter_notebook_config.jsonunder the root object."Firefly": { "url": "http://localhost:8080/firefly" }
Or
Use the environment variable
setenv FIREFLY_URL http://localhost:8080/firefly
where the URL points to a Firefly server.
Install
pip install firefly_client
jupyter labextension install jupyter_firefly_extensions
pip install jupyter_firefly_extensions
jupyter serverextension enable --py jupyter_firefly_extensionsInstall for development
First:
If developing firefly_client, be sure to clone the firefly_client repository
(https://github.com/Caltech-IPAC/firefly_client)
and then do pip install -e . from inside its directory.
Then:
git clone https://github.com/Caltech-IPAC/jupyter_firefly_extensions
cd jupyter_firefly_extensions
jupyter labextension install . --no-build
jupyter lab build
pip install -e .
jupyter serverextension enable --py jupyter_firefly_extensionsHelpful commands
jupyter serverextension list- show a list of server extensionsjupyter labextension list- show a list of lab extensionsjupyter lab- run jupyter labjupyter lab build- rebuild after modifying the javascript:
To remove extensions:
jupyter labextension uninstall jupyter_firefly_extensions
jupyter serverextension disable --py jupyter_firefly_extensions
pip uninstall jupyter_firefly_extensionsExamples
The examples directory has several example notebooks to demonstrate the extension features. When using the examples you should copy the directory and contents to another place or jupyter lab will and to keep rebuilding
slate-demo-explicit.ipynb,slate-demo-explicit2.ipynb- demonstrates opening a Firefly tab and sending data to it with theFireflyClientpython APIslate-widget-demo.ipnb- simple demo of the Firefly slate widget