adds mypy to test command and adds fixes for flake issues
Some checks failed
gitea-physics/pysuperconductor/pipeline/head There was a failure building this commit
Some checks failed
gitea-physics/pysuperconductor/pipeline/head There was a failure building this commit
This commit is contained in:
parent
83a58a5a54
commit
cb5a681117
1
do.sh
1
do.sh
@ -12,6 +12,7 @@ build() {
|
||||
test() {
|
||||
echo "I am ${FUNCNAME[0]}ing"
|
||||
poetry run flake8
|
||||
poetry run mypy pysuperconductor
|
||||
poetry run pytest
|
||||
}
|
||||
|
||||
|
@ -1,20 +1,30 @@
|
||||
import numpy # type: ignore
|
||||
import scipy.integrate as integrate # type: ignore
|
||||
import scipy.optimize # type: ignore
|
||||
import numpy # type: ignore
|
||||
import scipy.integrate as integrate # type: ignore
|
||||
import scipy.optimize # type: ignore
|
||||
|
||||
|
||||
def energy(freq: float, delta: float) -> float:
|
||||
return numpy.sqrt(freq ** 2 + delta ** 2)
|
||||
|
||||
|
||||
def gap_integrand_function(xi: float, temp: float, delta: float, mu_star: float) -> float:
|
||||
def gap_integrand_function(
|
||||
xi: float,
|
||||
temp: float,
|
||||
delta: float,
|
||||
mu_star: float
|
||||
) -> float:
|
||||
big_e = energy(xi, delta)
|
||||
if temp == 0:
|
||||
return (1 / (2 * big_e)) * (2 * numpy.heaviside(big_e - mu_star, .5) - 1)
|
||||
return numpy.tanh((big_e - mu_star) / (2 * temp)) / (2 * big_e)
|
||||
|
||||
|
||||
def gap_integral(temp: float, delta: float, mu_star: float, debye_frequency: float) -> float:
|
||||
def gap_integral(
|
||||
temp: float,
|
||||
delta: float,
|
||||
mu_star: float,
|
||||
debye_frequency: float
|
||||
) -> float:
|
||||
def integrand(xi: float) -> float:
|
||||
# the 2 here is to account for the symmetry in the integration range
|
||||
# to cut the integral to zero to omega_debyeh
|
||||
|
Loading…
x
Reference in New Issue
Block a user