def run_all(mode, robust=False): _, configloc, _, _ = config_setup.get_locations(mode) with open(os.path.join(configloc, "config_full.json")) as f: fullrun_config = json.load(f) f.close() # Flag indicating whether calculated results should be written to disk writeoutput = fullrun_config["writeoutput"] # Provide the mode and case names to calculate mode = fullrun_config["mode"] cases = fullrun_config["cases"] for case in cases: logging.info("Now attempting case: " + case) run_weightcalc(configloc, writeoutput, mode, case, robust) run_createarrays(writeoutput, mode, case, robust) run_trendextraction(writeoutput, mode, case, robust) run_noderank(writeoutput, mode, case, robust) run_graphreduce(writeoutput, mode, case, robust) # run_plotting(writeoutput, mode, case, robust) logging.info("Done with case: " + case)
configuration file. """ # Standard modules import json import logging import multiprocessing import os from faultmap import config_setup from faultmap.gaincalc import weightcalc if __name__ == "__main__": multiprocessing.freeze_support() logging.basicConfig(level=logging.INFO) dataloc, configloc, _, _ = config_setup.get_locations() weightcalc_config = json.load( open(os.path.join(configloc, "config_weightcalc.json"))) # Flag indicating whether calculated results should be written to disk writeoutput = weightcalc_config["writeoutput"] # Flag indicating whether single signal entropy values for each # signal involved should be calculated single_entropies = weightcalc_config["calc_single_entropies"] # Provide the mode and case names to calculate mode = weightcalc_config["mode"] cases = weightcalc_config["cases"] fftcalc = weightcalc_config["fft_calc"] do_multiprocessing = weightcalc_config["multiprocessing"] for case in cases: