Re-added CPS_metadata handling with cleaner implementation.#347
Open
thurinj wants to merge 2 commits into
Open
Re-added CPS_metadata handling with cleaner implementation.#347thurinj wants to merge 2 commits into
thurinj wants to merge 2 commits into
Conversation
This commit re-integrates the CPS-based ProcessData handling of Green's functions. It mimic the FK implementation, and try to handle gracefully possible confusion with database and model paths. I have adopted conventions for CPS metadata based on HiBasin examples (P and S arrival in sac.a and sac.t0 fields). As stated in issue #336, not sure if this is universally accepted, but it is working with @Jinyin-Hu HiBasin examples. I decided to also have the CPS_model argument (as in FK), just in case people might have several models in the same Database folder. Could remove if not likely given default CPS outputs style. Also fix a misleading docstrings in `CPS.py`
Forgot to remove the NotImplemented error.
Member
|
Agreed it is good to follow FK implementation. In fact, would it be possible to follow the FK implementation even more closely? Perhaps importing and using the following two utility functions might help clean things up? mtuq/mtuq/io/clients/FK_SAC.py Line 127 in 2157be5 mtuq/mtuq/io/clients/FK_SAC.py Line 128 in 2157be5 |
Jinyin-Hu
approved these changes
May 20, 2026
Jinyin-Hu
left a comment
Member
There was a problem hiding this comment.
Thanks, I think the changes make sense to me.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This commit re-integrates the CPS-based ProcessData handling of Green's functions. It mimic the FK implementation, and try to handle gracefully possible confusion with database and model paths.
I have adopted conventions for CPS metadata based on HiBasin examples (P and S arrival in sac.a and sac.t0 fields). As stated in issue #336, not sure if this is universally accepted, but it is working with @Jinyin-Hu HiBasin examples.
I decided to also have the CPS_model argument (as in FK), just in case people might have several models in the same Database folder. Could remove if not likely given default CPS outputs style.
Also fix a misleading docstrings in
CPS.pyShould address some of the issues encountered in #336
Warning
as of May 20th 2026, the CPS GF Databases in the HiBasin repo are currently in displacement unit (m) and NOT in m/s, as expected by the default MTUQ readers.
Will remove when @Jinyin-Hu updates HiBasin