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.

 

DOWNLOAD AND INSTALLATION

 

pyESASky can be downloaded from GitHub. It requires Jupyter (available in Anaconda) and npm. The latter is available with Node.js (recommended), but can also be installed by running:

$ brew install npm

 

To install pyESASky, run the following commands:

$ git clone https://github.com/esdc-esac-esa-int/pyesasky
$ cd pyesasky
$ sh install.sh

 

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 

 

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

from pyesasky.pyesasky import ESASkyWidget esasky = ESASkyWidget() esasky

 

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

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

 

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

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

 

EXAMPLES

 

Some basic examples are provided with the installation. To run them, move to the 'samples' folder and open the corresponding notebook.

 

uninstallING pyesasky

 

To uninstall pyESASky, run:

$ sh uninstall.sh

 

In case the uninstall is complaining about a missing 'rimraf' command, try this first:

$ npm install webpack-dev-server rimraf webpack -g

and then rerun the uninstall procedure.