{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": true }, "outputs": [], "source": [ "import pandas as pd\n", "\n", "def get_LINEAR_lightcurve(lcid):\n", " from astroML.datasets import fetch_LINEAR_sample\n", " LINEAR_sample = fetch_LINEAR_sample()\n", " data = pd.DataFrame(LINEAR_sample[lcid],\n", " columns=['t', 'mag', 'magerr'])\n", " data.to_csv('LINEAR_{0}.csv'.format(lcid), index=False)\n", " \n", "# Uncomment to download the data\n", "# get_LINEAR_lightcurve(lcid=14752041)" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "
| \n", " | t | \n", "mag | \n", "magerr | \n", "
|---|---|---|---|
| 0 | \n", "52653.465077 | \n", "14.794 | \n", "0.015 | \n", "
| 1 | \n", "52653.479789 | \n", "14.843 | \n", "0.015 | \n", "
| 2 | \n", "52653.495440 | \n", "14.814 | \n", "0.015 | \n", "
| 3 | \n", "52653.511324 | \n", "14.707 | \n", "0.013 | \n", "
| 4 | \n", "52653.526089 | \n", "14.635 | \n", "0.012 | \n", "