LICENSE added (BSD)

This commit is contained in:
Markus Rosenstihl 2015-01-08 16:47:13 +01:00
parent 8f50675525
commit 37cc6b3359
7 changed files with 40 additions and 10 deletions

24
LICENSE Normal file
View File

@ -0,0 +1,24 @@
Copyright (c) 2014, 2015, Markus Rosenstihl, Condensed Matter Physics Institute, Technische Universität Darmstadt
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@ -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):
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
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):

View File

@ -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()

View File

@ -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):

View File

@ -2,7 +2,7 @@
from PyQt4.QtCore import pyqtSignal
from PyQt4.QtGui import QColor
from data.data import Daten
from libmath.function_library import ModelFunction
from libmath.functions import ModelFunction
__author__ = 'markusro'

1
qds.py
View File

@ -348,6 +348,7 @@ class AppWindow(QMainWindow):
#TODO: need interface/method for adding function blocks, this is too repetitive
#TODO: start parameters have to be factored out for the above
def addYaff( self, pos ):
_yaff = YAFF(plt_real=self.ui.pgPlotWidget_real,
plt_imag=self.ui.pgPlotWidget_imag,