# FastLink **Repository Path**: ponspc/fastlink ## Basic Information - **Project Name**: FastLink - **Description**: FastLink: a machine learning and GPU based fast phase association method 基于GPU的快速震相关联算法 - **Primary Language**: Python - **License**: GPL-3.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 2 - **Created**: 2023-04-06 - **Last Updated**: 2023-04-06 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # FastLink #### 介绍 FastLink: a machine learning and GPU based fast phase association method 基于GPU的快速震相关联算法 ![关联过程图](data/link.png) #### 软件架构 - ckpt:预训练模型 - config:设置文件 - fastlinker.py:关联主文件 - reallinker.py:real关联工具 #### 安装教程 依赖库 1. pytorch 2. obspy 3. tqdm #### 使用说明 ##### 训练 稍后添加 ##### 推断 直接运行 ```bash python fastlinker.py -o odata/2020.1107.200km.txt -i ckpt/new.200km.wave.txt -s station ``` 参数依次为 - -o输出文件夹,文件夹应当存在 - -i输入拾取文件,拾取文件为lppnpicker格式 - -s台站文件。如果为null,即不制作台站文件 震相文件格式 ```text #单分量数据位置 震相,相对时间(秒),置信度,绝对时间(格式%Y-%m-%d %H:%M:%S.%f),信噪比,前后200个采样点振幅均值,台站名,前95%分位数,后95%分位数,最大值,标准差,峰值 ``` 在config/fastlink.py需要调整更多拾取参数: ``` # GPU parameters win_length = 25.0 # seconds win_stirde = 1 # seconds ngrid = 200 lonrange = [] # range of longtitude latrange = [] locpad = 0.5 # if the range of lat and lon is not defined. the range is calculated by the range of stations with pad. datadir = "fastdata" saveitv = 86400 # interval to save temp files. # model modeldir = "ckpt/link32.ckpt" basetime = "2020-01-01" # initial time, which doesn't need to be setted. # parameters np = 2 # number of P phase ns = 4 # number of S phase nps = 8 # number of P+S phase nboth = 2 # number of both P and S phase ``` 关联结果结构: ```text #EVENT,位置编码,关联时间,经度,纬度 PHASE,震相时刻,关联类型,台站名,原始类型 ``` #### 引用文献 Yu ZY, Wang WT. FastLink: a machine learning and GPU based fast phase association method and its application to Yangbi Ms 6.4 aftershock sequences. 2022. GJI. #### License [GPLV3](LICENSE)