Skip to content

Conversation

@CB-quakemodel
Copy link
Contributor

@CB-quakemodel CB-quakemodel commented Oct 16, 2025

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 mmin and mmax worked 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 the mags_depths input 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).

@CB-quakemodel CB-quakemodel changed the title Many SMT improvements [WIP - need to fix rup CSVs in engine first] - Many SMT improvements Oct 30, 2025
@CB-quakemodel CB-quakemodel changed the title [WIP - need to fix rup CSVs in engine first] - Many SMT improvements Many SMT improvements Oct 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants