Example #1
0
def tab1_Select_CleanID_handler(attrname, old, new):
    global ImfitIDdir, CleanIDdir
    tab1_selected_StrID_entry = tab1_SRC_StrIDPatch.selected['1d']['indices']
    StrID = StrIDList.iloc[tab1_selected_StrID_entry[0]]
    struct_id = StrID['str_id'][0] + '/'
    CleanIDdir = event_dir + struct_id + tab1_Select_CleanID.value
    ImfitIDdirdict = DButil.getlatestfile(directory=CleanIDdir, prefix='ImfitID_')
    if ImfitIDdirdict:
        tab1_Select_ImfitID.options = [os.path.basename(ll) for ll in ImfitIDdirdict['items']]
        tab1_Select_ImfitID.value = os.path.basename(ImfitIDdirdict['latest'])
        ImfitIDdir = ImfitIDdirdict['latest']
    else:
        tab1_Select_ImfitID.options = []
        tab1_Select_ImfitID.value = ''
        ImfitIDdir = ''
Example #2
0
def tab1_selection_StrID_entry(attrname, old, new):
    global tab1_selected_StrID_entry
    global CleanIDdir, CleanIDdirdict
    tab1_selected_StrID_entry = tab1_SRC_StrIDPatch.selected['1d']['indices']
    StrID = StrIDList.iloc[tab1_selected_StrID_entry[0]]
    struct_id = StrID['str_id'][0] + '/'
    in_path = event_dir + struct_id
    CleanIDdirdict = DButil.getlatestfile(directory=in_path)
    if CleanIDdirdict:
        tab1_Select_CleanID.options = [os.path.basename(ll) for ll in CleanIDdirdict['items']]
        tab1_Select_CleanID.value = os.path.basename(CleanIDdirdict['latest'])
        CleanIDdir = CleanIDdirdict['latest']
    else:
        tab1_Select_CleanID.options = []
        tab1_Select_CleanID.value = ''
        CleanIDdir = ''
        tab1_Div_FSview.text = """<p>Click <b>ToClean </b> to make synthesis images first!!</p>"""
    Text_CleanID.value = DButil.getcurtimstr()