def sample_light_curve_2(phased=True):
    from astroML.datasets import fetch_LINEAR_sample
    data = fetch_LINEAR_sample()
    t, y, dy = data[10022663].T

    if phased:
        P_best = 0.61596079804
        t /= P_best

    return (t, y, dy)
def sample_light_curve(phased=True):
    from astroML.datasets import fetch_LINEAR_sample
    data = fetch_LINEAR_sample()
    t, y, dy = data[18525697].T

    if phased:
        P_best = 0.580313015651
        t /= P_best

    return (t, y, dy)
Esempio n. 3
0
def sample_light_curve_2(phased=True):
    from astroML.datasets import fetch_LINEAR_sample
    data = fetch_LINEAR_sample()
    t, y, dy = data[10022663].T

    if phased:
        P_best = 0.61596079804
        t /= P_best

    return (t, y, dy)
Esempio n. 4
0
def sample_light_curve(phased=True):
    from astroML.datasets import fetch_LINEAR_sample
    data = fetch_LINEAR_sample()
    t, y, dy = data[18525697].T

    if phased:
        P_best = 0.580313015651
        t /= P_best

    return (t, y, dy)
Esempio n. 5
0
# Author: Jake VanderPlas <*****@*****.**>
# License: BSD
#   The figure produced by this code is published in the textbook
#   "Statistics, Data Mining, and Machine Learning in Astronomy" (2013)
#   For more information, see http://astroML.github.com
import numpy as np
from matplotlib import pyplot as plt

from astroML.time_series import\
    lomb_scargle, search_frequencies, multiterm_periodogram
from astroML.datasets import fetch_LINEAR_sample

#id, period = 11375941, 58.4
id, period = 18525697, 17.05

data = fetch_LINEAR_sample()
t, y, dy = data[id].T

#omega, power = search_frequencies(t, y, dy)
#period = omega[np.argmax(power)]
#print period
#exit()

omega = np.linspace(period, period + 0.1, 1000)
ax = plt.subplot(211)
for n_terms in [1, 2, 3]:
    P1 = multiterm_periodogram(t, y, dy, omega, n_terms=n_terms)
    plt.plot(omega, P1, lw=1, label='m = %i' % n_terms)
plt.legend(loc=2)
plt.xlim(period, period + 0.1)
plt.ylim(0, 1.0)
def get_linear_id_list():
    data = fetch_LINEAR_sample()
    return data.ids
 def __init__(self, id = 10040133):
     self.LINEAR_data = fetch_LINEAR_sample()
     self.id = id
     self.t, self.mag, self.dmag = self.LINEAR_data.get_light_curve(self.id).T