removed redundant implementations of fit functions (hav-neg, conductiviety, etc.)
This commit is contained in:
parent
37cc6b3359
commit
c7a258aa1d
@ -21,19 +21,12 @@ class Conductivity(BaseContainer):
|
|||||||
self.color = QColor("blue")
|
self.color = QColor("blue")
|
||||||
self.id_label = "Cond."
|
self.id_label = "Cond."
|
||||||
self.id_string = "cond"
|
self.id_string = "cond"
|
||||||
|
|
||||||
self.param_number = 3
|
self.param_number = 3
|
||||||
|
|
||||||
|
|
||||||
def function(self, p ,x):
|
def function(self, p ,x):
|
||||||
return functions.cond_cmplx(p,x)
|
return functions.cond_cmplx(p,x)
|
||||||
|
|
||||||
# def function( self, p, x ):
|
|
||||||
# om = 2*np.pi*x
|
|
||||||
# sgma, isgma, n = p
|
|
||||||
# cond = sgma/(om**n)+isgma/(1j*om**n) # Jonscher (Universal Dielectric Response: e",e' prop sigma/omega**n
|
|
||||||
# cplx = np.array([cond.real, -cond.imag])
|
|
||||||
# return cplx
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class PowerComplex(BaseContainer):
|
class PowerComplex(BaseContainer):
|
||||||
def __init__( self, plt_real=None, plt_imag=None, limits=None ):
|
def __init__( self, plt_real=None, plt_imag=None, limits=None ):
|
||||||
@ -45,11 +38,7 @@ class PowerComplex(BaseContainer):
|
|||||||
self.param_number = 2
|
self.param_number = 2
|
||||||
|
|
||||||
def function( self, p, x ):
|
def function( self, p, x ):
|
||||||
om = 2*np.pi*x
|
return functions.power_cmplx(p, x)
|
||||||
sgma, n = p
|
|
||||||
power = sgma/(om*1j)**n
|
|
||||||
cplx = np.array([power.real, -power.imag])
|
|
||||||
return cplx
|
|
||||||
|
|
||||||
|
|
||||||
class Static(BaseContainer):
|
class Static(BaseContainer):
|
||||||
@ -62,10 +51,7 @@ class Static(BaseContainer):
|
|||||||
self.param_number = 1
|
self.param_number = 1
|
||||||
|
|
||||||
def function( self, p, x ):
|
def function( self, p, x ):
|
||||||
eps_inf = p[0]
|
return functions.static_cmplx(p, x)
|
||||||
static = np.ones((2, x.size))*eps_inf
|
|
||||||
static[1, :] *= 0 # set imag part zero
|
|
||||||
return static
|
|
||||||
|
|
||||||
|
|
||||||
class Peak(BaseContainer):
|
class Peak(BaseContainer):
|
||||||
@ -81,11 +67,7 @@ class Peak(BaseContainer):
|
|||||||
self.param_number = 4
|
self.param_number = 4
|
||||||
|
|
||||||
def function( self, p, x ):
|
def function( self, p, x ):
|
||||||
eps, t, a, b = p
|
return functions.hn(p, x)
|
||||||
om = 2*np.pi*x
|
|
||||||
hn = eps/(1+(1j*om*t)**a)**b
|
|
||||||
cplx = np.array([hn.real, -hn.imag])
|
|
||||||
return cplx
|
|
||||||
|
|
||||||
|
|
||||||
class YAFF(BaseContainer):
|
class YAFF(BaseContainer):
|
||||||
|
@ -54,7 +54,7 @@ class HavNegCmplx(Function):
|
|||||||
self.set_num_paramters(4)
|
self.set_num_paramters(4)
|
||||||
|
|
||||||
|
|
||||||
def hn(x, p):
|
def hn(p, x):
|
||||||
om = 2*np.pi*x
|
om = 2*np.pi*x
|
||||||
#hn = om*1j
|
#hn = om*1j
|
||||||
eps, t, a, b = p
|
eps, t, a, b = p
|
||||||
|
Loading…
Reference in New Issue
Block a user