コード例 #1
0
def generate_pickle(pickle_path_and_filename, flag_verbose = False):

    DEBUG.verbose("Generating pickle", flag_verbose)

    aha = PETW.pe_LV("aha", "PI99aha", 1626, 300)
    aha.path = "/Users/robbert/Developer/Crocodile/Tests/Test_resources/PI99aha_1626_T300/"
    aha.import_data()
    aha.zeropad_by = 4
    aha.absorptive()
    aha.r = [0,0]

    buf = PETW.pe_LV("buf", "PI99buf", 1617, 300)
    buf.path = "/Users/robbert/Developer/Crocodile/Tests/Test_resources/PI99buf_1617_T300/"
    buf.import_data()
    buf.zeropad_by = 4
    buf.absorptive()  
    buf.r = [0,0]

    m = PEME.pe_merge("merge", class_plus = [aha], class_min = [buf])  

    oa = OA.objectarray("merge")
    oa.add_object(m)
    oa.save_objectarray(pickle_path_and_filename, flag_overwrite = True)
コード例 #2
0
ファイル: Pe_tw_tests.py プロジェクト: robbertbloem/Crocodile
 def setUp(self):
     self.flag_verbose = args.verbose
     self.mess = PETW.pe_LV("Test", "PI99aha", 1626, 300, flag_verbose = self.flag_verbose)
コード例 #3
0
    oas = False 
    oam = False 
    
    ###############
    # IMPORT DATA #
    ###############
    if activity == "import" or activity == "import_only" or activity == "all":
        # if oar already exists, don't bother to re-import it
        if not oar:
            oar = OA.objectarray(str(mess_date) + "_r", flag_verbose = flag_verbose)
            import_pickle(oar, pickle_paf_r, mess_array, flag_verbose = flag_verbose)

        # import the data, then save
        for m in mess_array:
            if m[0] not in oar.obj_id_array:
                mess = PETW.pe_LV(m[0], m[1], m[2], m[3], flag_verbose = flag_verbose)
                mess.path = data_path + mess.base_filename + "/"
                mess.import_data(flag_verbose = flag_verbose)
                mess.r_correction[2] = w3_correction
                oar.add_object(mess, flag_verbose = flag_verbose) 

        oar.save_objectarray(pickle_paf_r, flag_verbose = flag_verbose) 
      
    ########################
    # CALCULATE ABSORPTIVE #
    ########################
    if activity == "import" or activity == "r_to_s" or activity == "all":
        if not oar:
            oar = OA.objectarray(str(mess_date) + "_r", flag_verbose = flag_verbose)
            import_pickle(oar, pickle_paf_r, mess_array, flag_verbose = flag_verbose)