Exemple #1
0
# --------------------------------------------------------------
# ------------------- MAIN PROGRAM -----------------------------
# --------------------------------------------------------------
bands = sys.argv[1]
bands = range(int(bands[0]), int(bands[-1])+1)
band_period = {'1': 30.0, '2': 21.2, '3': 15.0, '4': 10.6, '5': 7.5, '6': 5.3, '7': 3.7, '8': 2.7}

proc_ev_ls = glob.glob(os.path.join(remote_dir, '*.*.*.*'))
print '%s processed events found!' % len(proc_ev_ls)

for i in range(len(bands)):
    all_passed_staev = []
    for j in range(len(proc_ev_ls)):
        # [bands[i]] is passed like this because reader gets list as an input
        # reader(all_stations=False, just_high_cc=False, remove_GSN_median=False):
        all_staev = uf.reader(proc_ev_ls[j], [bands[i]], band_period, all_stations=all_stations,
                              just_high_cc=just_high_cc, remove_GSN_median=remove_GSN_median)
        if not all_staev:
            continue
        passed_staev = uf.filters(all_staev, [bands[i]], xcorr_limit=xcorr_limit)
        if not passed_staev[0]:
            continue

        all_passed_staev.append(passed_staev)

    t_shift_array = []
    for j in range(len(all_passed_staev)):
        # [0] in all_passed_staev[j][0] shows the current band
        # in general we have a loop over bands and in each step there is just
        # one band that we are working with which is accessible by [0]
        for k in range(len(all_passed_staev[j][0])):
            if not all_passed_staev[j][0][k] == []: