Esempio n. 1
0
else:
    if args.hd:
        orf = 'hd'
    else:
        orf = None
    gw = models.common_red_noise_block(psd=args.psd,
                                       prior=prior,
                                       Tspan=Tspan,
                                       orf=orf,
                                       gamma_val=args.gamma_gw,
                                       name='gw')
    model += gw

log10_sigma = parameter.Uniform(-10, -4)
log10_ell = parameter.Uniform(1, 4)
dm_basis = linear_interp_basis_dm(dt=15 * 86400)
dm_prior = se_dm_kernel(log10_sigma=log10_sigma, log10_ell=log10_ell)
dm_gp = gp_signals.BasisGP(dm_prior, dm_basis, name='dm_gp')
dm_block = dm_gp

# Make solar wind signals
print('sw_r2p ', args.sw_r2p)
# if isinstance(args.sw_r2p,(float,int)):
#     args.sw_r2p = [args.sw_r2p]

if args.sw_r2p_ranges is None:
    sw_r2p_ranges = args.sw_r2p
elif len(args.sw_r2p) != len(args.sw_r2p_ranges):
    raise ValueError('Number of SW powers must match number of prior ranges!! '
                     'Set # nonvarying ')
else:
Esempio n. 2
0
    model_kwargs = json.load(fin)

# Add to exponential dips for J1713+0747
#Model, kernel, extra DMGP, Chrom Kernel, Chrom Quad, Index
model_labels = [['A', 'periodic', True, True, 'sq_exp', False, 4]]

ptas = {}
all_kwargs = {}

# Periodic GP kernel for DM
log10_sigma = parameter.Uniform(-10, -4.8)
log10_ell = parameter.Uniform(1, 2.4)
log10_p = parameter.Uniform(-2, -1)
log10_gam_p = parameter.Uniform(-2, 2)

dm_basis = gpk.linear_interp_basis_dm(dt=3 * 86400)
dm_prior = gpk.periodic_kernel(log10_sigma=log10_sigma,
                               log10_ell=log10_ell,
                               log10_gam_p=log10_gam_p,
                               log10_p=log10_p)

dmgp = gp_signals.BasisGP(dm_prior, dm_basis, name='dm_gp1')

# Periodic GP kernel for DM
log10_sigma2 = parameter.Uniform(-4.8, -3)
log10_ell2 = parameter.Uniform(2.4, 5)
log10_p2 = parameter.Uniform(-2, 2)
log10_gam_p2 = parameter.Uniform(-2, 2)

dm_basis2 = gpk.linear_interp_basis_dm(dt=3 * 86400)
dm_prior2 = gpk.periodic_kernel(log10_sigma=log10_sigma2,
Esempio n. 3
0
    ['A', 'periodic', False, True, 'sq_exp', False, 4],
    ['B', 'periodic', True, True, 'sq_exp', False, 4],
    ['C', 'periodic', False, True, 'sq_exp', True, 4],
    ['D', 'periodic', True, True, 'sq_exp', True, 4],
]

ptas = {}
all_kwargs = {}

# Periodic GP kernel for DM
log10_sigma = parameter.Uniform(-4.4, -3)
log10_ell = parameter.Uniform(3, 4)
log10_p = parameter.Uniform(-1, 1)
log10_gam_p = parameter.Uniform(-1.5, 1)

dm_basis = gpk.linear_interp_basis_dm(dt=14 * 86400)
dm_prior = gpk.periodic_kernel(log10_sigma=log10_sigma,
                               log10_ell=log10_ell,
                               log10_gam_p=log10_gam_p,
                               log10_p=log10_p)

dmgp2 = gp_signals.BasisGP(dm_prior, dm_basis, name='dm_gp2')


@signal_base.function
def chromatic_quad(toas, freqs, quad_coeff=np.ones(3) * 1e-10, idx=4):
    """
    Basis for chromatic quadratic function.

    :param idx: index of chromatic dependence