# FastLink **Repository Path**: cangyeone/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**: 2 - **Forks**: 2 - **Created**: 2022-03-22 - **Last Updated**: 2025-02-25 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # FastLink #### Introduction FastLink: a machine learning and GPU based fast phase association method ![](data/link.png) #### Architecture - ckpt:pre-trained model - config:configure file - fastlinker.py:fastlink main file - reallinker.py:real tools #### Installation Dependency 1. pytorch 2. obspy 3. tqdm #### Instructions ##### Train Will be added later. ##### Infer ```bash python fastlinker.py -o odata/2020.1107.200km.txt -i ckpt/new.200km.wave.txt -s station ``` - -o output dir - -i input file, which is phase file - -s station file Format of input file: ```text #path to the wavefrom file phase,relative time,confidence,absolute time(%Y-%m-%d %H:%M:%S.%f),SNR,other information ``` 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 ``` Format of result: ```text #EVENT,location id,event time,lat,long PHASE,time,associated type,station name,orignal type ``` #### Reference 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)