LICENSE added (BSD)
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
from PyQt4.QtGui import QColor
|
||||
import numpy as np
|
||||
|
||||
from libmath import yafflib
|
||||
from libmath import yafflib, functions
|
||||
|
||||
from libmath.BDSlib import id_to_color
|
||||
from container_base import BaseContainer
|
||||
@ -13,7 +13,7 @@ import gui.container_widgets
|
||||
|
||||
__author__ = 'markusro'
|
||||
|
||||
|
||||
# FIXME: why are the functions implemented again? Better to use function_library!!
|
||||
class Conductivity(BaseContainer):
|
||||
def __init__( self, plt_imag=None, plt_real=None, limits=None ):
|
||||
super(Conductivity, self).__init__(plt_real=plt_real, plt_imag=plt_imag, limits=limits)
|
||||
@ -23,13 +23,16 @@ class Conductivity(BaseContainer):
|
||||
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
|
||||
|
||||
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):
|
||||
|
@ -11,6 +11,8 @@ class BaseContainer(QObject):
|
||||
"""
|
||||
This class provides placeholders (or default) methods for "container" objects.
|
||||
These objects are basically the different fit elements for dielectric spectroscopy.
|
||||
Specific containers are implemented in the container.py module.
|
||||
|
||||
"""
|
||||
# TODO generalize the base class so that we can use plugins (self-contained fit functions)
|
||||
changedData = pyqtSignal()
|
||||
|
@ -7,7 +7,7 @@ class Daten(QObject):
|
||||
data_changed_signal = pyqtSignal(list, list, list)
|
||||
|
||||
def __init__(self, x=None, y_real=None, y_imag=None):
|
||||
super(Daten, self).__init__(None)
|
||||
super(Daten, self).__init__()
|
||||
self._data = (x, y_real, y_imag)
|
||||
|
||||
def get_data(self):
|
||||
|
Reference in New Issue
Block a user