def plot(cur_lf0, o):

    print o

    cur_lf0[cur_lf0 < 0] = np.nan

    Utility.plot_graph(np.exp(cur_lf0), o)

    pass
Esempio n. 2
0
    tone_stress = np.intersect1d(np.where( np.array(tone) == target_tone)[0] , np.where( np.array(stress) == 'Stress')[0] ).astype(int)

    y_tone = y[tone_stress][:, :-1]
    # y_tone_means = np.mean(y_tone, axis=1)
    # print y_tone.shape
    # print y_tone_means

    # y_temp = []
    # for idx, yt in enumerate(y_tone):
    #     # print yt, y_tone_means[idx], yt-y_tone_means[idx]
    #     y_temp.append(yt-y_tone_means[idx])

    # y_tone = np.array(y_temp)

    out_object = '/home/h1/decha/Dropbox/Inter_speech_2016/Syllable_object/Typical_contour/50dims/tone_{}.pickle'.format(target_tone)
    # y_means = Utility.load_obj(out_object) #
    y_means = np.mean(y_tone, axis=0)
    x = np.arange(len(y_means))
    # print y_means, len(y_means), x

    outname = '/home/h1/decha/Dropbox/Inter_speech_2016/temporary_output/tone_{}_typical.eps'.format(target_tone)

    Utility.plot_graph(x, y_means, outname)

    # out_object = '/home/h1/decha/Dropbox/Inter_speech_2016/Syllable_object/Typical_contour/50dims/tone_{}.pickle'.format(target_tone)
    Utility.save_obj(y_means, out_object)