mirror of
https://github.com/vale981/bandfit
synced 2025-03-05 09:31:42 -05:00
still more docs
This commit is contained in:
parent
e1843d5ccd
commit
0ead296097
1 changed files with 14 additions and 0 deletions
|
@ -185,6 +185,11 @@ def detect_bands(data, *args, **kwargs):
|
||||||
|
|
||||||
|
|
||||||
def plot_data_with_bands(data, bands):
|
def plot_data_with_bands(data, bands):
|
||||||
|
"""
|
||||||
|
Plot the measured band structure ``data`` together with the output
|
||||||
|
of :any:`detect_bands`.
|
||||||
|
"""
|
||||||
|
|
||||||
plt.matshow(data)
|
plt.matshow(data)
|
||||||
ks = np.arange(data.shape[1])
|
ks = np.arange(data.shape[1])
|
||||||
|
|
||||||
|
@ -193,6 +198,15 @@ def plot_data_with_bands(data, bands):
|
||||||
|
|
||||||
|
|
||||||
def candidate(k, c, d, a, δb, k_scale, k_shift):
|
def candidate(k, c, d, a, δb, k_scale, k_shift):
|
||||||
|
"""
|
||||||
|
Returns the theoretical band structure as a function of ``k``
|
||||||
|
doubled so that upper and lower band can be fitted simultaneously.
|
||||||
|
|
||||||
|
The ``a,c,d`` parameters correspond to the parameters of the
|
||||||
|
hamiltonian and ``b = a * (1 + δb)`` so that the difference
|
||||||
|
between ``a`` and ``b`` can be constrained. Additionally, the
|
||||||
|
``k`` argument is scaled and shifted with ``k_scale,k_shift``.
|
||||||
|
"""
|
||||||
k = np.asarray(k[: k.size // 2]) * k_scale + k_shift
|
k = np.asarray(k[: k.size // 2]) * k_scale + k_shift
|
||||||
energies = energy(k, a, a + δb * a, c, d)
|
energies = energy(k, a, a + δb * a, c, d)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue