{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Quickstart" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "With `GaiaAlertsPy` installed, you can easily extract each detection from the Gaia alerts." ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "from GaiaAlertsPy import alert as gaap\n", "from matplotlib import rcParams\n", "\n", "# fancy plotting\n", "import matplotlib.pyplot as plt\n", "%matplotlib inline\n", "%config InlineBackend.figure_format = \"retina\"\n", "from matplotlib import rcParams\n", "rcParams['savefig.dpi'] = 550\n", "rcParams['font.size'] = 20\n", "plt.rc('font', family='serif')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "For example, let’s download and display the light curve for a specific alert, identified as Gaia20dvt. First, start Python and use the GaiaAlert class to obtain the light curve data for the alert from the data archive:" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [], "source": [ "target_id = \"Gaia20dvt\" \n", "alert_lc = gaap.GaiaAlert(target_id).query_lightcurve_alert()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We can inspect the `alert_lc` table that returns all the detections: " ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
| JD | mag_G | mag_G_error |
|---|---|---|
| float64 | float64 | float64 |
| 2457078.0103472224 | 17.64 | 0.018908738194109986 |
| 2457078.084351852 | 17.63 | 0.018855080650021172 |
| 2457105.321666667 | 17.55 | 0.01843832729193906 |
| 2457105.4978009257 | 17.6 | 0.018696221071923702 |
| 2457128.992175926 | 17.48 | 0.01809111962074983 |