當前位置: 首頁>>代碼示例>>Python>>正文


Python ASDFDataSet.process_two_files_without_parallel_output方法代碼示例

本文整理匯總了Python中pyasdf.ASDFDataSet.process_two_files_without_parallel_output方法的典型用法代碼示例。如果您正苦於以下問題:Python ASDFDataSet.process_two_files_without_parallel_output方法的具體用法?Python ASDFDataSet.process_two_files_without_parallel_output怎麽用?Python ASDFDataSet.process_two_files_without_parallel_output使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在pyasdf.ASDFDataSet的用法示例。


在下文中一共展示了ASDFDataSet.process_two_files_without_parallel_output方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: print

# 需要導入模塊: from pyasdf import ASDFDataSet [as 別名]
# 或者: from pyasdf.ASDFDataSet import process_two_files_without_parallel_output [as 別名]
    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
開發者ID:krischer,項目名稱:InversionWorkflowExample,代碼行數:32,代碼來源:parallel_pyflex.py


注:本文中的pyasdf.ASDFDataSet.process_two_files_without_parallel_output方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。