adds more type hinting
All checks were successful
gitea-physics/pysuperconductor/pipeline/head This commit looks good
All checks were successful
gitea-physics/pysuperconductor/pipeline/head This commit looks good
This commit is contained in:
parent
5bb3a2163f
commit
346caf3ea0
@ -51,7 +51,9 @@ def find_gap(
|
|||||||
|
|
||||||
|
|
||||||
# this is n * Delta_0, calling it n in this file for brevity
|
# this is n * Delta_0, calling it n in this file for brevity
|
||||||
def n_integrand_function(xi, temp, delta, mu_star):
|
def n_integrand_function(
|
||||||
|
xi: float, temp: float, delta: float, mu_star: float
|
||||||
|
) -> float:
|
||||||
big_e = energy(xi, delta)
|
big_e = energy(xi, delta)
|
||||||
left = 1 / (1 + numpy.exp((big_e - mu_star) / temp))
|
left = 1 / (1 + numpy.exp((big_e - mu_star) / temp))
|
||||||
right = 1 / (1 + numpy.exp(big_e / temp))
|
right = 1 / (1 + numpy.exp(big_e / temp))
|
||||||
@ -59,8 +61,8 @@ def n_integrand_function(xi, temp, delta, mu_star):
|
|||||||
|
|
||||||
|
|
||||||
# as above, this is brevity n * Delta_0
|
# as above, this is brevity n * Delta_0
|
||||||
def n_integral(temp, delta, mu_star):
|
def n_integral(temp: float, delta: float, mu_star: float) -> float:
|
||||||
def integrand(xi):
|
def integrand(xi: float) -> float:
|
||||||
return n_integrand_function(xi, temp, delta, mu_star)
|
return n_integrand_function(xi, temp, delta, mu_star)
|
||||||
intermediate = 20 * numpy.sqrt(delta ** 2 + mu_star ** 2)
|
intermediate = 20 * numpy.sqrt(delta ** 2 + mu_star ** 2)
|
||||||
lower = integrate.quad(integrand, 0, intermediate)[0]
|
lower = integrate.quad(integrand, 0, intermediate)[0]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user