doc/sphinx/plots/magnetic_ff.py
raw| 1 | import numpy as np |
| 2 | import matplotlib.pyplot as plt |
| 3 | import periodictable |
| 4 | |
| 5 | fig_width = 10 |
| 6 | fig_height = 8 |
| 7 | fig_size = [fig_width,fig_height] |
| 8 | params = {'figure.figsize': fig_size} |
| 9 | plt.rcParams.update(params) |
| 10 | Fe_2 = periodictable.Fe.ion[2] |
| 11 | Q = np.linspace(0,16,200) |
| 12 | M = Fe_2.magnetic_ff[Fe_2.charge].j0_Q(Q) |
| 13 | plt.xlabel(r'Magnetic Form Factor for Fe') |
| 14 | plt.ylabel(r'$\AA^{-1}$') |
| 15 | plt.title('Ion specific property for Fe') |
| 16 | plt.plot(Q,M) |