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) and Node.js. 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:

$ 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.

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

 

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.