blochGrueneisen

Stoner.analysis.fitting.models.e_transport.blochGrueneisen(T, thetaD, rho0, A, n)[source]

Calculate the BlochGrueneiseen Function for fitting R(T).

Parameters
  • T (array) – Temperature Values to fit

  • thetaD (float) – Debye Temperature

  • rho0 (float) – Residual resisitivity

  • A (float) – scattering scaling factor

  • n (float) – Exponent term

Returns

Evaluation of the BlochGrueneisen function for R(T)

Example

"""Test Weak-localisation fitting."""
from copy import deepcopy

from numpy import linspace, ones_like
from numpy.random import normal

from Stoner import Data
from Stoner.analysis.fitting.models.e_transport import (
    blochGrueneisen,
    BlochGrueneisen,
)

T = linspace(4.2, 300, 101)
params = [265, 65, 1.0, 5]
params2 = deepcopy(params)
G = blochGrueneisen(T, *params) + normal(size=len(T), scale=5e-5)
dG = ones_like(T) * 5e-5
d = Data(
    T,
    G,
    dG,
    setas="xye",
    column_headers=["Temperature (K)", "Resistivity", "dR"],
)

d.curve_fit(blochGrueneisen, p0=params, result=True, header="curve_fit")

d.setas = "xy"
d.lmfit(BlochGrueneisen, result=True, header="lmfit")

d.setas = "xyeyy"
d.plot(fmt=["r.", "b-", "g-"])

d.annotate_fit(blochGrueneisen, x=0.65, y=0.35, fontdict={"size": "x-small"})
d.annotate_fit(
    BlochGrueneisen,
    x=0.65,
    y=0.05,
    fontdict={"size": "x-small"},
    prefix="BlochGrueneisen",
)
d.title = "Bloch-Grueneisen Fit"
d.tight_layout()