{ "cells": [ { "cell_type": "markdown", "id": "4a4267fb-3544-47fe-8df5-d69d1a170fc1", "metadata": {}, "source": [ "# Finding the position and velocity vectors of Kepler and TESS\n", "\n", "`lkspacecraft` uses SPICE kernels to track the position and velocity of spacecraft as measured. You can use `lkspacecraft` to get those vectors and use them in your analyses." ] }, { "cell_type": "code", "execution_count": 9, "id": "3a2e4ea2-44f9-4c3e-ab61-4fa149511f03", "metadata": {}, "outputs": [], "source": [ "from lkspacecraft import KeplerSpacecraft, TESSSpacecraft\n", "import matplotlib.pyplot as plt\n", "from astropy.time import Time\n", "import numpy as np" ] }, { "cell_type": "markdown", "id": "7d3c2b55-def3-4242-86cc-e44a73252a3a", "metadata": {}, "source": [ "First we load the spacecraft object" ] }, { "cell_type": "code", "execution_count": 3, "id": "20f577f1-9c89-42d0-b61c-17d6605250cd", "metadata": {}, "outputs": [], "source": [ "ks = KeplerSpacecraft()" ] }, { "cell_type": "markdown", "id": "58b2ed64-a3f8-4b41-9a32-16e963ac85be", "metadata": {}, "source": [ "Now we must pick a time that we want to get the position or velocity. I will create a vector which spans the duration of the SPICE kernels" ] }, { "cell_type": "code", "execution_count": 13, "id": "4dde4b41-99a8-4e69-962b-1d4e27a640fd", "metadata": {}, "outputs": [], "source": [ "start, end = ks.start_time, ks.end_time" ] }, { "cell_type": "code", "execution_count": 14, "id": "7f857cab-cbea-4f71-910c-8d721bdb3c17", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(