print() print('WELCOME'.center(_printwidth)) print('*'*_printwidth) print('Plotting script for MPL vs. CORALNet data'.center(_printwidth)) print('Plots will be saved in:'.center(_printwidth)) print(('< %s >' % output_path).center(_printwidth)) print('*'*_printwidth) print() #--------------------------------------------- # CORALNet #--------------------------------------------- print('Getting CORALNet data...') dtypes = ['BR532','PR532'] header, df_dict = lnctools.from_HDF(os.path.join(lnc_path, lnc_filenames), dtypes) # Get depol data (PR532) df = df_dict[dtypes[1]] # Get header info timestepCN = header['timestep'] # time step of sampling minaltCN = header['minalt'] # maximum altitude maxaltCN = header['maxalt'] # minimum altitude numbinsCN = header['numbins'] # number of altitude bins numprofsCN = header['numprofs'] # number of profiles in this file # Filter the data if desired here: # startdate = dt.datetime(2013, 9, 9, 14) # enddate = dt.datetime(2013, 10, 10, 10) # minalt = 150
dataname = 'scatterdat1128.h5' try: sys.path.append(os.path.join(lib, 'LNCcode')) sys.path.append(os.path.join(lib, 'MPLcode')) from LNCcode import LNC_tools as ltools from MPLcode import MPLtools as mtools import coDepol as cod except ImportError: raise Exception('You havent specified where your modules are located!') import matplotlib.pyplot as plt os.chdir(datalib) lncfile = ltools.get_files('Select Masked LNC File', filetype=('.h5', '*.h5')) lnc_header, lnc_data = ltools.from_HDF(lncfile[0], ['PR532_msk']) lnc_masked = lnc_data['PR532_msk'] mplfile = mtools.get_files('Select MPL file', filetype=('.h5', '*.h5')) mpl_data = mtools.MPL() mpl_data.fromHDF(mplfile[0]) minalt = 150 maxalt = 15000 altstep = 30
dataname = 'scatterdat1128.h5' try: sys.path.append(os.path.join(lib, 'LNCcode')) sys.path.append(os.path.join(lib, 'MPLcode')) from LNCcode import LNC_tools as ltools from MPLcode import MPLtools as mtools import coDepol as cod except ImportError: raise Exception('You havent specified where your modules are located!') import matplotlib.pyplot as plt os.chdir(datalib) lncfile = ltools.get_files('Select Masked LNC File',filetype = ('.h5','*.h5')) lnc_header,lnc_data= ltools.from_HDF(lncfile[0],['PR532_msk']) lnc_masked = lnc_data['PR532_msk'] mplfile = mtools.get_files('Select MPL file', filetype = ('.h5', '*.h5')) mpl_data = mtools.MPL() mpl_data.fromHDF(mplfile[0]) minalt = 150 maxalt = 15000