示例#1
0
def calc_params(eqrm_flags):
    """
    Calculate parameters used for the other calculations based on event set
    information.
    """
    parallel = Parallel(is_parallel=False)

    # TODO: Do we really need to load this in its entirety?
    (event_set, event_activity,
     source_model) = create_event_set(eqrm_flags, parallel)

    params = {}
    params['num_events'] = len(event_set)
    params['num_gmm_max'] = source_model.get_max_num_atten_models()
    params['num_spawn'] = eqrm_flags.atten_spawn_bins
    params['num_rm'] = event_activity.recurrence_model_count()
    params['num_periods'] = len(eqrm_flags.atten_periods)
    params['use_amplification'] = eqrm_flags.use_amplification
    params['collapse_gmm'] = eqrm_flags.atten_collapse_Sa_of_atten_models

    return params
示例#2
0
文件: nci_utils.py 项目: dynaryu/eqrm
def calc_params(eqrm_flags):
    """
    Calculate parameters used for the other calculations based on event set
    information.
    """
    parallel = Parallel(is_parallel=False)
    
    # TODO: Do we really need to load this in its entirety?
    (event_set, 
     event_activity, 
     source_model) = create_event_set(eqrm_flags, parallel)
    
    params = {}
    params['num_events'] = len(event_set)
    params['num_gmm_max'] = source_model.get_max_num_atten_models()
    params['num_spawn'] = eqrm_flags.atten_spawn_bins
    params['num_rm'] = event_activity.recurrence_model_count()
    params['num_periods'] = len(eqrm_flags.atten_periods)
    params['use_amplification'] = eqrm_flags.use_amplification
    params['collapse_gmm'] = eqrm_flags.atten_collapse_Sa_of_atten_models
    
    return params