removed redundant implementations of fit functions (hav-neg, conductiviety, etc.)

This commit is contained in:
Markus Rosenstihl 2015-01-08 16:56:44 +01:00
parent 37cc6b3359
commit c7a258aa1d
2 changed files with 6 additions and 24 deletions

View File

@ -21,19 +21,12 @@ class Conductivity(BaseContainer):
self.color = QColor("blue")
self.id_label = "Cond."
self.id_string = "cond"
self.param_number = 3
def function(self, 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):
def __init__( self, plt_real=None, plt_imag=None, limits=None ):
@ -45,11 +38,7 @@ class PowerComplex(BaseContainer):
self.param_number = 2
def function( self, p, x ):
om = 2*np.pi*x
sgma, n = p
power = sgma/(om*1j)**n
cplx = np.array([power.real, -power.imag])
return cplx
return functions.power_cmplx(p, x)
class Static(BaseContainer):
@ -62,10 +51,7 @@ class Static(BaseContainer):
self.param_number = 1
def function( self, p, x ):
eps_inf = p[0]
static = np.ones((2, x.size))*eps_inf
static[1, :] *= 0 # set imag part zero
return static
return functions.static_cmplx(p, x)
class Peak(BaseContainer):
@ -81,11 +67,7 @@ class Peak(BaseContainer):
self.param_number = 4
def function( self, p, x ):
eps, t, a, b = p
om = 2*np.pi*x
hn = eps/(1+(1j*om*t)**a)**b
cplx = np.array([hn.real, -hn.imag])
return cplx
return functions.hn(p, x)
class YAFF(BaseContainer):

View File

@ -54,7 +54,7 @@ class HavNegCmplx(Function):
self.set_num_paramters(4)
def hn(x, p):
def hn(p, x):
om = 2*np.pi*x
#hn = om*1j
eps, t, a, b = p