IN-CORE / pyincore

pyIncore is a component of IN-CORE. It is a python package consisting of two primary components: 1) a set of service classes to interact with the IN-CORE web services, and 2) IN-CORE analyses . The pyIncore allows users to apply various hazards to infrastructure in selected areas, propagating the effect of physical infrastructure damage and loss of functionality to social and economic impacts.
Mozilla Public License 2.0
25 stars 7 forks source link

Refactor building damage analysis to support multiple hazards #337

Closed navarroc closed 1 year ago

navarroc commented 1 year ago

Based on the outcome of #336, refactor building damage analysis implementation to support multiple hazards required by multi-hazard fragilities

longshuicy commented 1 year ago

steps:

  1. change the building damage input params: hazard_type: earthquake+tsunami hazard_id: id1+id2

  2. when reading parameters split by "+" sign. Now we'll have hazard_types as a list and hazard_ids as a list

  3. calling both hazard endpoints by add a for loop wrap around line 133 to line 182 and store the return hazard value approporiate

  4. Merging and massaging both of the hazard values to the hval_dict. It should look like

    {"zero_point_four_sa":number, "Mmax": number}

The rest should stay the same.

longshuicy commented 1 year ago

EQ: @navarroc do you know any SA eq on dev good for testing Tsuanmi: 5bc9eaf7f7b08533c7e610e1 (dev) Mapping ID: 648a3f88c687ae511a1814e2 (dev)