aboutsummaryrefslogtreecommitdiffstats
path: root/fig2.py
diff options
context:
space:
mode:
authorshivesh <s.p.mandalia@qmul.ac.uk>2019-04-15 17:48:46 +0100
committershivesh <s.p.mandalia@qmul.ac.uk>2019-04-15 17:48:46 +0100
commit8d560bf7d1bb78ebf31f23581c51d9a3ac7204c2 (patch)
treeeceab60e2448dea63c903bf2ee36e6d55f32f568 /fig2.py
parent50729d20db0e832993a61dd8ae99993eaa3b73ea (diff)
downloadGolemFlavor-8d560bf7d1bb78ebf31f23581c51d9a3ac7204c2.tar.gz
GolemFlavor-8d560bf7d1bb78ebf31f23581c51d9a3ac7204c2.zip
fig2 refactor
Diffstat (limited to 'fig2.py')
-rwxr-xr-xfig2.py19
1 files changed, 9 insertions, 10 deletions
diff --git a/fig2.py b/fig2.py
index a284e9d..5c071f9 100755
--- a/fig2.py
+++ b/fig2.py
@@ -67,10 +67,6 @@ def parse_args(args=None):
'--datadir', type=str,
help='Path to directory containing MultiNest runs'
)
- parser.add_argument(
- '--outfile', type=str, default='./untitled',
- help='Output path'
- )
if args is None: return parser.parse_args()
else: return parser.parse_args(args.split())
@@ -82,13 +78,13 @@ def main():
paramset = get_paramsets(args, define_nuisance())
n_params = len(paramset)
- print n_params
+ print 'n_params', n_params
- chains = np.load('/data/user/smandalia/flavour_ratio/data/contour/contour_REAL.npy')
- # chains = np.load('/data/user/smandalia/flavour_ratio/data/contour_emcee/golemfit/real/more_sys_flat/_GOLEMFIT_REAL_emcee_.npy')
+ prefix = ''
+ contour_infile = args.datadir + '/contour' + prefix + '_REAL.npy'
+ contour_chains = np.load(contour_infile)
- print chains
- flavour_angles = chains[:,-2:]
+ flavour_angles = contour_chains[:,-2:]
flavour_ratios = np.array(
map(fr_utils.angles_to_fr, flavour_angles)
)
@@ -130,7 +126,10 @@ def main():
ax.legend()
- fig.savefig('test_emcee_moresys_flat.png', bbox_inches='tight', dpi=150)
+ outfile = args.datadir[:5]+args.datadir[5:].replace('data', 'plots')
+ outfile += '/fig2' + prefix + '.png'
+ print 'Saving plot as {0}'.format(outfile)
+ fig.savefig(outfile, bbox_inches='tight', dpi=150)
print "DONE!"