Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(44)  |  Call(28)  |  Derive(0)  |  Import(16)

src/a/s/astroML-0.2/book_figures/chapter10/fig_LS_example.py   astroML(Download)
import numpy as np
from matplotlib import pyplot as plt
from astroML.time_series import\
    lomb_scargle, lomb_scargle_BIC, lomb_scargle_bootstrap
 
period = 10 ** np.linspace(-1, 0, 10000)
omega = 2 * np.pi / period
PS = lomb_scargle(t, y_obs, dy, omega, generalized=True)
 
#------------------------------------------------------------

src/a/s/astroML-HEAD/book_figures/chapter10/fig_LS_example.py   astroML(Download)
import numpy as np
from matplotlib import pyplot as plt
from astroML.time_series import\
    lomb_scargle, lomb_scargle_BIC, lomb_scargle_bootstrap
 
period = 10 ** np.linspace(-1, 0, 10000)
omega = 2 * np.pi / period
PS = lomb_scargle(t, y_obs, dy, omega, generalized=True)
 
#------------------------------------------------------------

src/a/s/astroML-0.2/book_figures/chapter10/fig_sampling.py   astroML(Download)
from matplotlib import pyplot as plt
 
from astroML.time_series import lomb_scargle
 
#----------------------------------------------------------------------
# Compute the periodogram
omega = np.linspace(0, 5, 1001)[1:]
P_obs1 = lomb_scargle(t_obs, y_obs1, dy1, omega)
P_obs2 = lomb_scargle(t_obs, y_obs2, dy2, omega)
P_window = lomb_scargle(t_obs, y_window, 1, omega,
                        generalized=False, subtract_mean=False)
P_true = lomb_scargle(t, y, 1, omega)

src/a/s/astroML-HEAD/book_figures/chapter10/fig_sampling.py   astroML(Download)
from matplotlib import pyplot as plt
 
from astroML.time_series import lomb_scargle
 
#----------------------------------------------------------------------
# Compute the periodogram
omega = np.linspace(0, 5, 1001)[1:]
P_obs1 = lomb_scargle(t_obs, y_obs1, dy1, omega)
P_obs2 = lomb_scargle(t_obs, y_obs2, dy2, omega)
P_window = lomb_scargle(t_obs, y_window, 1, omega,
                        generalized=False, subtract_mean=False)
P_true = lomb_scargle(t, y, 1, omega)

src/a/s/astroML-0.2/paper_figures/CIDU2012/fig_LS_sg_comparison.py   astroML(Download)
from matplotlib import pyplot as plt
 
from astroML.time_series import lomb_scargle
 
#------------------------------------------------------------
sig = np.array([0.1, 0.01, 0.001])
omega = np.linspace(17, 22, 1000)
P_S = lomb_scargle(t, y, dy, omega, generalized=False)
P_G, z = lomb_scargle(t, y, dy, omega, generalized=True, significance=sig)
 

src/a/s/astroML-HEAD/paper_figures/CIDU2012/fig_LS_sg_comparison.py   astroML(Download)
from matplotlib import pyplot as plt
 
from astroML.time_series import lomb_scargle
 
#------------------------------------------------------------
sig = np.array([0.1, 0.01, 0.001])
omega = np.linspace(17, 22, 1000)
P_S = lomb_scargle(t, y, dy, omega, generalized=False)
P_G, z = lomb_scargle(t, y, dy, omega, generalized=True, significance=sig)
 

src/a/s/astroML-0.2/book_figures/chapter10/fig_LS_sg_comparison.py   astroML(Download)
from matplotlib import pyplot as plt
 
from astroML.time_series import \
    lomb_scargle, lomb_scargle_BIC, lomb_scargle_bootstrap
 
    # Notice the typo: we used y rather than y_obs
    if typo is True:
        P_S = lomb_scargle(t, y, dy, omega, generalized=False)
        P_G = lomb_scargle(t, y, dy, omega, generalized=True)
    else:
        P_S = lomb_scargle(t, y_obs, dy, omega, generalized=False)
        P_G = lomb_scargle(t, y_obs, dy, omega, generalized=True)

src/a/s/astroML-HEAD/book_figures/chapter10/fig_LS_sg_comparison.py   astroML(Download)
from matplotlib import pyplot as plt
 
from astroML.time_series import \
    lomb_scargle, lomb_scargle_BIC, lomb_scargle_bootstrap
 
    # Notice the typo: we used y rather than y_obs
    if typo is True:
        P_S = lomb_scargle(t, y, dy, omega, generalized=False)
        P_G = lomb_scargle(t, y, dy, omega, generalized=True)
    else:
        P_S = lomb_scargle(t, y_obs, dy, omega, generalized=False)
        P_G = lomb_scargle(t, y_obs, dy, omega, generalized=True)

src/a/s/astroML-0.2/book_figures/chapter10/fig_LS_comparison.py   astroML(Download)
from matplotlib import pyplot as plt
 
from astroML.time_series import\
    lomb_scargle, search_frequencies, multiterm_periodogram
from astroML.datasets import fetch_LINEAR_sample
    else:
        label = 'standard LS'
    P2 = lomb_scargle(t, y, dy, omega, generalized=generalized)
    plt.plot(omega, P2, lw=1, label=label)
plt.legend(loc=2)

src/a/s/astroML-HEAD/book_figures/chapter10/fig_LS_comparison.py   astroML(Download)
from matplotlib import pyplot as plt
 
from astroML.time_series import\
    lomb_scargle, search_frequencies, multiterm_periodogram
from astroML.datasets import fetch_LINEAR_sample
    else:
        label = 'standard LS'
    P2 = lomb_scargle(t, y, dy, omega, generalized=generalized)
    plt.plot(omega, P2, lw=1, label=label)
plt.legend(loc=2)

  1 | 2  Next