Exemplo n.º 1
0
def createStepList(params, true_normal, grid_settings):
    """
    No matter how many params are listed as free, force only theta23 to be free.
    """

    new_params = fixAllButTheta23(params)

    free_params = select_hierarchy(get_free_params(new_params),
                                   normal_hierarchy=true_normal)
    fixed_params = select_hierarchy(get_fixed_params(new_params),
                                    normal_hierarchy=true_normal)
    calc_steps(free_params, grid_settings['steps'])

    # Form list from all parameters that holds a list of (name,step) tuples.

    steplist = free_params['theta23']['steps']

    return steplist
Exemplo n.º 2
0
def createStepList(params,true_normal,grid_settings):
    """
    No matter how many params are listed as free, force only theta23 to be free.
    """

    new_params = fixAllButTheta23(params)

    free_params = select_hierarchy(get_free_params(new_params),
                                   normal_hierarchy=true_normal)
    fixed_params = select_hierarchy(get_fixed_params(new_params),
                                    normal_hierarchy=true_normal)
    calc_steps(free_params, grid_settings['steps'])

    # Form list from all parameters that holds a list of (name,step) tuples.

    steplist = free_params['theta23']['steps']

    return steplist
Exemplo n.º 3
0
        results[data_tag] = {}

        data_params = select_hierarchy(params,normal_hierarchy=data_normal)
        asimov_data_set = get_asimov_fmap(template_maker,get_values(data_params),
                                          chan=channel)
        results[data_tag]['asimov_data'] = asimov_data_set
        hypo_types = [('hypo_NMH',True)]
        #hypo_types = [('hypo_NMH',True),('hypo_IMH',False)]
        for hypo_tag, hypo_normal in hypo_types:

            hypo_params = select_hierarchy(params,normal_hierarchy=hypo_normal)
            # Now scan over theta23,deltam31 values and fix params to
            # these values:
            # Calculate steps for all free parameters
            atm_params = get_atm_params(hypo_params)
            calc_steps(atm_params, grid_settings['steps'])

            # Build a list from all parameters that holds a list of (name, step) tuples
            steplist = [ [(name,step) for step in param['steps']]
                         for name, param in sorted(atm_params.items())]

            print "steplist: ",steplist
            print "atm_params: ",atm_params

            # Prepare to store all the steps
            steps = {key:[] for key in atm_params.keys()}
            steps['llh'] = []

            # Iterate over the cartesian product, and set fixed parameter to value
            for pos in product(*steplist):
                pos_dict = dict(list(pos))
Exemplo n.º 4
0
        results[data_tag] = {}

        data_params = select_hierarchy(params,normal_hierarchy=data_normal)
        asimov_data_set = get_asimov_fmap(template_maker,get_values(data_params),
                                          chan=channel)
        results[data_tag]['asimov_data'] = asimov_data_set
        hypo_types = [('hypo_NMH',True)]
        #hypo_types = [('hypo_NMH',True),('hypo_IMH',False)]
        for hypo_tag, hypo_normal in hypo_types:

            hypo_params = select_hierarchy(params,normal_hierarchy=hypo_normal)
            # Now scan over theta23,deltam31 values and fix params to
            # these values:
            # Calculate steps for all free parameters
            atm_params = get_atm_params(hypo_params)
            calc_steps(atm_params, grid_settings['steps'])

            # Build a list from all parameters that holds a list of (name, step) tuples
            steplist = [ [(name,step) for step in param['steps']]
                         for name, param in sorted(atm_params.items())]

            print "steplist: ",steplist
            print "atm_params: ",atm_params

            # Prepare to store all the steps
            steps = {key:[] for key in atm_params.keys()}
            steps['llh'] = []

            # Iterate over the cartesian product, and set fixed parameter to value
            for pos in product(*steplist):
                pos_dict = dict(list(pos))