コード例 #1
0
def great_deluge_alternating_test():
    print('great_deluge_alternating')
    length = []
    number_of_codes = []
    great_deluge_codes = []
    great_deluge_values = []
    for i in range(8, 20):
        print(i)
        for j in range(4, 10):
            print(j)
            length.append(i)
            number_of_codes.append(j)
            x = great_deluge_handler(i, great_deluge_alternating, j)
            great_deluge_codes.append(x[0])
            great_deluge_values.append(x[1])

    df = pd.DataFrame({
        'Length': length,
        'Number of codes': number_of_codes,
        'Code': great_deluge_codes,
        'PSL Value': great_deluge_values
    })
    writer = pd.ExcelWriter('great_deluge_alternating.xlsx',
                            engine='xlsxwriter')
    df.to_excel(writer, sheet_name='Sheet1')
    writer.save()
コード例 #2
0
def great_deluge_tests():
    print('great deluge polyphase')
    great_deluge = ['NA', 'NA']
    for i in range(2, 39):
        print(i)
        x = great_deluge_handler(i)
        great_deluge.append(max(0, x[1].real - 1))
    df = pd.DataFrame({'Great Deluge': great_deluge})
    writer = pd.ExcelWriter('great_deluge_test_arb_polyphase.xlsx',
                            engine='xlsxwriter')
    df.to_excel(writer, sheet_name='Sheet1')
    writer.save()
コード例 #3
0
def best_polyphase_gen_codes_N6_tests():
    print('best polyphase 6')
    lengths = []
    great_deluge_codes = []
    great_deluge_values = []
    for i in range(5, 46, 5):
        print(i)
        lengths.append(i)
        x = great_deluge_handler(i, N=6)
        great_deluge_codes.append(x[0])
        great_deluge_values.append(x[1])
    df = pd.DataFrame({
        'Length': lengths,
        'Code': great_deluge_codes,
        'Value': great_deluge_values
    })
    writer = pd.ExcelWriter('best_polyphase_N6.xlsx', engine='xlsxwriter')
    df.to_excel(writer, sheet_name='Sheet1')
    writer.save()