Radial Velocity

Radial Velocity#

Here is how to model the radial velocity of a non-uniform star with spotter.

Let’s create a spotted star that rotates

from spotter import Star
from spotter import video

star = Star.from_sides(30, u=(0.2,), period=1.0, inc=1.0, obl=0.7)
star = star.set(y=1 - 0.8 * star.spot(0.0, 0.0, 0.3))

video(star, rv=True)

We can then compute its RV signal

import numpy as np
from spotter.doppler import radial_velocity
import matplotlib.pyplot as plt

time = np.linspace(-0.5, 0.5, 300)
rv = radial_velocity(star, time)[0]

plt.plot(time, rv)
plt.ylabel(r"radial velocity ($R_{\odot}/day$)")
plt.xlabel("time (days)")
Text(0.5, 0, 'time (days)')
../../_images/7dd7798b60eb1828055ae3feb4630241d448a50877b5cff9d3aaab85a86758f4.png