Note

This tutorial was generated from a Jupyter notebook that can be downloaded here.

Simple spot

In this notebook we’ll instantiate a Doppler map with a simple spot and visualize it with the interactive show() method. The plots below are fully interactive: move the mouse and scroll over the maps to control the spectra that are displayed below them.

[4]:
import starry
import numpy as np
[5]:
# Instantiate
map = starry.DopplerMap(ydeg=15, nt=20, inc=60, veq=30000)

# A dark circular spot at 30 deg lat with radius 20 deg
lat = np.linspace(-90, 90, 300)
lon = np.linspace(-180, 180, 600)
image = np.ones((len(lat), len(lon)))
y = lat.reshape(-1, 1)
x = lon.reshape(1, -1)
image[x ** 2 + (y - 30) ** 2 < 20 ** 2] = 0

# A single absorption line at the central wavelength
spectrum = 1.0 - 0.75 * np.exp(-0.5 * (map.wav0 - 643.0) ** 2 / 0.0085 ** 2)

# Ingest into the starry map
map.load(maps=image, spectra=spectrum)

# Visualize
map.visualize()

Click here to pop out the visualization.