Example #1
0
def analysis_exp_1010():
    """1009NCDKHT-b"""

    # code for simulation folders
    datename = ['1009', '1010']
    probname = ['b', 's']
    pername = [5, 100]
    config = ['NCDKHT', 'DCDKHT']
    n_runs = 1000

    rp = RiskPlot()
    parent_folders = list()
    parent_folders.append(rp.assemble_parent_name(datename[0], config[0], probname[0]))
    parent_folders.append(rp.assemble_parent_name(datename[1], config[1], probname[0]))

    parent_folders.append(rp.assemble_parent_name(datename[1], config[0], probname[1]))
    parent_folders.append(rp.assemble_parent_name(datename[1], config[1], probname[1]))

    # NC-b
    stats_nc_b = MyStats(parent_folders[0], n_runs, pername[1])
    # MyStats(parent_folders[0], n_runs, pername[0])

    # DC-b
    stats_dc_b = MyStats(parent_folders[1], n_runs, pername[1])
    # MyStats(parent_folders[1], n_runs, pername[0])

    # rp.add_stats(stats_nc_b)
    # rp.add_stats(stats_dc_b)
    rp.plot_stat([stats_nc_b.cum_success_rate, stats_dc_b.cum_success_rate], 'Success Rate', ['NC', 'DC'])

    # # NC-s
    # stats_nc_s = MyStats(parent_folders[2], n_runs, pername[1])
    # MyStats(parent_folders[2], n_runs, pername[0])
    #
    # # DC-s
    # stats_dc_s = MyStats(parent_folders[3], n_runs, pername[1])
    #
    # rp.add_stats(stats_nc_s)
    # rp.add_stats(stats_dc_s)
    # rp.plot_stat()

    return
Example #2
0
def analysis_exp_1012():

    rp = RiskPlot()

    datename = ['1012', '1013']
    config = ['DCDKHT', 'NCDKHT']
    extra_id = ['PK', '100', '05', 'NA', 'NFOV']

    pername = [5, 100]
    n_runs = 1000
    perception = 'point'

    folders = []

    """1012DCDKHT-h-PK"""
    folders.append(rp.assemble_parent_name(datename[0], config[0], extra_id[0])[0])
    """1012DCDKHT-h-100"""
    folders.append(rp.assemble_parent_name(datename[0], config[0], extra_id[1])[0])
    """1012DCDKHT-h-05"""
    folders.append(rp.assemble_parent_name(datename[0], config[0], extra_id[2])[0])
    """1012NCDKHT-h-NA"""
    folders.append(rp.assemble_parent_name(datename[0], config[1], extra_id[3])[0])

    folders.append('1013NCNKHT-n-0')

    """1013NCDKHT-h-NFOV """
    folders.append(rp.assemble_parent_name(datename[1], config[0], extra_id[4])[0])
    #
    subtitle = ['Perfect Knowledge', '100\% images', '5\% images', 'No Constraints', 'No Danger', 'no FOV']

    # rp.retrieve_data(folders[0], 'DCDKHT_100hpoint_PK_G46Vss2_1012_', subtitle[0])
    # rp.retrieve_data(folders[1], 'DCDKHT_100hpoint_G46Vss2_1012_', subtitle[1])
    # rp.retrieve_data(folders[2], 'DCDKHT_05hpoint_G46Vss2_1012_', subtitle[2])
    # rp.retrieve_data(folders[3], 'NCDKHT_NAhpoint_G46Vss2_1012_', subtitle[3])
    # rp.retrieve_data(folders[4], 'NCNKHT_NApoint_G46Vss2_1013_', subtitle[4])

    subtitle.append('no FOV')
    rp.retrieve_data(folders[5], 'DCDKHT_05hpoint_NFOV_G46Vss2_1013_', subtitle[4])