示例#1
0
lc.subtract_add_divide_without_outliers(params=hat11_params,
                                        quarterly_max=quarterly_maxes[lc.quarters[0]],
                                        plots=False)
lc_output_path = os.path.join(output_dir,
                              'lc{0:03d}.txt'.format(transit_number))
np.savetxt(lc_output_path, np.vstack([lc.times.jd, lc.fluxes, lc.errors]).T)

# Delete sharp outliers prior to peak-finding
lc.delete_outliers()

transit_model = generate_lc_depth(lc.times_jd, hat11_params.rp**2, hat11_params)
residuals = lc.fluxes - transit_model

# Find peaks in the light curve residuals
best_fit_spot_params = peak_finder(lc.times.jd, residuals, lc.errors,
                                   hat11_params, n_peaks=4, plots=False,
                                   verbose=True)
best_fit_gaussian_model = summed_gaussians(lc.times.jd,
                                           best_fit_spot_params)

# If spots are detected:
if best_fit_spot_params is not None:
    output_path = os.path.join(output_dir,
                               'chains{0:03d}.hdf5'.format(transit_number))
    sampler = run_emcee_seeded(lc, hat11_params, best_fit_spot_params,
                               n_steps=15000, n_walkers=150,
                               output_path=output_path, burnin=0.6,
                               n_extra_spots=0)
#
示例#2
0
文件: k17.py 项目: bmorris3/friedrich
    # Subtract out a transit model
    transit_model = generate_lc_depth(lc.times_jd, depth, hat11_params)
    residuals = lc.fluxes - transit_model

    # Find peaks in the light curve residuals
    best_fit_spot_params = peak_finder(
        lc.times.jd,
        residuals,
        lc.errors,
        hat11_params,
        n_peaks=4,
        plots=False,
        verbose=True)
    best_fit_gaussian_model = summed_gaussians(lc.times.jd,
                                               best_fit_spot_params)

    # If spots are detected:
    if best_fit_spot_params is not None:
        output_path = os.path.join(output_dir,
                                   'chains{0:03d}.hdf5'.format(transit_number))
        sampler = run_emcee_seeded(
            lc,
            hat11_params,
            best_fit_spot_params,
            n_steps=5000,
            n_walkers=200,
            n_threads=32,
            output_path=output_path,
            burnin=0.5,
            n_extra_spots=1)