def __init__(self): # Fetch the LIGO hanford data self.data, self.dt = fetch_LIGO_large() # subset of the data to plot t0 = 646 T = 2 self.tplot = self.dt * np.arange(T * 4096) self.dplot = self.data[4096 * t0:4096 * (t0 + T)] #print(len(tplot)) #8192 #print(len(dplot)) #8192 self.tplot = self.tplot[::10] self.dplot = self.dplot[::10]
of the detector. The particular data used here is the injected `Big Dog <http://www.ligo.org/news/blind-injection.php>`_ event. """ # Author: Jake VanderPlas <*****@*****.**> # License: BSD # The figure is an example from astroML: see http://astroML.github.com import numpy as np from matplotlib import pyplot as plt from scipy import fftpack from matplotlib import mlab from astroML.datasets import fetch_LIGO_large #------------------------------------------------------------ # Fetch the LIGO hanford data data, dt = fetch_LIGO_large() # subset of the data to plot t0 = 646 T = 2 tplot = dt * np.arange(T * 4096) dplot = data[4096 * t0:4096 * (t0 + T)] tplot = tplot[::10] dplot = dplot[::10] fmin = 40 fmax = 2060 #------------------------------------------------------------ # compute PSD using simple FFT
""" # 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 scipy import fftpack from matplotlib import mlab from astroML.datasets import fetch_LIGO_large #------------------------------------------------------------ # Fetch the LIGO hanford data data, dt = fetch_LIGO_large() # subset of the data to plot t0 = 646 T = 2 tplot = dt * np.arange(T * 4096) dplot = data[4096 * t0: 4096 * (t0 + T)] tplot = tplot[::10] dplot = dplot[::10] fmin = 40 fmax = 2060 #------------------------------------------------------------ # compute PSD using simple FFT