Esempio n. 1
0
 def show_single_query(back, res, cx, **kwargs):
     # Define callback for show_analysis
     fnum = FNUMS['inspect']
     did_exist = df2.plt.fignum_exists(fnum)
     df2.figure(fnum=fnum, docla=True, doclf=True)
     interact.interact_chipres(back.hs, res, cx=cx, fnum=fnum)
     if not did_exist:
         back.layout_figures()
Esempio n. 2
0
 def show_single_query(back, res, cx, **kwargs):
     # Define callback for show_analysis
     fnum = FNUMS['inspect']
     did_exist = df2.plt.fignum_exists(fnum)
     df2.figure(fnum=fnum, docla=True, doclf=True)
     interact.interact_chipres(back.hs, res, cx=cx, fnum=fnum)
     if not did_exist:
         back.layout_figures()
Esempio n. 3
0
 def interact_top_chipres(res, hs, tx, **kwargs):
     from hsviz import interact
     cx = res.topN_cxs(hs, tx + 1)[tx]
     return interact.interact_chipres(hs, res, cx, **kwargs)
Esempio n. 4
0
 def interact_chipres(res, hs, cx, **kwargs):
     from hsviz import interact
     return interact.interact_chipres(hs, res, cx, **kwargs)
    if len(query_gx) > 0:
        db_cx = hs.gx2_cxs(db_gx[0][0])[0]
        db_cid = hs.cx2_cid(db_cx)
    else:
        print('database image %s does not exsit.' % database_img)

    print('[back] database (cid=%r)' % db_cid)
    print('[back] database (cx = %r)' % db_cx)
elif Flag_cx & 1:
    pass

try:
    query_res = hs.query(query_cx)
except Exception as ex:
    # TODO Catch actually exceptions here
    print('[back] ex = %r' % ex)
    raise

#%%
# =============================================================================
#       Plot results (click in a figure or out of figure)
# =============================================================================

FNUMS = dict(image=1, chip=2, res=3, inspect=4, special=5, name=6)
viz.register_FNUMS(FNUMS)

fnum = FNUMS['inspect']
did_exist = df2.plt.fignum_exists(fnum)
df2.figure(fnum=fnum, docla=True, doclf=True)
interact.interact_chipres(hs, query_res, cx=db_cx, fnum=fnum)
Esempio n. 6
0
 def interact_top_chipres(res, hs, tx, **kwargs):
     from hsviz import interact
     cx = res.topN_cxs(hs, tx + 1)[tx]
     return interact.interact_chipres(hs, res, cx, **kwargs)
Esempio n. 7
0
 def interact_chipres(res, hs, cx, **kwargs):
     from hsviz import interact
     return interact.interact_chipres(hs, res, cx, **kwargs)