openquake.hme.core.coreΒΆ

Core functions for running Hamlet.

The functions here read the configuration file, then load all of the model inputs (seismic sources, observed earthquake catalog, etc.), run the tests, and write the output.

Functions

format_output_for_json(out_results)

get_test_lists_from_config(cfg)

Reads through the cfg and makes a dict of lists of tests or evaluations to run for each framework.

load_inputs(cfg)

Loads all of the inputs specified by the cfg and returns a tuple of GeoDataFrame objects, the earthquake catalog and the bins.

load_obs_eq_catalog(cfg)

Loads the observed earthquake catalog into a GeoDataFrame that has all of the earthquakes processed into Earthquake objects.

load_pro_eq_catalog(cfg)

Loads the prospective earthquake catalog into a GeoDataFrame that has all of the earthquakes processed into Earthquake objects.

load_ruptures_from_file(cfg)

Reads a flat file with ruptures.

load_ruptures_from_ssm(cfg)

Reads a seismic source model, processes it, and returns a GeoDataFrame with the ruptures.

needs_gsim_lt(cfg)

read_yaml_config(yaml_config[, fill_fields, ...])

Reads a model test configuration file (YAML).

run_tests(cfg)

Main Hamlet function.

run_tests_iterate(cfg)

Run evaluations independently for each logic tree branch.

write_json(cfg, results)

write_json_iterate(cfg, all_branch_results)

Write JSON output for iterate mode with all branches.

write_outputs(cfg, results)

go through and write test-specific results, trash can function

write_reports(cfg, results, input_data)

Writes reports summarizing the results of the tests and evaluations.