Esempio n. 1
0
import three_loopers_1tff as tl

if 'clobber' not in dir():
    clobber = False

if 'ht1' not in dir() or clobber:
    ht1 = CHT.hull_tool(tl.looper1)
if 'ht2' not in dir() or clobber:
    ht2 = CHT.hull_tool(tl.looper2)
    #ht2.plot_2d(frames=[0])
if 'ht3' not in dir() or clobber:
    ht3 = CHT.hull_tool(tl.looper3)

if 0:
    CHT.plot_2d(ht1,
                frames=[0],
                core_list=[85, 86, 306, 307, 308],
                accumulate=True)
if 0:
    CHT.plot_2d(ht1, frames=[0], accumulate=True, label_cores=[323])
if 1:
    CHT.plot_2d(ht2, frames=[0], accumulate=True, label_cores=[-1])
if 0:
    CHT.plot_2d(ht3, frames=[0], accumulate=True, label_cores=[])

if 0:
    fractions, cores = get_overlapping_cores(ht3, 185)
    catman = np.concatenate
    cores = catman([cores, [185]])[::-1]
    ht3b = hull_tool(tl.looper3)
    ht3b.plot_2d(core_list=cores, accumulate=True)
Esempio n. 2
0
        cores_all = set(self.hull.cores_used)
        cores_used = nar(self.hull.cores_used)

        overlap_matrix = np.zeros([len(cores_used)] * 2)
        for ncore, core_id in enumerate(cores_used):
            overlap_matrix[ncore, :] = nar(self.hull.overlaps[core_id])

        while len(cores_all):
            this_core = cores_all.pop()
            print("===", this_core, "===")
            this_superset = recursive_add_cores(this_core,
                                                overlap_matrix=overlap_matrix,
                                                cores_used=cores_used,
                                                thresh=thresh)
            print(this_superset)
            self.supersets.append(this_superset)
            cores_all.difference_update(this_superset)
        for nS, superset in enumerate(self.supersets):
            for core_id in superset:
                self.set_by_core[core_id] = nS


if 0:
    for nset, this_superset in enumerate(supersets):
        CHT.plot_2d(HT,
                    core_list=this_superset,
                    frames=[0],
                    accumulate=True,
                    label_cores=[0],
                    prefix="S%02d" % nset)
Esempio n. 3
0
    #                  108, 160, 107, 159])

#84, 173, 210
if 1:
    for frame in [0]:  # list(range(0,110,10)) + [107]:
        if 0:
            #
            # Compute hulls
            #
            for htool in [ht3]:  #[ht1, ht2, ht3]:
                htool.overlaps = defaultdict(list)
                htool.make_hulls(frames=[frame])
        if 1:
            CHT.plot_2d(ht3,
                        core_list=cores_84,
                        accumulate=True,
                        frames=[frame],
                        all_plots=False)
if 0:
    #
    # time series for one core
    #
    for frame in range(0, 110, 10):
        ht3b = CHT.hull_tool(loop)
        ht3b.make_hulls(core_list=[core_id])
        CHT.plot_2d(ht3b,
                    core_list=[core_id],
                    accumulate=False,
                    frames=[frame],
                    all_plots=True)
                        result = -result
                    htool.overlaps[core_1].append(result)
        fractions, cores_84 = CHT.get_overlapping_cores(ht3, 84)

if 1:
    for frame in [0]:  #range(50,110,10):
        if 0:
            #
            # Compute hulls
            #
            for htool in [ht3]:  #[ht1, ht2, ht3]:
                htool.overlaps = defaultdict(list)
                htool.make_hulls(frames=[frame])
#84, 173, 210
        if 1:
            ht3b = CHT.hull_tool(tl.looper3)
            CHT.plot_2d(ht3b,
                        core_list=cores_84,
                        accumulate=True,
                        frames=[frame],
                        all_plots=True)

#
# core time series
#
if 0:
    for frame in range(0, 110, 10):
        ht3b = CHT.hull_tool(tl.looper3)
        ht3b.make_hulls(core_list=[128])
        CHT.plot_2d(ht3b, core_list=[128], accumulate=True, frames=[frame])
Esempio n. 5
0
reload(CHT)

if 1:
    for this_simname in sim_list:
        supersets = st_set[this_simname]
        for nset, this_superset in enumerate(supersets.supersets):
            if nset != 1:
                continue
            color_dict = colors.make_core_cmap(this_superset,
                                               cmap='tab20c',
                                               seed=-1)
            frame_list = MOD.loops[this_simname].frame_list
            CHT.plot_2d(ht_set[this_simname],
                        core_list=this_superset,
                        frames=frame_list,
                        accumulate=True,
                        label_cores=[0],
                        prefix="S%02d" % nset,
                        color_dict=color_dict)

if 'lylist' not in dir() and False:
    lylist = {}
    for this_simname in sim_list:
        lylist[this_simname] = hair_dryer.hair_tool(MOD.loops[this_simname])

#    for this_simname in  sim_list:
#        lylist[this_simname].run( )#core_list=[10,11])#core_list=[10])

#lylist['u301'].run( core_list = [0,8,27,32,37,44,84,275])
#lylist['u301'].run( core_list = [323])
#lylist['u301'].run( core_list = [24])
Esempio n. 6
0
if 'clobber' not in dir():
    clobber = False

if 'ht1' not in dir() or clobber:
    ht1 = CHT.hull_tool(TLM.loops['u301'])
if 'ht2' not in dir() or clobber:
    ht2 = CHT.hull_tool(TLM.loops['u302'])
    #ht2.plot_2d(frames=[0])
if 'ht3' not in dir() or clobber:
    ht3 = CHT.hull_tool(TLM.loops['u303'])

#
# BIG PLOT
#
if 0:
    CHT.plot_2d(ht1, frames=[0], accumulate=True, label_cores=[323])
if 0:
    CHT.plot_2d(ht2, frames=[0], accumulate=True, label_cores=[])
if 0:
    CHT.plot_2d(ht3, frames=[0], accumulate=True, label_cores=[])

if 0:
    fractions, cores = get_overlapping_cores(ht3, 185)
    catman = np.concatenate
    cores = catman([cores, [185]])[::-1]
    ht3b = hull_tool(TLM.loopes['u303'])
    ht3b.plot_2d(core_list=cores, accumulate=True)

if 'did_hulls' not in dir():
    did_hulls = False
if not did_hulls: