AI4EPS / PhaseNet

PhaseNet: A Deep-Neural-Network-Based Seismic Arrival Time Picking Method
MIT License
278 stars 112 forks source link

PhaseNet: A Deep-Neural-Network-Based Seismic Arrival Time Picking Method

1. Install miniconda and requirements

2. Pre-trained model

Located in directory: model/190703-214543

3. Related papers

4. Batch prediction

See examples in the notebook: example_batch_prediction.ipynb

PhaseNet currently supports four data formats: mseed, sac, hdf5, and numpy. The test data can be downloaded here:

wget https://github.com/wayneweiqiang/PhaseNet/releases/download/test_data/test_data.zip
unzip test_data.zip

Notes:

  1. The reason for using "--batch_size=1" is because the mseed or sac files usually are not the same length. If you want to use a larger batch size for a good prediction speed, you need to cut the data to the same length.

  2. Remove the "--plot_figure" argument for large datasets, because plotting can be very slow.

Optional arguments:

usage: predict.py [-h] [--batch_size BATCH_SIZE] [--model_dir MODEL_DIR]
                  [--data_dir DATA_DIR] [--data_list DATA_LIST]
                  [--hdf5_file HDF5_FILE] [--hdf5_group HDF5_GROUP]
                  [--result_dir RESULT_DIR] [--result_fname RESULT_FNAME]
                  [--min_p_prob MIN_P_PROB] [--min_s_prob MIN_S_PROB]
                  [--mpd MPD] [--amplitude] [--format FORMAT]
                  [--s3_url S3_URL] [--stations STATIONS] [--plot_figure]
                  [--save_prob]

optional arguments:
  -h, --help            show this help message and exit
  --batch_size BATCH_SIZE
                        batch size
  --model_dir MODEL_DIR
                        Checkpoint directory (default: None)
  --data_dir DATA_DIR   Input file directory
  --data_list DATA_LIST
                        Input csv file
  --hdf5_file HDF5_FILE
                        Input hdf5 file
  --hdf5_group HDF5_GROUP
                        data group name in hdf5 file
  --result_dir RESULT_DIR
                        Output directory
  --result_fname RESULT_FNAME
                        Output file
  --min_p_prob MIN_P_PROB
                        Probability threshold for P pick
  --min_s_prob MIN_S_PROB
                        Probability threshold for S pick
  --mpd MPD             Minimum peak distance
  --amplitude           if return amplitude value
  --format FORMAT       input format
  --stations STATIONS   seismic station info
  --plot_figure         If plot figure for test
  --save_prob           If save result for test
file_name begin_time station_id phase_index phase_time phase_score phase_amp phase_type
2020-10-01T00:00* 2020-10-01T00:00:00.003 CI.BOM..HH 14734 2020-10-01T00:02:27.343 0.708 2.4998866231208325e-14 P
2020-10-01T00:00* 2020-10-01T00:00:00.003 CI.BOM..HH 15487 2020-10-01T00:02:34.873 0.416 2.4998866231208325e-14 S
2020-10-01T00:00* 2020-10-01T00:00:00.003 CI.COA..HH 319 2020-10-01T00:00:03.193 0.762 3.708662269972206e-14 P

Notes:

  1. The phase_index means which data point is the pick in the original sequence. So phase_time = begin_time + phase_index / sampling rate. The default sampling_rate is 100Hz

5. QuakeFlow example

A complete earthquake detection workflow can be found in the QuakeFlow project.

6. Interactive example

See details in the notebook: example_interactive.ipynb

7. Training