Exemple #1
0
def process_fname(fname_col_str):
    fname,col_str = fname_col_str
    resultsdir = '/u/paige/maye/WWW/noise'
    
    print "Preparing data..."
    df = prep_data(fname)
    print "Done."
    fig = plt.figure()
    ax = fig.add_subplot(111)
    print "Plotting channels."
    for i in range(9):
        series = get_channel_mean(df,col_str,i+1)
        series[series==-9999.0]=np.nan
        # attention!
        series[series<(series.mean()-3*series.std())]=np.nan
        # attention off
        print i,series.min()
        ax.plot(series,label=str(i+1))
    print "Done plotting channels. Plotting csunzen."
    csunzen = get_channel_mean(df,'csunzen',1)
    csunzen[csunzen < -360]=np.nan
    ax.plot(csunzen,label='csunzen')
    ax.legend(loc='best',ncol=5, mode='expand')
    datasetname = splitext(split(fname)[1])[0]
    ax.set_title(datasetname+'_'+col_str)
    basename = '{0}_{1}.png'.format(datasetname,'tb')
    resfname = os.path.join(resultsdir,basename)
    print "Result filename: ",resfname
    plt.savefig(resfname)
Exemple #2
0
def plot_csunzen(ax, df):
    csunzen = div.get_channel_mean(df, 'csunzen', 1)
    # csunzen[csunzen < -360]=np.nan
    ax2 = ax.twinx()
    ax2.plot(csunzen, label='csunzen', color='blue')
    ax2.axhline(y=90, color='black')
    for tl in ax2.get_yticklabels():
        tl.set_color('blue')
    ax2.set_ylabel('csunzen')
Exemple #3
0
def plot_csunzen(ax, df):
    csunzen = div.get_channel_mean(df,'csunzen',1)
    # csunzen[csunzen < -360]=np.nan
    ax2=ax.twinx()
    ax2.plot(csunzen,label='csunzen',color='blue')
    ax2.axhline(y=90,color='black')
    for tl in ax2.get_yticklabels():
        tl.set_color('blue')
    ax2.set_ylabel('csunzen')
Exemple #4
0
def plot_channel_means(ax, df, col_str, ch_start=1, ch_end=9):
    for i in range(ch_start, ch_end + 1):
        series = div.get_channel_mean(df, col_str, i)
        if debug: print(i, series.min())
        ax.plot(series, label=str(i))
    ax.set_ylabel('c_mean(' + col_str + ')')
Exemple #5
0
def plot_channel_means(ax, df,col_str, ch_start=1, ch_end=9):
    for i in range(ch_start,ch_end+1):
        series = div.get_channel_mean(df, col_str, i)
        if debug: print(i,series.min())
        ax.plot(series, label=str(i))
    ax.set_ylabel('c_mean('+col_str+')')