예제 #1
0
import pta_sim.pint_sim as pint_sim
import pta_sim.noise as nutils
import pta_sim.parse_sim as parse_sim
from pta_sim.bayes import chain_length_bool, save_core, get_freqs, filter_psr_path

args = parse_sim.arguments()

from astropy import log

log.setLevel('CRITICAL')

par = args.parpath
tim = args.timpath

ts = toa.get_TOAs(tim, usepickle=False)
m = models.get_model(par)

if args.process is None:
    seed_rn = None
    seed_dmrn = None
    seed_ef = None
    seed_ec = None
    seed_eq = None
else:
    seed_rn = 1978 + args.process
    seed_dmrn = 666 + args.process
    seed_ef = 1492 + args.process
    seed_ec = 1554 + args.process
    seed_eq = 2000 + args.process

pint_sim.make_ideal(ts, m)
예제 #2
0
import pta_sim
import pta_sim.bayes as bys
import pta_sim.parse_sim as parse_sim
args = parse_sim.arguments()

#Is chain longer than niter?


if args.pickle=='no_pickle':
    if args.use_pint:
        parfile = args.pardir + args.psr + '*.gls.par'
        timfile = args.timdir + args.psr + '*.tim'

        t=toa.get_TOAs(timfile)
        m=models.get_model(parfile)
        f=fit.GLSFitter(t,m)
        f.fit_toas(maxiter=2)

        psr = Pulsar(t, f.model, ephem='DE436')
    else:
        if args.psr == 'J1713+0747':
            parfile = glob.glob(args.pardir + args.psr + '*.t2.*par')[0]
        else:
            parfile = glob.glob(args.pardir + args.psr + '*.gls.*par')[0]

        timfile = glob.glob(args.timdir + args.psr + '*.tim')[0]
        psr = Pulsar(parfile, timfile, ephem='DE436')
else:
    with open(args.pickle, 'rb') as fin:
        psrs = pickle.load(fin,encoding='latin1')