diff options
| author | shivesh <s.p.mandalia@qmul.ac.uk> | 2018-05-08 15:47:34 -0500 |
|---|---|---|
| committer | shivesh <s.p.mandalia@qmul.ac.uk> | 2018-05-08 15:47:34 -0500 |
| commit | 1db253ea053fc8f0f9d3663fc5c774d47c91a137 (patch) | |
| tree | f6a257485d9ef9b598279b824290e674fe8b9b18 /plot_llh/mcmc_mixing.py | |
| parent | e9b62e357c95eec6bc3cb28e5eae9d99a6556e37 (diff) | |
| download | GolemFlavor-1db253ea053fc8f0f9d3663fc5c774d47c91a137.tar.gz GolemFlavor-1db253ea053fc8f0f9d3663fc5c774d47c91a137.zip | |
add fixed mixing llh plots scripts
Diffstat (limited to 'plot_llh/mcmc_mixing.py')
| -rw-r--r-- | plot_llh/mcmc_mixing.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/plot_llh/mcmc_mixing.py b/plot_llh/mcmc_mixing.py index a51bb43..015e74f 100644 --- a/plot_llh/mcmc_mixing.py +++ b/plot_llh/mcmc_mixing.py @@ -9,6 +9,7 @@ import sys import argparse import multiprocessing +from fractions import gcd import numpy as np from scipy.stats import multivariate_normal @@ -19,6 +20,12 @@ import tqdm DTYPE = np.float128 CDTYPE = np.complex128 + +def solve_ratio(fr): + denominator = reduce(gcd, fr) + return [int(x/denominator) for x in fr] + + def normalise_fr(fr): return np.array(fr) / float(np.sum(fr)) @@ -247,8 +254,9 @@ def main(): pass print "Finished" - outfile = args.outfile+'_{0:03d}_{1:03d}_{2:03d}_{3:.1E}'.format( - int(MEASURED_FR[0]*100), int(MEASURED_FR[1]*100), int(MEASURED_FR[2]*100), SIGMA + sr = solve_ratio(SOURCE_FR) + outfile = args.outfile+'_{0}_{1}_{2}_{3:.1E}_{4:.2f}_{5:.2f}_{6:.2f}'.format( + sr[0], sr[1], sr[2], SIGMA, ANGLES[0], ANGLES[1], ANGLES[2] ) samples = sampler.chain[0, :, :, :].reshape((-1, ndim)) |
