openquake.commands package

openquake.commands.export module module[source]

Walk the directory and builds pre-calculation reports for all the job.ini files found.[source]

Parse the composite source model without instantiating the sources and prints information about its composition and the full logic tree

openquake.commands.plot module

openquake.commands.plot.make_figure(indices, imtls, spec_curves, curves=(), label='')[source]
  • 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

openquake.commands.plot_sites module

openquake.commands.purge module

openquake.commands.purge.purge_one(calc_id, user)[source]

Remove one calculation ID from the database and remove its datastore

openquake.commands.reduce module

openquake.commands.reduce.random_filter(objects, reduction_factor, seed=42)[source]

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. module

class, tottime, percall, cumtime, percall2, path)

Bases: tuple


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, n)[source]

Return profiling information as an RST table.

  • pstatfile – path to a .pstat file
  • n – the maximum number of stats to retrieve, job_risk, concurrent_tasks, pdb, exports, params, monitor)[source]

Run both hazard and risk, one after the other module[source]

Extract hcurves from the datastore and compute their means.

Returns:curves_by_rlz, mean_curves

openquake.commands.show_attrs module

openquake.commands.tidy module

openquake.commands.upgrade_nrml module


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