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, log10_ell=log10_ell2, log10_gam_p=log10_gam_p2, log10_p=log10_p2) dmgp2 = gp_signals.BasisGP(dm_prior2, dm_basis2, name='dm_gp2') ch_log10_sigma = parameter.Uniform(-10, -3.5) ch_log10_ell = parameter.Uniform(1, 6) chm_basis = gpk.linear_interp_basis_chromatic(dt=3 * 86400, idx=4) chm_prior = gpk.se_dm_kernel(log10_sigma=ch_log10_sigma, log10_ell=ch_log10_ell) chromgp = gp_signals.BasisGP(chm_prior, chm_basis, name='chrom_gp') # # chromgp = chromatic_noise_block(nondiag_kernel='sq_exp') @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 :return ret: normalized quadratic basis matrix [Ntoa, 3] """
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: sw_r2p_ranges = args.sw_r2p_ranges