# # Make all the leaves and their overlaps. # if 'leaf_storage_all' not in dir(): #'leaf_storage' not in dir() and False: leaf_storage_all = {} k0, k1 = 11, 14 #kludge={'peak_id':list(range(100,200))} kludge = {} MT = mountain_top.cut_mountain_top(this_simname, 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
kludge = {} #kludge={'peak_id':[89,11,14,350, 349, 368, 369]} #kludge={'peak_id':[ 368, 369]} k0 = 186 k1 = 188 kludge = {'peak_id': [k0, k1]} leaf_storage_here = {} MT = mountain_top.cut_mountain_top(this_simname, target_fname=mountain_top_name, do_projections=True, verify=verify_cores_u302, kludge=kludge, leaf_storage=leaf_storage_here, radius_dict=coreset_data.radius_302) #density_cut_fname="u302_densiy_cut_working.h5") overlap_tmp = mountain_top.check_overlap(leaf_storage_here) reload(coreset_data) if 1: more_leaf_storage_here = {} split_density = mountain_top.split_peaks( this_simname, k0, k1, do_projections=True, leaf_storage=more_leaf_storage_here, radius_dict=coreset_data.radius_302, recheck=True) #{17: 906.8142319419817, 19: 906.8142319419817} #{18: 273.2661243303226, 67: 273.2661243303226}
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, target_fname=temp_target, do_projections=True, verify=verify_cores_u302, kludge=kludge, leaf_storage=clean_leaf_storage, density_cut_fname=temp_threshold_name) overlap_cleanup = mountain_top.check_overlap(clean_leaf_storage)
if peak_id in skip: out = False return out if 'leaf_storage_all' not in dir(): #'leaf_storage' not in dir() and False: kludge = {} leaf_storage_all = {} MT = mountain_top.cut_mountain_top(this_simname, target_fname=mountain_top_name, do_projections=do_mountain_projections, verify=verify_cores_u302, kludge=kludge, leaf_storage=leaf_storage_all) #, #density_cut_fname="u302_contour_mins.h5") overlap_all = mountain_top.check_overlap(leaf_storage_all) if 'leaf_storage' not in dir(): #'leaf_storage' not in dir() and False: #kludge={'peak_id':[0,1,364, 113,u302_was258]}) #kludge={'peak_id':[258]} #kludge={'peak_id':[core_id]} kludge = {} #kludge={'peak_id':[89,11,14,350, 349, 368, 369]} #kludge={'peak_id':[ 368, 369]} kludge = {'peak_id': [367, 368]} leaf_storage = {} MT = mountain_top.cut_mountain_top(this_simname, target_fname=mountain_top_name, do_projections=True, verify=verify_cores_u302, kludge=kludge,