PIC-IRIS / PH5

Library of PH5 clients, apis, and utilities
Other
15 stars 9 forks source link

Correct pn4 data using pn3's info #487

Open damhuonglan opened 3 years ago

damhuonglan commented 3 years ago

What does this PR do?

In the past, when pn4 format was introduced, pn3 data has been converted using the protocol: https://github.com/PIC-IRIS/PH5/wiki/Using-Obspy-to--load-data-into-PH5 However, when ph5validate was updated, there are a couple of pn3-converted-to-pn4 data sets found corrupted because of the inconsistency between array_t, index_t, das_t or invalid entries in array_t. This PR will eliminate the inconsistent entries in those three tables and recreate them for pn4 data set. The waveform data without metadata will be kept in minifile without external links. Later, when metadata are found, external links can be created using a tool named "create_ext" which will be build after this PR. If there are fields of which values need to be added similarly in array_t, add the info in a file and use flag -a. In this PR, ph5validate has been modified to fix bug happening when there are identical entries (not include station_id) in the same array. This bug will be fixed in another PR but temporarily put here for user to validate data after they use this tool. The commit for this (f129bca) will be reverted before merging the bug fix to this PR.

Requirements

Remember to install new command using pip install -e . in ph5 conda environment, under PH5 root folder.

Command Example

correctwpn3 --pn4 pn4 --pn3 pn3 -a addInfo.txt Flag -S can be used if you don't want the tool to ask for your response to continue or not

Checklist