# Science import numpy as np # Hotspotter import guifront import guitools from guitools import drawing, slot_ from guitools import backblocking as blocking from hscom import helpers from hscom import fileio as io from hsviz import draw_func2 as df2 from hsviz import viz from hsviz import interact from hotspotter import HotSpotterAPI FNUMS = dict(image=1, chip=2, res=3, inspect=4, special=5, name=6) viz.register_FNUMS(FNUMS) # Helper functions (should probably be moved into HotSpotter API) def select_next_unannotated(back): # FIXME THIS FUNCTION IS STUPID MESSY (and probably broken) msg = 'err' selection_exists = back.selection is None if selection_exists or back.selection['type_'] == 'gx': valid_gxs = back.hs.get_valid_gxs() has_chips = lambda gx: len(back.hs.gx2_cxs(gx)) > 0 hascxs_list = map(has_chips, iter(valid_gxs)) try: gx = valid_gxs[hascxs_list.index(False)]
import numpy as np # Hotspotter import guifront import guitools from guitools import drawing, slot_ from guitools import backblocking as blocking from hscom import helpers from hscom import fileio as io from hsviz import draw_func2 as df2 from hsviz import viz from hsviz import interact from hotspotter import HotSpotterAPI import os FNUMS = dict(image=1, chip=2, res=3, inspect=4, special=5, name=6) viz.register_FNUMS(FNUMS) # Helper functions (should probably be moved into HotSpotter API) def select_next_unannotated(back): # FIXME THIS FUNCTION IS STUPID MESSY (and probably broken) msg = 'err' selection_exists = back.selection is None if selection_exists or back.selection['type_'] == 'gx': valid_gxs = back.hs.get_valid_gxs() has_chips = lambda gx: len(back.hs.gx2_cxs(gx)) > 0 hascxs_list = map(has_chips, iter(valid_gxs)) try: gx = valid_gxs[hascxs_list.index(False)] back.select_gx(gx)