PYESASKY: ESASKY WIDGET FOR JUPYTER NOTEBOOKS


pyESASky is an interactive widget allowing users to work with ESASky within a Jupyter notebook and JupyterLab. It also offers enhanced functionalities, such as the possibility to vizualise any astroquery table, such as from VizieR, or to load user-provided data tables, footprints and HiPS (served by an HTTP server) and to work with them in exactly the same way as any other data available in the tool.

REQUIREMENTS

pyESASky requires Jupyter (available in Anaconda), Node.js. and python 3.6 or later. If you use conda, you can get the latter by running:

$ conda install -c conda-forge nodejs

If you use Homebrew on Mac OS X, run:

$ brew install node

You can also download Node.js from the website and install it directly.

 

DOWNLOAD AND INSTALLATION

pyESASky can be downloaded from GitHub. To install it, run the following commands:

$ pip install pyesasky 
$ jupyter labextension install pyesasky

To be able to run pyesasky in JupyterLab, it is necessary to install the labextension ivywidgets:

$ jupyter labextension install @jupyter-widgets/jupyterlab-manager

After that, enable "Extensions Manager" in  Settings -> Advanced Settings Editor -> Extension Manager, and include {"enabled": true} inside 'User overrides'.

 

RUNNING PYESASKY 

Multiple sample notebooks of the functionality in pyESASky can be found in https://github.com/esdc-esac-esa-int/pyesasky/tree/master/samples

For the basic functionalities, open the pyESASky-Basic.ipynb. To check how to overlay a catalogue, run the pyESASky-Catalogue.ipynb. To overlay a set of footprints, open pyESASky-Footprints.ipynb.

Similar examples can be tested in Binder without needing to install anything.

 

To instantiate pyESASky, import the widget in your Jupyter Notebook:

from pyesasky import ESASkyWidget
esasky = ESASkyWidget()
esasky

 

To use catalogue features, the following additional classes must be imported:

from pyesasky import Catalogue
from pyesasky import CatalogueDescriptor
from pyesasky import MetadataDescriptor
from pyesasky import MetadataType

 

To use footprints features, the following additional classes must be imported:

from pyesasky import FootprintSet
from pyesasky import FootprintSetDescriptor
from pyesasky import MetadataDescriptor
from pyesasky import MetadataType