Correct pn4 data using pn3's info #487
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.txtFlag
-Scan be used if you don't want the tool to ask for your response to continue or notChecklist
CHANGELOG.txt.CONTRIBUTORS.txt.