openquake.commands package¶
openquake.commands.export module¶
openquake.commands.info module¶
-
openquake.commands.info.do_build_reports(directory)[source]¶ Walk the directory and builds pre-calculation reports for all the job.ini files found.
openquake.commands.plot module¶
-
openquake.commands.plot.make_figure(indices, imtls, spec_curves, curves=(), label='')[source]¶ Parameters: - 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.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.
-
openquake.commands.reduce.reduce(fname, reduction_factor)[source]¶ Produce a submodel from fname by sampling the nodes randomly. Supports source models, site models and exposure models. As a special case, it is also able to reduce .csv files by sampling the lines. This is a debugging utility to reduce large computations to small ones.
openquake.commands.run module¶
-
class
openquake.commands.run.PStatData(ncalls, tottime, percall, cumtime, percall2, path)¶ Bases:
tuple-
cumtime¶ Alias for field number 3
-
ncalls¶ Alias for field number 0
-
path¶ Alias for field number 5
-
percall¶ Alias for field number 2
-
percall2¶ Alias for field number 4
-
tottime¶ Alias for field number 1
-
-
openquake.commands.run.get_pstats(pstatfile, n)[source]¶ Return profiling information as an RST table.
Parameters: - pstatfile – path to a .pstat file
- n – the maximum number of stats to retrieve