예제 #1
0
  #         ncol=2, mode="expand", borderaxespad=0.)
  #hfmt = dates.DateFormatter('%H:%M')
  #ax.xaxis.set_major_formatter(hfmt)
  y_formatter = mpl.ticker.ScalarFormatter(useOffset=False)
  ax.yaxis.set_major_formatter(y_formatter)
  ax.grid(True)

  f.suptitle(r"Schnellabschaltung KKW Gundremmingen 25.03.2015, $\Delta P_a = -1290MW$")
  f.autofmt_xdate()
  plt.savefig("images/gundremmingen-frequenzverlauf.png", bbox_inches='tight')
  plt.clf()

  print "Drawing momentum graph"
  #fig, ax = plt.subplots(figsize=(16, 9), dpi=75)
  fig, ax = plt.subplots(2, figsize=(16, 9), dpi=75)
  grundremmingen_momentum_df = datatool.resample_add_freq_momentum(grundremmingen, 19000)
  lower_momentum_limit = np.min(grundremmingen_momentum_df.momentum)
  upper_momentum_limit = np.max(grundremmingen_momentum_df.momentum)

  ax[0].set_xlabel("Zeit [Sekunden seit Mitternacht UTC]")
  ax[0].set_ylabel("Frequenz [Hz]")
  ax[0].set_xlim((np.min(grundremmingen_momentum_df.s_since_midnight.astype(int)), 
    np.max(grundremmingen_momentum_df.s_since_midnight.astype(int))))
  ax[0].plot(grundremmingen_momentum_df.s_since_midnight.astype(int),
      grundremmingen_momentum_df.freq, 'r', label=r"Frequenzmessung")
  ax[0].plot(grundremmingen_momentum_df.s_since_midnight.astype(int),
      grundremmingen_momentum_df.freq_sg, 'b', label=r"Savitzky-Golay (7, 2)")
  ax[0].legend(loc="lower right", fontsize="small")
  #hfmt = dates.DateFormatter('%H:%M')
  #ax[1].xaxis.set_major_formatter(hfmt)
  y_formatter = mpl.ticker.ScalarFormatter(useOffset=False)
  #ax.legend(bbox_to_anchor=(0., 1.02, 1., .102), loc=3,
  #         ncol=2, mode="expand", borderaxespad=0.)
  #hfmt = dates.DateFormatter('%H:%M')
  #ax.xaxis.set_major_formatter(hfmt)
  y_formatter = mpl.ticker.ScalarFormatter(useOffset=False)
  ax.yaxis.set_major_formatter(y_formatter)
  ax.grid(True)

  f.suptitle(r"Schnellabschaltung KKW M\"uhleberg 06.07.2015, $\Delta P_a = -1290MW$")
  f.autofmt_xdate()
  plt.savefig("images/muehleberg-frequenzverlauf.png")#, bbox_inches='tight')
  plt.clf()

  print "Drawing momentum graph"
  f, ax = plt.subplots(2)
  muehleberg_momentum_df = datatool.resample_add_freq_momentum(muehleberg, 19000)
  lower_momentum_limit = np.min(muehleberg_momentum_df.momentum)
  upper_momentum_limit = np.max(muehleberg_momentum_df.momentum)

  ax[0].set_xlabel("Zeit [Sekunden seit Mitternacht UTC]")
  ax[0].set_ylabel("Frequenz [Hz]")
  ax[0].set_xlim((np.min(muehleberg_momentum_df.s_since_midnight.astype(int)), 
    np.max(muehleberg_momentum_df.s_since_midnight.astype(int))))
  ax[0].plot(muehleberg_momentum_df.s_since_midnight.astype(int),
      muehleberg_momentum_df.freq, 'r', label=r"Frequenzmessung")
  ax[0].plot(muehleberg_momentum_df.s_since_midnight.astype(int),
      muehleberg_momentum_df.freq_sg, 'b', label=r"Savitzky-Golay (7, 2)")
  ax[0].legend(loc="lower right", fontsize="small")
  #hfmt = dates.DateFormatter('%H:%M')
  #ax[1].xaxis.set_major_formatter(hfmt)
  y_formatter = mpl.ticker.ScalarFormatter(useOffset=False)