{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Getting Started" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "To get started, make sure you have a time series that you want to make an interactive figure of, and read it in using the [astropy.timeseries](http://docs.astropy.org/en/stable/timeseries/index.html) package. Here we will adopt the same example as in the astropy.timeseries documentation, and start by retrieving a Kepler lightcurve (which you can also [download here](http://data.astropy.org/timeseries/kplr010666592-2009131110544_slc.fits)):" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "from astropy.utils.data import get_pkg_data_filename\n", "filename = get_pkg_data_filename('timeseries/kplr010666592-2009131110544_slc.fits')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "and reading it in:" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "from astropy.timeseries import TimeSeries\n", "ts = TimeSeries.read(filename, format='kepler.fits')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let's take a look at the five first lines to see what the data looks like:" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/html": [ "TimeSeries length=5\n", "
time | timecorr | cadenceno | sap_flux | sap_flux_err | sap_bkg | sap_bkg_err | pdcsap_flux | pdcsap_flux_err | sap_quality | psf_centr1 | psf_centr1_err | psf_centr2 | psf_centr2_err | mom_centr1 | mom_centr1_err | mom_centr2 | mom_centr2_err | pos_corr1 | pos_corr2 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d | electron / s | electron / s | electron / s | electron / s | electron / s | electron / s | pix | pix | pix | pix | pix | pix | pix | pix | pix | pix | |||
object | float32 | int32 | float32 | float32 | float32 | float32 | float32 | float32 | int32 | float64 | float32 | float64 | float32 | float64 | float32 | float64 | float32 | float32 | float32 |
2009-05-02T00:41:40.338 | 6.630610e-04 | 5500 | 1.0270451e+06 | 1.4041933e+02 | 3.7480554e+03 | 2.2283568e+00 | 1.0346376e+06 | 2.4780812e+02 | 0 | nan | nan | nan | nan | 1041.56040 | 1.3623475e-04 | 613.47997 | 1.7336856e-04 | 1.5822421e-03 | -1.4463664e-03 |
2009-05-02T00:42:39.188 | 6.630857e-04 | 5501 | 1.0271844e+06 | 1.4042902e+02 | 3.7491572e+03 | 2.2283657e+00 | 1.0347789e+06 | 2.4594159e+02 | 0 | nan | nan | nan | nan | 1041.55834 | 1.3624557e-04 | 613.48164 | 1.7334183e-04 | 1.5743829e-03 | -1.4540013e-03 |
2009-05-02T00:43:38.045 | 6.631103e-04 | 5502 | 1.0270762e+06 | 1.4038968e+02 | 3.7502588e+03 | 2.2283745e+00 | 1.0346701e+06 | 2.4408449e+02 | 0 | nan | nan | nan | nan | 1041.55751 | 1.3616899e-04 | 613.47866 | 1.7328140e-04 | 1.5665225e-03 | -1.4616371e-03 |
2009-05-02T00:44:36.894 | 6.631350e-04 | 5503 | 1.0271414e+06 | 1.4042482e+02 | 3.7513606e+03 | 2.2283831e+00 | 1.0347365e+06 | 2.4229922e+02 | 0 | nan | nan | nan | nan | 1041.55898 | 1.3622017e-04 | 613.47947 | 1.7331526e-04 | 1.5586632e-03 | -1.4692718e-03 |
2009-05-02T00:45:35.752 | 6.631597e-04 | 5504 | 1.0271569e+06 | 1.4039404e+02 | 3.7524626e+03 | 2.2283916e+00 | 1.0347527e+06 | 2.4051416e+02 | 0 | nan | nan | nan | nan | 1041.55705 | 1.3621294e-04 | 613.48085 | 1.7329821e-04 | 1.5508028e-03 | -1.4769078e-03 |