Skip to content
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

Cb test #133

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Cb test #133

wants to merge 9 commits into from

Conversation

CB-quakemodel
Copy link

This commit includes new functions for plotting of loglikelihood, sample loglikelihood based gmpe weighting and EDR ranking w.r.t. spectral period, and produces tables corresponding to these outputs. These functions are added within residual_plotter, and are as follows: PlotLoglikelihoodWithSpectralPeriod, PlotModelWeightsWithSpectralPeriod, PlotEDRWithSpectralPeriod, LoglikelihoodTable, WeightsTable and EDRTable. To provide the inputs for the loglikelihood and weights plot and table functions, modifications were made to the get_log_likelihood_values definition within gmpe_residuals. These modifications simply store the LLH and model weight computed per spectral period. To compute EDR per imt three new definitions were added also within gmpe_residuals. These three modules are get_edr_values_wrt_spectral_period, _get_edr_gmpe_information_wrt_spectral_period and _get_edr_wrt_spectral_period. These three definitions store EDR, sqrt(kappa) and MDE norm per imt, rather than taking the aggregate as before. A function is also provided for plotting mean and sigma of each gmpe residual distribution w.r.t. spectral period (PlotResidualPDFWithSpectralPeriod) and to generate values as a table (PDFTable. A (passed) unit test (gmpe_ranking_metrics_wrt_imt_test.py) is also provided for the loglikelihood, weighting and EDR functions. This commit also adds functions for the parsing of ESM22 (web service) flatfiles, and of ESM23 (URL searchable web service) flatfiles within the SMTK. These functions read in the respective flatfile formats and use Pandas dataframes to rearrange the flatfiles into the existing ESM 2018 flatfile format. A (passed) unit test is also provided for each parser. This commit fixes a scaling issue within the model_configuration_plot function in trellis. Focal depth is now in decimal degrees to match the latitude and longitude on the other axis. The axis scaling was also fixed to equal, so that the true rupture model aspect ratio is also maintained when the distance from source to site increases or decreases. Finally, a deprecation issue with Context Maker module was fixed in conditional_simulation.py which was causing a test to fail.

CB-quakemodel and others added 9 commits February 7, 2023 11:00
…ple loglikelihood based gmpe weighting and EDR ranking w.r.t. spectral period, and produces tables corresponding to these outputs. These functions are added within residual_plotter, and are as follows: PlotLoglikelihoodWithSpectralPeriod, PlotModelWeightsWithSpectralPeriod, PlotEDRWithSpectralPeriod, LoglikelihoodTable, WeightsTable and EDRTable. To provide the inputs for the loglikelihood and weights plot and table functions, modifications were made to the get_log_likelihood_values definition within gmpe_residuals. These modifications simply store the LLH and model weight computed per spectral period. To compute EDR per imt three new definitions were added also within gmpe_residuals. These three modules are get_edr_values_wrt_spectral_period, _get_edr_gmpe_information_wrt_spectral_period and _get_edr_wrt_spectral_period. These three definitions store EDR, sqrt(kappa) and MDE norm per imt, rather than taking the aggregate as before. A function is also provided for plotting mean and sigma of each gmpe residual distribution w.r.t. spectral period (PlotResidualPDFWithSpectralPeriod) and to generate values as a table (PDFTable. A unit test (gmpe_ranking_metrics_wrt_imt_test.py) is also provided (in additional commit) for the loglikelihood, weighting and EDR functions.
…ple loglikelihood based gmpe weighting and EDR ranking w.r.t. spectral period, and produces tables corresponding to these outputs. These functions are added within residual_plotter, and are as follows: PlotLoglikelihoodWithSpectralPeriod, PlotModelWeightsWithSpectralPeriod, PlotEDRWithSpectralPeriod, LoglikelihoodTable, WeightsTable and EDRTable. To provide the inputs for the loglikelihood and weights plot and table functions, modifications were made to the get_log_likelihood_values definition within gmpe_residuals. These modifications simply store the LLH and model weight computed per spectral period. To compute EDR per imt three new definitions were added also within gmpe_residuals. These three modules are get_edr_values_wrt_spectral_period, _get_edr_gmpe_information_wrt_spectral_period and _get_edr_wrt_spectral_period. These three definitions store EDR, sqrt(kappa) and MDE norm per imt, rather than taking the aggregate as before. A function is also provided for plotting mean and sigma of each gmpe residual distribution w.r.t. spectral period (PlotResidualPDFWithSpectralPeriod) and to generate values as a table (PDFTable. A (passed) unit test (gmpe_ranking_metrics_wrt_imt_test.py) is also provided for the loglikelihood, weighting and EDR functions. This commit also adds functions for the parsing of ESM22 (web service) flatfiles, and of ESM23 (URL searchable web service) flatfiles within the SMTK. These functions read in the respective flatfile formats and use Pandas dataframes to rearrange the flatfiles into the existing ESM 2018 flatfile format. A (passed) unit test is also provided for each parser. This commit fixes a scaling issue within the model_configuration_plot function in trellis. Focal depth is now in decimal degrees to match the latitude and longitude on the other axis. The axis scaling was also fixed to equal, so that the true rupture model aspect ratio is also maintained when the distance from source to site increases or decreases. Finally, a deprecation issue with Context Maker module was fixed in conditional_simulation.py which was causing a test to fail.
… + modifications to trellis plotting functions.
…being deleted following running of the unit test.
…ESM 2023 parsers. Use of tempfile now resolves this issue
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