-
Notifications
You must be signed in to change notification settings - Fork 8
Many SMT improvements #517
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
CB-quakemodel
wants to merge
149
commits into
master
Choose a base branch
from
eucl_fixed
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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.
New Features
We can now export an XML of the GMMs considered in a residual analysis, with the weights for each GMM being automatically taken from the specified GMM ranking metric-based weights (e.g. the user can say if they want the weights to be based on the LLH, the EDR or the stochastic area). Unit test added. This is useful for generating a readily usable GMC logic tree straight from a residual analysis (i.e. we no longer have to reconstruct the decided-upon GMC in the XML manually).
Read in the GMMs from an XML for either the residual analysis OR a comparison. This is useful for quickly preparing the inputs to evaluate an existing GMC. Unit tests added. Either a single branchset (one TRT), or all of them (all TRTs), can be specified.
Read in a rupture from an XML or a CSV for use in the comparison module. This overrides the source_properties key in the toml (which is unneeded if providing a rupture file instead). A unit test is provided for both an XML and a CSV file. We can use this to quickly evaluate GMM predictions for a rupture which is more detailed than a planar surface rupture (the type which is usually constructed from the toml information).
Fixes/Improvements
Construction of finite ruptures for missing distance metrics is now improved. The parameters used are now TRT dependent (if TRT is provided in the admitted dataset), and otherwise a default is used (before was uniformly using PEER MSR). We also now use simple in-engine functions for surface construction (the same used in the comparison module - this function is now a general util. Crude proxies are also prevented completely now (we always use a reconstructed rupture rather than for example permitting setting of rrup to repi if missing in certain parsers).
Single-station residual analysis was not working well with incomplete datasets (i.e. no data for given IMT at given station, nans propagating into the calculation subcomponents of phi and residual plotting when missing observed values ). The management of missing observed values in single station residual analysis has been improved.
Only perform the min/max period check if SA is in the IMTs for residual analysis + if using a GMM that does not support SA then raise an explicit warning.
Now a value error is raised if a GMM is outside it's usable period range, given nans will be produced by the compute method anyway and therefore no residuals would be computed. Unit test added for this check.
Checks on user having already computed the associated ranking score before trying to either plot or export values or export weights based on normalization of those scores (now raises an explicit error if associated score is missing from residuals object)
It was confusing for an external user how the
mminandmmaxworked with the other parameters in the euclidean analysis section of the toml. Now, the min and max mags are taken from the minimum and maximum mags in themags_depthsinput which contains the magnitudes and associated depths.Also simplifying the EDR code - now we don't have almost duplicate functions depending on if computing average or imt-dependent EDR which saves many lines of code.
Duplicate ESM parser code is removed - the same functions are imported from the base parser to the url parser now.
Unit tests for FAS plots and husid plots were missing - now added.
Sometimes required rupture, site or distance parameters for a gsim are not passed from parent class to subclass when using an alias in the toml. A check is now provided which adds them if they have "leaked" out of the subclass when using an alias (this was noticed when using the Montalva2016Vs30SSlab alias, the vs30 attribute was missing from the ctx because it's only defined in the parent class - we had similar issues in the engine when testing the NZL 2022 model with the NZL variants of the NGASUB GMMs).