MCPcopy Index your code
hub / github.com/NHERI-SimCenter/pelicun

github.com/NHERI-SimCenter/pelicun @v3.9

Chat with this repo
repository ↗ · DeepWiki ↗ · release v3.9 ↗ · + Follow
679 symbols 2,316 edges 83 files 417 documented · 61%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README
<img src="https://raw.githubusercontent.com/NHERI-SimCenter/pelicun/master/doc/source/_static/pelicun-Logo-white.png"
    alt="pelicun" align="middle" height="200"/>







<a href="https://doi.org/10.5281/zenodo.2558558", alt="DOI">
    <img src="https://zenodo.org/badge/DOI/10.5281/zenodo.2558558.svg" /></a>







<b>Probabilistic Estimation of Losses, Injuries, and Community resilience Under Natural hazard events</b>

Latest Release Tests codecov Ruff License

What is it?

pelicun is a Python package that provides tools for assessment of damage and losses due to natural hazard events. It uses a stochastic damage and loss model that is an extension of the high-resolution PEER performance assessment methodology described in FEMA P58 (FEMA, 2012). While FEMA P58 aims to assess the seismic performance of a building, with pelicun we provide a more versatile, hazard-agnostic tool to assess the performance of several types of assets in the built environment.

pelicun includes an integrated Damage and Loss Model Library (DLML) module that provides seamless access to comprehensive model libraries with automatic data initialization and CLI integration for efficient model management.

Detailed documentation of the available methods and their use is available at http://nheri-simcenter.github.io/pelicun

What can I use it for?

pelicun quantifies losses from an earthquake or hurricane scenario in the form of decision variables. This functionality is typically utilized for performance-based engineering and regional risk assessment. There are several steps of performance assessment that pelicun can help with:

  • Describe the joint distribution of asset response. The response of a structure or other type of asset to an earthquake or hurricane wind is typically described by so-called engineering demand parameters (EDPs). pelicun provides methods that take a finite number of EDP vectors and find a multivariate distribution that describes the joint distribution of EDP data well. You can control the type of target distribution, apply truncation limits and censor part of the data to consider detection limits in your analysis. Alternatively, you can choose to use your EDP vectors as-is without resampling from a fitted distribution.

  • Define the damage and loss model of a building. The component damage and loss data from the first two editions of FEMA P58 and the HAZUS earthquake and hurricane models for buildings are provided with pelicun. This makes it easy to define building components without having to collect and provide all the data manually. The stochastic damage and loss model is designed to facilitate modeling correlations between several parameters of the damage and loss model.

  • Estimate component damages. Given a damage and loss model and the joint distribution of EDPs, pelicun provides methods to estimate the amount of damaged components and the number of cases with collapse.

  • Estimate consequences. Using information about collapse and component damages, the following consequences can be estimated with the loss model: reconstruction cost and time, unsafe placarding (red tag), injuries and fatalities.

Why should I use it?

  1. It is free and it always will be.
  2. It is open source. You can always see what is happening under the hood.
  3. It is efficient. The loss assessment calculations in pelicun use numpy, scipy, and pandas libraries to efficiently propagate uncertainties and provide detailed results quickly.
  4. You can trust it. Every function in pelicun is tested after every commit. See the Travis-CI and Coveralls badges at the top for more info.
  5. You can extend it. If you have other methods that you consider better than the ones we already offer, we encourage you to fork the repo, and extend pelicun with your approach. You do not need to share your extended version with the community, but if you are interested in doing so, contact us and we are more than happy to merge your version with the official release.

Installation

pelicun is available at the Python Package Index (PyPI). You can simply install it using pip as follows:

pip install pelicun

If you are interested in using an earlier version, you can install it with the following command:

pip install pelicun==2.6.0

Note that 2.6.0 is the last minor version before the v3.0 release. Other earlier versions can be found here.

Documentation and usage examples

The documentation for pelicun can be accessed here. It includes information for users, instructions for developers and usage examples.

Changelog

Detailed release notes for all versions are available in CHANGELOG.md and in the online documentation.

License

pelicun is distributed under the BSD 3-Clause license, see LICENSE.

Acknowledgment

This material is based upon work supported by the National Science Foundation under Grants No. 1612843 2131111. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the National Science Foundation.

Contact

Adam Zsarnóczay, NHERI SimCenter, Stanford University, adamzs@stanford.edu

Core symbols most depended-on inside this repo

msg
called by 127
pelicun/base.py
get
called by 84
pelicun/base.py
ensure_value
called by 59
pelicun/base.py
cdf
called by 35
pelicun/uq.py
update
called by 31
pelicun/base.py
inverse_transform_sampling
called by 28
pelicun/uq.py
warning
called by 26
pelicun/base.py
load_model_parameters
called by 26
pelicun/model/loss_model.py

Shape

Function 311
Method 305
Class 51
Route 12

Languages

Python100%

Modules by API surface

pelicun/uq.py81 symbols
pelicun/tests/tools/test_dlml.py61 symbols
pelicun/model/loss_model.py56 symbols
pelicun/base.py46 symbols
pelicun/tests/basic/test_uq.py45 symbols
pelicun/tests/basic/test_loss_model.py39 symbols
pelicun/model/damage_model.py37 symbols
pelicun/tests/tools/test_dlml_integration.py28 symbols
pelicun/tests/basic/test_damage_model.py28 symbols
pelicun/tests/basic/test_base.py28 symbols
pelicun/assessment.py26 symbols
pelicun/tests/basic/test_demand_model.py25 symbols

For agents

$ claude mcp add pelicun \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact