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.

You can also run pyESASky in JupyterLab (currently from versions 1.03 to 1.26). 

 

DOWNLOAD AND INSTALLATION

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

$ pip install pyesasky 
$ jupyter labextension install pyesasky@latest

In some cases you might also have to run these two commands to enable pyESASky in Jupyter Notebook:

$ jupyter nbextension install --py pyesasky --sys-prefix
$ jupyter nbextension enable --py pyesasky --sys-prefix

In order to be able to run pyesasky in Jupyter lab it is necessary to install the labextension ivywidgets by the following command:

$ jupyter nbextension 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

Release notes

pyESASKy 1.4  - ESASky in Mandarin - June 2020

The ESASky frontend is upgraded to 3.4.3. which means it's now available also in Mandarin and Spanish (even though all python commands and communication is only available in English)

Start it in a custom language by adding a language code parameter to the initialisation of the widget:

esasky = ESASkyWidget("zh")

En : English
Es: Spanish
Zh: Mandarin

JWST planning tool

We have also simplified James Webb planning tool usage by sending back available instruments and detectors if an erroneous name is specified.