def main(): """business logic for when running this module as the primary one!""" args = get_cmd_args() with open('config/spectrum_config_10ta.json', 'r') as file_handler: config = json.load(file_handler) mhd_config = load_mhd_config(args.mhd_run_dir) plot_config = {} run_name = args.mhd_run + "/" + args.sde_run sde_run_config = config[run_name] nreduce = sde_run_config["nreduce"] plot_config["nx"] = mhd_config["nx"] // nreduce plot_config["ny"] = mhd_config["ny"] // nreduce plot_config["nz"] = mhd_config["nz"] // nreduce plot_config["nreduce"] = nreduce plot_config["tmax"] = sde_run_config["tmax"] plot_config["tmin"] = sde_run_config["tmin"] if "e0" in sde_run_config: plot_config["e0"] = sde_run_config["e0"] else: plot_config["e0"] = 1.0 if "high_bands" in sde_run_config: plot_config["high_bands"] = sde_run_config["high_bands"] else: plot_config["high_bands"] = [2, 5] plot_config["eband"] = args.ene_band plot_config["run_name"] = run_name plot_config["tframe"] = args.tframe plot_config["mhd_run_dir"] = args.mhd_run_dir if args.multi_frames: analysis_multi_frames(plot_config, mhd_config, args) else: analysis_single_frames(plot_config, mhd_config, args)
def main(): """business logic for when running this module as the primary one!""" args = get_cmd_args() with open('config/spectrum_config_bg.json', 'r') as file_handler: config = json.load(file_handler) mhd_config = load_mhd_config(args.mhd_run_dir) plot_config = {} run_name = args.mhd_run + "/" + args.sde_run sde_run_config = config[run_name] nreduce = sde_run_config["nreduce"] plot_config["nx"] = mhd_config["nx"] // nreduce plot_config["ny"] = mhd_config["ny"] // nreduce plot_config["tmax"] = sde_run_config["tmax"] plot_config["tmin"] = sde_run_config["tmin"] plot_config["run_name"] = run_name plot_config["tframe"] = args.tframe plot_config["mhd_run_dir"] = args.mhd_run_dir plot_config["run_type"] = args.run_type plot_config["check_dist"] = args.check_dist tframes = [150, 175, 200] plot_config["tframes"] = tframes if args.multi_frames: analysis_multi_frames(plot_config, mhd_config, args) else: analysis_single_frame(plot_config, mhd_config, args)
def main(): """business logic for when running this module as the primary one!""" args = get_cmd_args() mhd_run_info = get_mhd_info(args) with open('config/spectrum_config_10ta.json', 'r') as file_handler: config = json.load(file_handler) mhd_config = load_mhd_config(args.mhd_run_dir) plot_config = {} run_name = args.mhd_run + "/" + args.sde_run sde_run_config = config[run_name] nreduce = sde_run_config["nreduce"] plot_config["nx"] = mhd_config["nx"] // nreduce plot_config["ny"] = mhd_config["ny"] // nreduce plot_config["nreduce"] = nreduce plot_config["tmax"] = sde_run_config["tmax"] plot_config["tmin"] = sde_run_config["tmin"] plot_config["run_name"] = run_name plot_config["tframe"] = args.tframe if args.multi_frames: analysis_multi_frames(plot_config, mhd_config, mhd_run_info, args) else: # compression_dist(mhd_run_info, args.tframe) if args.calc_alpha: # power_index_dist(plot_config, mhd_config, # mhd_run_info, show_plot=True) power_index_dist2(plot_config, mhd_config, mhd_run_info, show_plot=True) if args.plot_alpha: plot_alpha_distribution(mhd_run_info, args.tstart, args.tend)
def main(): """business logic for when running this module as the primary one!""" args = get_cmd_args() mhd_run_info = get_mhd_info(args) mhd_config = load_mhd_config(args.mhd_run_dir) if args.multi_frames: analysis_multi_frames(mhd_run_info, mhd_config, args) else: plot_ptl_traj(mhd_run_info, args.sde_run, 200, mhd_config, 8)
def main(): """business logic for when running this module as the primary one!""" args = get_cmd_args() mhd_config = load_mhd_config(args.mhd_run_dir) plot_config = {} plot_config["tframe"] = args.tframe plot_config["mhd_run"] = args.mhd_run plot_config["mhd_run_dir"] = args.mhd_run_dir plot_config["tstart"] = args.tstart plot_config["tend"] = args.tend if args.multi_frames: analysis_multi_frames(plot_config, mhd_config, args) else: analysis_single_frames(plot_config, mhd_config, args)