%matplotlib inline import numpy as np import matplotlib.pyplot as plt from scipy import stats # use seaborn plotting defaults # If this causes an error, you can comment it out. import seaborn as sns sns.set() from astroML.datasets import fetch_LINEAR_geneva data = fetch_LINEAR_geneva() print(data.shape) data[0] print(data.dtype.names) data['RA'] feature_names = ['ug', 'gi', 'iK', 'JK', 'logP', 'amp', 'skew'] X = np.vstack([data[f] for f in feature_names]).T X.shape data['LINEARobjectID'] from astroML.datasets import fetch_LINEAR_sample lightcurves = fetch_LINEAR_sample() print(lightcurves) lc = lightcurves.get_light_curve(10003298) lc.shape t, y, dy = lc.T plt.errorbar(t, y, dy, fmt='o'); lc_index = 20 lc_id = data['LINEARobjectID'][lc_index] lc_id lc = lightcurves.get_light_curve(int(lc_id)) t, y, dy = lc.T P = 10 ** data['logP'][lc_index] phase = t % P plt.errorbar(phase, y, dy, fmt='o');