target_fname=mountain_top_name, do_projections=False, verify=verifiers[this_simname], leaf_storage=leaf_storage_all, kludge=kludge, radius_dict=this_radius_dict) overlap_all = mountain_top.check_overlap(leaf_storage_all) if 1: new_thresholds = {} #this gets filled with new thresholds if 'all_peaks_tmp' not in dir(): all_peaks_tmp = defaultdict( dict) #this is just to reduce redundant work when debugging. mountain_top.split_all(this_simname, overlap_all, new_thresholds, all_peaks_tmp, do_projections=False, radius_dict=this_radius_dict) # # Make all the leaves again, with new thresholds # if 1: leaf_storage_2 = {} #kludge={'peak_id':[k0,k1]} kludge = {} MT = mountain_top.cut_mountain_top(this_simname, target_fname=mountain_top_name, do_projections=True, verify=verifiers[this_simname], kludge=kludge,
if 1: #this gets filled with new thresholds new_thresholds = {} #this is just to reduce redundant work when debugging. if 'all_peaks_tmp' not in dir(): all_peaks_tmp = defaultdict(dict) all_peaks_tmp[4] = {5: 740, 6: 740, 20: 740} all_peaks_tmp[5] = {6: 740} all_peaks_tmp[6] = {5: 740} all_peaks_tmp[20] = {4: 300} all_peaks_tmp[10] = {11: -1, 12: -1} mountain_top.split_all(this_simname, overlap_all, new_thresholds, all_peaks_tmp, do_projections=do_projections, radius_dict=this_radius_dict, contour_step=2, auto_double=False) # # Make all the leaves again, with new thresholds # if 1: leaf_storage_2 = {} #kludge={'peak_id':[k0,k1]} kludge = {} MT = mountain_top.cut_mountain_top(this_simname, target_fname=mountain_top_name, do_projections=True, verify=verifiers[this_simname],
all_to_check = {} for peak_id in overlap_maybe_great: if peak_id != 43: continue all_to_check[peak_id] = overlap_maybe_great[peak_id] all_to_check[peak_id] += overlap_all[peak_id] if 'new_thresholds_cleanup' not in dir() or True: new_thresholds_cleanup = {} if 'all_peaks_cleanup' not in dir() or True: all_peaks_cleanup = defaultdict(dict) if 1: mountain_top.split_all(this_simname, all_to_check, new_thresholds_cleanup, all_peaks_cleanup, do_projections=True) temp_threshold_name = "u302_cutoff_cleanup.h5" os.remove(temp_threshold_name) mountain_top.dump_cutoffs(temp_threshold_name, new_thresholds_cleanup) if 1: print("check the density in the file") pdb.set_trace() peak_list = list(all_to_check.keys()) kludge = {'peak_id': peak_list} clean_leaf_storage = {} temp_target = 'u302_mountain_tops_cleanupb.h5' MT = mountain_top.cut_mountain_top(this_simname,
do_projections=True, verify=verify_cores_u302, kludge=kludge, leaf_storage=leaf_storage) #density_cut_fname="u302_densiy_cut_test.h5") overlap_tmp = check_overlap(leaf_storage) if 'new_thresholds' not in dir(): new_thresholds = {} if 'all_peaks' not in dir(): all_peaks = defaultdict(dict) skip_list = [67, 92, 102, 194, 368] if 1: mountain_top.split_all(this_simname, new_thresholds, all_peaks, skip_list=skip_list) cut_name = 'u302_density_cuts_auto2.h5' mountain_top.dump_cutoffs(cut_name, new_thresholds) if 1: kludge = {'peak_id': peak_list} test_leaf_storage = {} MT = mountain_top.cut_mountain_top(this_simname, target_fname=mountain_top_name, do_projections=True, verify=verify_cores_u302, kludge=kludge, leaf_storage=test_leaf_storage, density_cut_fname=cut_name)