openquake.commands package¶
db command¶
dbserver command¶
engine command¶
- 
openquake.commands.engine.del_calculation(job_id, confirmed=False)[source]¶
- Delete a calculation and all associated outputs. 
- 
openquake.commands.engine.run_job(job_ini, log_level='info', log_file=None, exports='', username='jenkins', **kw)[source]¶
- Run a job using the specified config file and other options. - Parameters: - job_ini (str) – Path to calculation config (INI-style) files.
- log_level (str) – ‘debug’, ‘info’, ‘warn’, ‘error’, or ‘critical’
- log_file (str) – Path to log file.
- exports – A comma-separated string of export types requested by the user.
- username – Name of the user running the job
- kw – Extra parameters like hazard_calculation_id and calculation_mode
 
export command¶
from_shapefile command¶
info command¶
- 
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.info.info(calculators, gsims, views, exports, extracts, parameters, report, input_file='')[source]¶
- Give information. You can pass the name of an available calculator, a job.ini file, or a zip archive with the input files. 
plot_agg_curve command¶
plot command¶
- 
openquake.commands.plot.make_figure_disagg(extractors, what)[source]¶
- $ oq plot ‘disagg?by=Dist&imt=PGA’ 
- 
openquake.commands.plot.make_figure_event_based_mfd(extractors, what)[source]¶
- Parameters: - plots – list of pairs (task_name, memory array) 
- 
openquake.commands.plot.make_figure_hcurves(extractors, what)[source]¶
- $ oq plot ‘hcurves?kind=mean&imt=PGA&site_id=0’ 
- 
openquake.commands.plot.make_figure_hmaps(extractors, what)[source]¶
- $ oq plot ‘hmaps?kind=mean&imt=PGA’ 
- 
openquake.commands.plot.make_figure_memory(extractors, what)[source]¶
- Parameters: - plots – list of pairs (task_name, memory array) 
- 
openquake.commands.plot.make_figure_source_geom(extractors, what)[source]¶
- Extract the geometry of a given sources Example: http://127.0.0.1:8800/v1/calc/30/extract/source_geom/1,2,3 
- 
openquake.commands.plot.make_figure_task_info(extractors, what)[source]¶
- Plot an histogram with the task distribution. Example: http://127.0.0.1:8800/v1/calc/30/extract/task_info?kind=classical 
purge command¶
reduce command¶
- 
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. 
reset command¶
run command¶
- 
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
 
show command¶
show_attrs command¶
tidy command¶
to_hdf5 command¶
to_shapefile command¶
- 
openquake.commands.to_shapefile.to_shapefile(output, input_nrml_file, validate)[source]¶
- Convert a NRML source model file to ESRI Shapefile(s). - For each type of source geometry defined in the NRML file (point, area, simple fault, complex fault, planar) a separate shapefile is created. Each shapefile is differentiated by a specific ending(‘_point’, ‘_area’, ‘_simple’, ‘_complex’, ‘_planar’). - NB: nonparametric sources are not supported. 
upgrade_nrml command¶
- 
openquake.commands.upgrade_nrml.get_vulnerability_functions_04(fname)[source]¶
- Parse the vulnerability model in NRML 0.4 format. - Parameters: - fname – path of the vulnerability file - Returns: - a dictionary imt, taxonomy -> vulnerability function + vset