Walk the directory and builds pre-calculation reports for all the job.ini files found.
Parse the composite source model without instantiating the sources and prints information about its composition and the full logic tree
make_figure(indices, imtls, spec_curves, curves=(), label='')¶
- indices – the indices of the sites under analysis
- imtls – ordered dictionary with the IMTs and levels
- spec_curves – a dictionary of curves IMT -> array(n_sites, n_levels)
- curves – a dictionary of dictionaries IMT -> array
- label – the label associated to spec_curves
Remove one calculation ID from the database and remove its datastore
random_filter(objects, reduction_factor, seed=42)¶
Given a list of objects, returns a sublist by extracting randomly some elements. The reduction factor (< 1) tells how small is the extracted list compared to the original list.
PStatData(ncalls, tottime, percall, cumtime, percall2, path)¶
Alias for field number 3
Alias for field number 0
Alias for field number 5
Alias for field number 2
Alias for field number 4
Alias for field number 1
Return profiling information as an RST table.
- pstatfile – path to a .pstat file
- n – the maximum number of stats to retrieve
run2(job_haz, job_risk, concurrent_tasks, pdb, exports, params, monitor)¶
Run both hazard and risk, one after the other
Extract hcurves from the datastore and compute their means.
Returns: curves_by_rlz, mean_curves
Parse the vulnerability model in NRML 0.4 format.
Parameters: fname – path of the vulnerability file Returns: a dictionary imt, taxonomy -> vulnerability function + vset
Upgrade to the latest NRML version