examine_seq_diag.py 594 B

123456789101112131415161718192021222324252627282930
  1. import h5py
  2. import matplotlib.pyplot as plt
  3. import numpy as np
  4. sp1 = h5py.File('sim/test0501/gre_test_0417.h5','r')
  5. sp2 = h5py.File('sim/test0501/g','r')
  6. print(sp1['seqdiag'].keys())
  7. print(sp2['seqdiag'].keys())
  8. name = 'RXP'
  9. plt.figure(1)
  10. plt.subplot(211)
  11. plt.title(name + ' (original)')
  12. plt.plot(sp1['seqdiag/T'], sp1['seqdiag' + f'/{name}'],'*')
  13. plt.subplot(212)
  14. plt.title(name + ' (twice)')
  15. plt.plot(sp2['seqdiag/T'], sp2['seqdiag' + f'/{name}'],'*')
  16. plt.show()
  17. rxp_1 = np.array(sp1['seqdiag/RXP'])
  18. rxp_2 = np.array(sp2['seqdiag/RXP'])
  19. print(rxp_1*180/np.pi)
  20. print(rxp_2*180/np.pi)