OQ-VMTK v1.1.0#34
Merged
Merged
Conversation
…odal analysis method
…ility functions from IDA and vulnerability functions
…t and default resolution
…nd add COV calculation methods
… fillna assignment
add GITHUB_TOKEN to avoid error on rate limit
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.
Summary
This branch introduces multiple changes to the OQ-VMTK workflow, mainly following a peer-review submission to Earthquake Spectra. This includes a suite of major feature additions, module-wide PEP8 refactoring, bug fixes, and CI/CD improvements. The changes span all core OQ-VMTK modules and bring the codebase to a more stable, maintainable, and feature-complete state.
New Features
Incremental Dynamic Analysis (IDA)
do_ida_analysis()tomodeller.py— runs nonlinear response history analyses at progressively scaled ground-motion intensities, supporting truncated and non-truncated hunt-and-fill procedures.process_ida_results()topostprocessor.py— post-processes IDA cloud data into fragility functions and vulnerability curves, including logistic regression and lognormal fitting.plotter.py— IDA stripe plots, fragility functions derived from IDA, and vulnerability function comparisons.IncrementalDynamicAnalysisdemo notebook with the FEMA P695 far-field ground-motion record set (44 records, unscaled accelerations, time steps, and durations).Modified Cloud Analysis (MCA) — MCMC Extension
postprocessor.py.plotter.py.ModifiedCloudAnalysisdemo notebook accordingly.IM Efficiency and Sufficiency Module (
imselection.py)imselection.pymodule implementing:compare_ims(): convenience method to compute and tabulate all metrics across multiple IMs for a given analysis type.test_imselection.py.RotDxx Spectral Calculations
get_rotdxx()toimcalculator.pyto compute RotD50/RotD100 and arbitrary rotation-percentile response spectra from two horizontal ground-motion components.Structural Analysis Animations
modeller.pyviado_spo_analysis(),do_cpo_analysis(), anddo_nrha_analysis().plot_modes()toplotter.pyfor animated mode shape visualisation.Calibration — Displacement-Based Design
calibration.pyto a displacement-based design methodology.pflag→pFlag,floor_heights→storey_heightsacrossmodeller.py,calibration.py, and all dependents.AAL and AADP
calculate_average_annual_loss()andcalculate_average_annual_damage_probability()methods inpostprocessor.py.Bug Fixes
postprocessor.pyNoneTypeexport for non-lognormal fragility methodspostprocessor.pypostprocessor.pyslfgenerator.pyplotter.pyRecursionErrorin_show()— changedself._show()toplt.show()imcalculator.pymodeller.pymodeller.pyopenseespyimport to be OS-conditionalDeprecation and Warning Fixes
.values[0]scalar extraction with.item()to resolve NumPyDeprecationWarning.fillnaassignment with direct assignment to resolve PandasDeprecationWarning.FigureCanvasAgg UserWarningfromplt.show()in headless (CI) environments.PEP8 Refactoring
All core modules were refactored for PEP8 compliance and improved readability:
modeller.py,calibration.py,postprocessor.py,plotter.pyimcalculator.py(renamed class fromIMCalculatortoimcalculator)slfgenerator.py(renamed fromslf_generator.py)units.py,utilities.pyCI/CD and Dependency Updates
macos_arm_test.yml) GitHub Actions workflow.GITHUB_TOKENto workflows to avoid API rate-limiting.pyproject.tomland CI workflows.scipy>=1.15.3to resolve installation issue.statsmodelswheel for macOS ARM64.Documentation and Demos
README.mdwith new feature descriptions and usage guidance.conf.pyand documentation pages for all new modules.CITATION.cff.README.mdfiles for IDA, MSA, MCA, ModalAnalysis, and ModelCompilation demos..gitignoreto excludeipynb_checkpoints.in/records/subdirectories within each demo.Files Changed (source)
openquake/vmtk/modeller.pyopenquake/vmtk/postprocessor.pyopenquake/vmtk/plotter.pyopenquake/vmtk/imcalculator.pyopenquake/vmtk/imselection.pyopenquake/vmtk/calibration.pyopenquake/vmtk/slfgenerator.pyopenquake/vmtk/units.pyopenquake/vmtk/utilities.py