Exemplo n.º 1
0
        windows = pyflex.select_windows(obs,
                                        syn,
                                        config,
                                        event=event,
                                        station=stationxml)
        print("Station %s.%s component %s picked %i windows" %
              (stationxml[0].code, stationxml[0][0].code, component,
               len(windows)))
        if not windows:
            continue
        all_windows.append(windows)
    return all_windows


import time

a = time.time()
results = ds.process_two_files_without_parallel_output(other_ds, process)
b = time.time()

if ds.mpi.rank == 0:
    print(results)
    print len(results)

print "Time taken:", b - a

# Important when running with MPI as it might otherwise not be able to finish.
del ds
del other_ds
    synthetic = other_station_group.preprocessed_synthetic_27s_to_60s

    all_windows = []

    for component in ["Z", "R", "T"]:
        obs = observed.select(component=component)
        syn = synthetic.select(component=component)
        if not obs or not syn:
            continue

        windows = pyflex.select_windows(
            obs, syn, config, event=event, station=stationxml)
        print("Station %s.%s component %s picked %i windows" % (
            stationxml[0].code, stationxml[0][0].code, component,
            len(windows)))
        if not windows:
            continue
        all_windows.append(windows)
    return all_windows

import time
a = time.time()
results = ds.process_two_files_without_parallel_output(other_ds, process)
b = time.time()

if ds.mpi.rank == 0:
    print(results)
    print len(results)

print "Time taken:", b - a