#!/usr/bin/env python # coding: utf-8 # ## Using WorldWide Telescope inside the Jupyter notebook # This notebook shows how to start up the WorldWide Telescope Jupyter widget, and how to subsequently modify its properties. You can find out more about using pywwt in the [documentation](http://pywwt.readthedocs.io). # # We start off by importing the ``WWTJupyterWidget`` class: # In[ ]: from pywwt.jupyter import WWTJupyterWidget # We then use this class to create the widget (note that the second ``wwt`` is needed to actually show the contents of the widget): # In[ ]: wwt = WWTJupyterWidget() wwt # Once the widget appears, you can then use the ``wwt`` object to change the visual settings, interact with WorldWide Telescope, and create annotations: # In[ ]: from astropy import units as u from astropy.coordinates import SkyCoord M31 = SkyCoord('00h42m44.330s +41d16m07.50s') wwt.center_on_coordinates(M31, fov=10 * u.deg) wwt.add_circle(M31, radius=1 * u.deg) wwt.constellation_figures = True # You can find out more about interacting with the ``wwt`` object in [Basic controls](http://pywwt.readthedocs.io/en/latest/settings.html) and [Showing annotations](http://pywwt.readthedocs.io/en/latest/annotations.html).