コード例 #1
0
ファイル: test_utils.py プロジェクト: FedeMPouzols/Savu
def load_test_data(exp_type):
    options = set_experiment(exp_type)

    plugin_list = []
    ID = options['loader']
    name = pu.module2class(ID.split('.')[-1])
    plugin_list.append(set_plugin_entry(name, ID, {}))
    ID = options['saver']
    name = pu.module2class(ID.split('.')[-1])
    plugin_list.append(set_plugin_entry(name, ID, {}))

    # currently assuming an empty parameters dictionary
    options['plugin_list'] = plugin_list
    return plugin_runner(options)
コード例 #2
0
ファイル: test_utils.py プロジェクト: markbasham/Savu
def load_test_data(exp_type):
    options = set_experiment(exp_type)

    plugin_list = []
    ID = options['loader']
    name = pu.module2class(ID.split('.')[-1])
    plugin_list.append(set_plugin_entry(name, ID, {}))
    ID = options['saver']
    name = pu.module2class(ID.split('.')[-1])
    plugin_list.append(set_plugin_entry(name, ID, {}))

    # currently assuming an empty parameters dictionary
    options['plugin_list'] = plugin_list
    return plugin_runner(options)
コード例 #3
0
ファイル: test_utils.py プロジェクト: FedeMPouzols/Savu
def set_plugin_list(options, pnames, *args):
    args = args[0] if args else None
    plugin_names = pnames if isinstance(pnames, list) else [pnames]
    options['plugin_list'] = []
    ID = [options['loader'], options['saver']]
    data = [{}, {}] if not args else [args[0], args[-1]]
    for i in range(len(plugin_names)):
        ID.insert(i+1, plugin_names[i])
        plugin = pu.load_plugin(plugin_names[i])
        data_dict = set_data_dict(['tomo'], get_output_datasets(plugin))
        data_dict = args[i+1] if args else data_dict
        data.insert(i+1, data_dict)

    for i in range(len(ID)):
        name = pu.module2class(ID[i].split('.')[-1])
        options['plugin_list'].append(set_plugin_entry(name, ID[i], data[i]))
コード例 #4
0
ファイル: test_utils.py プロジェクト: markbasham/Savu
def set_plugin_list(options, pnames, *args):
    args = args[0] if args else None
    plugin_names = pnames if isinstance(pnames, list) else [pnames]
    options['plugin_list'] = []
    ID = [options['loader'], options['saver']]
    data = [{}, {}] if not args else [args[0], args[-1]]
    for i in range(len(plugin_names)):
        ID.insert(i+1, plugin_names[i])
        plugin = pu.load_plugin(plugin_names[i])
        data_dict = set_data_dict(['tomo'], get_output_datasets(plugin))
        data_dict = args[i+1] if args else data_dict
        data.insert(i+1, data_dict)

    for i in range(len(ID)):
        name = pu.module2class(ID[i].split('.')[-1])
        options['plugin_list'].append(set_plugin_entry(name, ID[i], data[i]))