Esempio n. 1
0
def prior(cube, ndim, nparams):
    # Prior on "txi" is uniform between -1 and 1. txi is a transform of xi such that xi = abs(txi) so thing is symmetric around 0.
    cube[0] = utils.transform_uniform(cube[0], 0., 1.)
    # Prior on nightside temperature is uniform from 0 to 3000:
    cube[1] = utils.transform_uniform(cube[1], 0., 3000.)
    # Prior on delta temperature goes from 0 to 3000 as well:
    cube[2] = utils.transform_uniform(cube[1], 0., 3000.)
Esempio n. 2
0
def prior(cube):
    # Prior on "median flux" is uniform:
    cube[0] = utils.transform_uniform(cube[0], -2., 2.)
    # Pior on the log-jitter term (note this is the log VARIANCE, not sigma); from 0.01 to 100 ppm:
    cube[1] = utils.transform_uniform(cube[1], np.log((0.01e-3)**2),
                                      np.log((100e-3)**2))
    pcounter = 2
    # Prior on coefficients of comparison stars:
    if compfilename is not None:
        for key in nights:
            for i in range(nights[key][3].shape[0]):
                cube[pcounter] = utils.transform_uniform(
                    cube[pcounter], -10, 10)
                pcounter += 1

    # Prior on kernel maximum variance; from 0.01 to 100 mmag:
    cube[pcounter] = utils.transform_loguniform(cube[pcounter],
                                                (0.01 * 1e-3)**2,
                                                (100 * 1e-3)**2)
    pcounter = pcounter + 1

    # Now priors on the alphas = 1/lambdas; gamma(1,1) = exponential, same as Gibson+:
    for key in nights:
        for i in range(nights[key][2].shape[0]):
            cube[pcounter] = utils.transform_exponential(cube[pcounter])
            pcounter += 1
    return cube
def prior(cube, ndim, nparams):
    # Prior on la0
    cube[0] = utils.transform_uniform(cube[0], -np.pi, np.pi)
    #cube[0] = utils.transform_uniform(cube[0],-180.,180.)
    # Prior on lo0:
    #cube[1] = utils.transform_uniform(cube[1],-90.,90.)
    cube[1] = utils.transform_uniform(cube[1], -np.pi / 2., np.pi / 2.)
    # Log10 of spherical harmonic coefficient:
    cube[2] = utils.transform_uniform(cube[2], -6, -2.)
    cube[3] = utils.transform_uniform(cube[3], -6, -2.)
Esempio n. 4
0
def prior(cube, ndim, nparams):
    # Prior on "median flux" is uniform:
    cube[0] = utils.transform_uniform(cube[0],-2.,2.)
    # Pior on the log-jitter term (note this is the log VARIANCE, not sigma); from 1 to 10,000 ppm:
    cube[1] = utils.transform_uniform(cube[1],np.log((1e-6)**2),np.log((10000e-6)**2))
    # Prior on the planet-to-star radius ratio:
    cube[2] = utils.transform_truncated_normal(cube[2],pmean,psd)
    # (Transformed) limb-darkening coefficients:
    cube[3] = utils.transform_uniform(cube[3],0.,1.)
    pcounter = 4
    if ld_law != 'linear':
        cube[pcounter] = utils.transform_uniform(cube[pcounter],0.,1.)
        pcounter = pcounter + 1
    # Prior on kernel maximum variance; from 1 to 10,000 ppm: 
    cube[pcounter] = utils.transform_loguniform(cube[pcounter],(1*1e-6)**2,(10000*1e-6)**2)
    pcounter = pcounter + 1
    # Now priors on the alphas = 1/lambdas; gamma(1,1) = exponential, same as Gibson+:
    for i in range(X.shape[0]):
        cube[pcounter] = utils.transform_exponential(cube[pcounter])
        pcounter = pcounter + 1    
Esempio n. 5
0
def prior(cube, ndim, nparams):
    # Prior on "median flux" is uniform:
    cube[0] = utils.transform_uniform(cube[0],0.5,1.5)
    # Prior on log-"amplitude" is uniform:
    cube[1] = utils.transform_uniform(cube[1],-30,30.)
    # Prior on log-"timescale" is also uniform:
    cube[2] = utils.transform_uniform(cube[2],-30,30)
    # Prior on log-period:
    cube[3] = utils.transform_uniform(cube[3],min_timescale,max_timescale)
    # Prior on the log-factor:
    cube[4] = utils.transform_uniform(cube[4],-30.,30.)
    # Pior on the log-jitter term:
    cube[5] = utils.transform_uniform(cube[5],-100.,30.)
Esempio n. 6
0
def prior(cube, ndim, nparams):
    # Prior on GP lamplitude:
    cube[0] = utils.transform_uniform(cube[0], -10, 10)
    # Prior on GP llengthscale:
    cube[1] = utils.transform_uniform(cube[1], -10, 10)
Esempio n. 7
0
def prior(cube):
    # Prior on "median flux" is uniform:
    cube[0] = utils.transform_uniform(cube[0], -2., 2.)

    # Pior on the log-jitter term (note this is the log VARIANCE, not sigma); from 0.01 to 100 ppm:
    cube[1] = utils.transform_uniform(cube[1], np.log((0.01e-3)**2),
                                      np.log((100e-3)**2))

    # Prior on t0:
    if t0mean is None:
        cube[2] = utils.transform_uniform(cube[2], np.min(t), np.max(t))
    else:
        cube[2] = utils.transform_normal(cube[2], t0mean, t0sd)

    # Prior on Period:
    if Pmean is None:
        cube[3] = utils.transform_loguniform(cube[3], 0.1, 1000.)
    else:
        cube[3] = utils.transform_normal(cube[3], Pmean, Psd)

    # Prior on planet-to-star radius ratio:
    if pmean is None:
        cube[4] = utils.transform_uniform(cube[4], 0, 1)
    else:
        cube[4] = utils.transform_truncated_normal(cube[4], pmean, psd)

    # Prior on a/Rs:
    if amean is None:
        cube[5] = utils.transform_uniform(cube[5], 0.1, 300.)
    else:
        cube[5] = utils.transform_normal(cube[5], amean, asd)

    # Prior on impact parameter:
    if bmean is None:
        cube[6] = utils.transform_uniform(cube[6], 0, 2.)
    else:
        cube[6] = utils.transform_truncated_normal(cube[6],
                                                   bmean,
                                                   bsd,
                                                   a=0.,
                                                   b=2.)

    # Prior either on the linear LD or the transformed first two-parameter law LD (q1):
    cube[7] = utils.transform_uniform(cube[7], 0, 1.)

    pcounter = 8
    # (Transformed) limb-darkening coefficient for two-parameter laws (q2):
    if ld_law != 'linear':
        cube[pcounter] = utils.transform_uniform(cube[pcounter], 0, 1.)
        pcounter += 1

    if not circular:
        if eccmean is None:
            cube[pcounter] = utils.transform_uniform(cube[pcounter], 0, 1.)
        else:
            cube[pcounter] = utils.transform_truncated_normal(cube[pcounter],
                                                              eccmean,
                                                              eccsd,
                                                              a=0.,
                                                              b=1.)
        pcounter += 1
        if omegamean is None:
            cube[pcounter] = utils.transform_uniform(cube[pcounter], 0, 360.)
        else:
            cube[pcounter] = utils.transform_truncated_normal(cube[pcounter],
                                                              omegamean,
                                                              omegasd,
                                                              a=0.,
                                                              b=360.)
        pcounter += 1

    # Prior on coefficients of comparison stars:
    if compfilename is not None:
        for key in nights:
            for i in range(nights[key][3].shape[0]):
                cube[pcounter] = utils.transform_uniform(
                    cube[pcounter], -10, 10)
                pcounter += 1

    # Prior on kernel maximum variance; from 0.01 to 100 mmag:
    cube[pcounter] = utils.transform_loguniform(cube[pcounter],
                                                (0.01 * 1e-3)**2,
                                                (100 * 1e-3)**2)
    pcounter = pcounter + 1

    # Now priors on the alphas = 1/lambdas; gamma(1,1) = exponential, same as Gibson+:
    for key in nights:
        for i in range(nights[key][2].shape[0]):
            cube[pcounter] = utils.transform_exponential(cube[pcounter])
            pcounter += 1
    return cube
Esempio n. 8
0
def prior(cube, ndim, nparams):
    # Prior on Temperature of spot:
    cube[0] = utils.transform_uniform(cube[0], 4000, 6500)
    # Prior on temperature of WASP-19:
    cube[1] = utils.transform_normal(cube[1], 5460, 90)