Surface NMR forward modelling
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

plotkerneldiff.py 568B

12345678910111213141516171819202122
  1. import numpy as np
  2. import matplotlib.pyplot as plt
  3. import sys
  4. K1 = np.loadtxt(sys.argv[1], comments="#")
  5. K2 = np.loadtxt(sys.argv[2], comments="#")
  6. nx, ny = np.shape(K1)
  7. plt.matshow( K1[0:nx//2] - K2[0:nx//2] , cmap='inferno')
  8. plt.colorbar()
  9. plt.matshow( K1[nx//2:] - K2[nx//2] , cmap='inferno')
  10. plt.colorbar()
  11. KAc = K1[0:nx//2]+1j*K1[nx//2:]
  12. KA2c = K2[0:nx//2]+1j*K2[nx//2:]
  13. # (K1[0:nx//2]+1j*K1[nx//2:]) )
  14. KD = np.abs(KAc) - np.abs(KA2c)
  15. plt.matshow(KD, cmap='RdBu', vmin=-np.max(np.abs(KD)), vmax=np.max(np.abs(KD)) )
  16. plt.colorbar()
  17. plt.show()