From 7a70c7a879311786e1836d4ab434949a67771a51 Mon Sep 17 00:00:00 2001 From: shivesh Date: Sun, 14 Apr 2019 18:25:32 +0100 Subject: misc --- command | 4 ---- fig2.py | 26 +++++--------------------- misc/command | 4 ++++ 3 files changed, 9 insertions(+), 25 deletions(-) delete mode 100644 command create mode 100644 misc/command diff --git a/command b/command deleted file mode 100644 index 1b34686..0000000 --- a/command +++ /dev/null @@ -1,4 +0,0 @@ -python contour.py --data real --debug true --nsteps 100 --burnin 10 --nwalkers 20 --outfile ./test_ --seed 26 --stat-method bayesian --threads max -python sens.py --debug True --data real --datadir ./test --dimension 6 --eval-segment 1 --mn-live-points 100 --mn-output ./test --mn-tolerance 0.3 --seed 26 --segments 10 --source-ratio 1 2 0 --stat-method bayesian --threads 4 --texture oeu - -python plot_sens.py --data real --datadir /data/user/smandalia/flavour_ratio/data/sensitivity/ --dimensions 6 --plot-x True --segments 10 --x-segments 20 --split-jobs True --stat-method bayesian --texture none diff --git a/fig2.py b/fig2.py index e60c987..c6692f3 100755 --- a/fig2.py +++ b/fig2.py @@ -19,13 +19,11 @@ from utils import fr as fr_utils from utils import misc as misc_utils from utils import plot as plot_utils from utils.enums import str_enum -from utils.enums import Likelihood, ParamTag, PriorsCateg +from utils.enums import ParamTag, PriorsCateg from utils.param import Param, ParamSet from matplotlib import pyplot as plt -from pymultinest import Analyzer - def define_nuisance(): """Define the nuisance parameters.""" @@ -44,9 +42,8 @@ def define_nuisance(): def get_paramsets(args, nuisance_paramset): paramset = [] - if args.likelihood in [Likelihood.GOLEMFIT, Likelihood.GF_FREQ]: - gf_nuisance = [x for x in nuisance_paramset.from_tag(ParamTag.NUISANCE)] - paramset.extend(gf_nuisance) + gf_nuisance = [x for x in nuisance_paramset.from_tag(ParamTag.NUISANCE)] + paramset.extend(gf_nuisance) tag = ParamTag.BESTFIT paramset.extend([ Param(name='astroFlavorAngle1', value=0, ranges=[0., 1.], std=0.2, tag=tag), @@ -58,14 +55,7 @@ def get_paramsets(args, nuisance_paramset): def process_args(args): """Process the input args.""" - if args.likelihood is not Likelihood.GOLEMFIT \ - and args.likelihood is not Likelihood.GF_FREQ: - raise AssertionError( - 'Likelihood method {0} not supported for this ' - 'script!\nChoose either GOLEMFIT or GF_FREQ'.format( - str_enum(args.likelihood) - ) - ) + pass def parse_args(args=None): """Parse command line arguments""" @@ -74,12 +64,7 @@ def parse_args(args=None): formatter_class=misc_utils.SortingHelpFormatter, ) parser.add_argument( - '--likelihood', default='golemfit', - type=partial(misc_utils.enum_parse, c=Likelihood), - choices=Likelihood, help='likelihood contour' - ) - parser.add_argument( - '--contour-dir', type=str, + '--datadir', type=str, help='Path to directory containing MultiNest runs' ) parser.add_argument( @@ -100,7 +85,6 @@ def main(): print n_params chains = np.load('/data/user/smandalia/flavour_ratio/data/contour_emcee/golemfit/real/_GOLEMFIT_REAL_emcee_.npy') - # chains = np.load('/data/user/smandalia/flavour_ratio/data/contour_emcee/golemfit/real/more_sys_flat/_GOLEMFIT_REAL_emcee_.npy') print chains flavour_angles = chains[:,-2:] diff --git a/misc/command b/misc/command new file mode 100644 index 0000000..1b34686 --- /dev/null +++ b/misc/command @@ -0,0 +1,4 @@ +python contour.py --data real --debug true --nsteps 100 --burnin 10 --nwalkers 20 --outfile ./test_ --seed 26 --stat-method bayesian --threads max +python sens.py --debug True --data real --datadir ./test --dimension 6 --eval-segment 1 --mn-live-points 100 --mn-output ./test --mn-tolerance 0.3 --seed 26 --segments 10 --source-ratio 1 2 0 --stat-method bayesian --threads 4 --texture oeu + +python plot_sens.py --data real --datadir /data/user/smandalia/flavour_ratio/data/sensitivity/ --dimensions 6 --plot-x True --segments 10 --x-segments 20 --split-jobs True --stat-method bayesian --texture none -- cgit v1.2.3