Beispiel #1
0
def tab2_BUT_tCLN_param_reload():
    global tab2_tCLN_Param_dict
    tkRoot = Tkinter.Tk()
    tkRoot.withdraw()  # Close the root window
    fin = tkFileDialog.askopenfilename(initialdir=CleanID_dir,
                                       initialfile='CASA_CLN_args.json')
    if fin.endswith('.json'):
        tab2_tCLN_Param_dict = DButil.loadjsonfile(fin)
    else:
        tab2_tCLN_Param_dict = DButil.loadjsonfile(CleanID_dir +
                                                   'CASA_CLN_args.json')
    tab2_Div_tCLN_text = '<p><b>#  ptclean :: Parallelized clean in consecutive time steps</b></p>' + ' '.join(
        "<p><b>{}</b> = {}</p>".format(key, val)
        for (key, val) in tab2_tCLN_Param_dict.items())
    tab2_Div_tCLN.text = tab2_Div_tCLN_text
    tab2_Div_tCLN2.text = '<p>CASA arguments reload from config file in <b>{}</b>.</p>'.format(
        CleanID_dir)
Beispiel #2
0
elif platform == "darwin":
    print 'Runing EvtBrowser in OS X platform'
    # for ll in xrange(5010, 5010 + 10):
    #     os.system(
    #         'port=($(lsof -i tcp:{}|grep python2.7 |cut -f2 -d" ")); [[ -n "$port" ]] && kill -9 $port'.format(ll))
    #     os.system(
    #         'port=($(lsof -i tcp:{}|grep Google |cut -f2 -d" ")); [[ -n "$port" ]] && kill -9 $port'.format(ll))
elif platform == "win32":
    print 'Runing EvtBrowser in Windows platform'

ports = []
'''load config file'''
suncasa_dir = os.path.expandvars("${SUNCASA}") + '/'
DButil.initconfig(suncasa_dir)
'''load config file'''
config_main = DButil.loadjsonfile(suncasa_dir + 'DataBrowser/config.json')

database_dir = os.path.expandvars(
    config_main['datadir']['database']) + '/aiaBrowserData/'
if not os.path.exists(database_dir):
    os.makedirs(database_dir)

SDOdir = DButil.getSDOdir(config_main, database_dir, suncasa_dir)
print SDOdir
if not os.path.exists(SDOdir):
    os.makedirs(SDOdir)

YY_select_st = Select(
    title="Start Time: Year",
    value="2014",
    options=['{:04d}'.format(ll) for ll in range(2010, 2025)],
Beispiel #3
0
elif platform == "darwin":
    print 'Runing QLook in OS X platform'
    for ll in xrange(5100, 5100 + 10):
        os.system(
            'port=($(lsof -i tcp:{}|grep python2.7 |cut -f2 -d" ")); [[ -n "$port" ]] && kill -9 $port'
            .format(ll))
        os.system(
            'port=($(lsof -i tcp:{}|grep Google |cut -f2 -d" ")); [[ -n "$port" ]] && kill -9 $port'
            .format(ll))
elif platform == "win32":
    print 'Runing QLook in Windows platform'
'''load config file'''
suncasa_dir = os.path.expandvars("${SUNCASA}") + '/'
DButil.initconfig(suncasa_dir)
'''load config file'''
config_main = DButil.loadjsonfile(suncasa_dir + 'DataBrowser/config.json')
database_dir = config_main['datadir']['database']
database_dir = os.path.expandvars(database_dir) + '/'
config_EvtID = DButil.loadjsonfile(
    '{}config_EvtID_curr.json'.format(database_dir))
SDOdir = DButil.getSDOdir(config_main, database_dir + '/aiaBrowserData/',
                          suncasa_dir)
spec_square_rs_tmax = config_main['plot_config']['tab_FSview_base'][
    'spec_square_rs_tmax']
spec_square_rs_fmax = config_main['plot_config']['tab_FSview_base'][
    'spec_square_rs_fmax']
spec_image_rs_ratio = config_main['plot_config']['tab_FSview_base'][
    'spec_image_rs_ratio']

# do_spec_regrid = False
'''define the colormaps'''