create setup script to install package
37
src/Makefile
Normal file
@ -0,0 +1,37 @@
|
||||
# Anzahl an gleichzeitgen Prozessen
|
||||
MAKEFLAGS+="-j 4"
|
||||
|
||||
###### EDIT #####################
|
||||
#Directory with ui and resource files
|
||||
RESOURCE_DIR = ui
|
||||
|
||||
#Directory for compiled resources
|
||||
COMPILED_DIR = ui
|
||||
|
||||
#UI files to compile
|
||||
UI_FILES = *.ui
|
||||
#Qt resource files to compile
|
||||
RESOURCES = images.qrc
|
||||
|
||||
#pyuic4 and pyrcc4 binaries
|
||||
|
||||
#################################
|
||||
# DO NOT EDIT FOLLOWING
|
||||
|
||||
COMPILED_UI = $(UI_FILES:%.ui=$(COMPILED_DIR)/%.py)
|
||||
COMPILED_RESOURCES = $(RESOURCES:%.qrc=$(COMPILED_DIR)/%_rc.py)
|
||||
|
||||
all : ui resources
|
||||
|
||||
resources : $(COMPILED_RESOURCES)
|
||||
|
||||
ui : $(COMPILED_UI)
|
||||
|
||||
$(COMPILED_DIR)/%.py : $(RESOURCE_DIR)/%.ui
|
||||
pyuic4 $< -o $@
|
||||
|
||||
$(COMPILED_DIR)/$(RESOURCE_DIR)/%_rc.py : $(RESOURCE_DIR)/icons/%.qrc
|
||||
pyrcc4 $< -o $@
|
||||
|
||||
clean :
|
||||
rm $(COMPILED_UI) $(COMPILED_RESOURCES) $(COMPILED_UI:.py=.pyc) $(COMPILED_RESOURCES:.py=.pyc)
|
145
src/data/Container.py
Normal file
@ -0,0 +1,145 @@
|
||||
# -*- encoding: utf8 -*-
|
||||
|
||||
from PyQt4.QtGui import QColor
|
||||
import numpy as np
|
||||
|
||||
from libmath import yafflib, functions
|
||||
|
||||
from libmath.BDSlib import id_to_color
|
||||
from container_base import BaseContainer
|
||||
|
||||
import gui.container_widgets
|
||||
|
||||
|
||||
__author__ = 'markusro'
|
||||
|
||||
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)
|
||||
self.widget = gui.container_widgets.ConductivityWidget()
|
||||
self.color = QColor("blue")
|
||||
self.id_label = "Cond."
|
||||
self.id_string = "cond"
|
||||
self.param_number = 3
|
||||
|
||||
|
||||
def function(self, p ,x):
|
||||
if self._abort:
|
||||
raise StopIteration
|
||||
return functions.cond_cmplx(p,x)
|
||||
|
||||
def start_parameter(self, pos):
|
||||
cond_par = [0.0, 10**(pos.y()+pos.x())*2*np.pi, 1.0]
|
||||
self.set_parameter(beta=cond_par)
|
||||
|
||||
|
||||
class PowerComplex(BaseContainer):
|
||||
def __init__( self, plt_real=None, plt_imag=None, limits=None ):
|
||||
super(PowerComplex, self).__init__(plt_real=plt_real, plt_imag=plt_imag, limits=limits)
|
||||
self.widget = gui.container_widgets.PowerLawWidget()
|
||||
self.color = QColor("#ff44c4")
|
||||
self.id_label = 'Power Law'
|
||||
self.id_string = "pwr"
|
||||
self.param_number = 2
|
||||
|
||||
def function( self, p, x ):
|
||||
if self._abort:
|
||||
raise StopIteration
|
||||
return functions.power_cmplx(p, x)
|
||||
|
||||
def start_parameter(self, pos):
|
||||
cond_par = [10**(pos.y()+pos.x())*2*np.pi, 1.0]
|
||||
self.set_parameter(cond_par)
|
||||
|
||||
|
||||
class Static(BaseContainer):
|
||||
def __init__( self, plt_real=None, plt_imag=None, limits=None ):
|
||||
super(Static, self).__init__(plt_real=plt_real, plt_imag=plt_imag, limits=limits)
|
||||
self.widget = gui.container_widgets.StaticWidget()
|
||||
self.color = QColor('#FF0F13')
|
||||
self.id_label = u'ε(∞)'
|
||||
self.id_string = "eps_infty"
|
||||
self.param_number = 1
|
||||
|
||||
def function( self, p, x ):
|
||||
if self._abort:
|
||||
raise StopIteration
|
||||
return functions.static_cmplx(p, x)
|
||||
|
||||
def start_parameter(self, position):
|
||||
cond_par = [10**position.y()]
|
||||
self.set_parameter(beta=cond_par)
|
||||
|
||||
class Peak(BaseContainer):
|
||||
def __init__( self, plt_real=None, plt_imag=None, limits=None ):
|
||||
super(Peak, self).__init__(plt_real=plt_real, plt_imag=plt_imag, limits=limits)
|
||||
self.widget = gui.container_widgets.PeakWidget()
|
||||
self.id_label = "Hav-Neg"
|
||||
self.id_string = "hn"
|
||||
self.param_number = 4
|
||||
|
||||
def set_id(self, id_num):
|
||||
"""
|
||||
Sets color of the peak
|
||||
:param id_num: peak id
|
||||
:type id_num: int
|
||||
"""
|
||||
self.widget.setId(id_num)
|
||||
self.color = id_to_color(id_num)
|
||||
self.widget.setColor(self.color)
|
||||
self.id_num = id_num
|
||||
|
||||
def function( self, p, x ):
|
||||
if self._abort:
|
||||
raise StopIteration
|
||||
return functions.hn(p, x)
|
||||
|
||||
def start_parameter(self, pos):
|
||||
new_peak_beta0 = [2*10**pos.y(), 1/(2*np.pi*10**pos.x()), 1, 1]
|
||||
self.set_parameter(beta=new_peak_beta0)
|
||||
|
||||
class YAFF(BaseContainer):
|
||||
def __init__( self, plt_real=None, plt_imag=None, limits=None ):
|
||||
super(YAFF, self).__init__(plt_real=plt_real, plt_imag=plt_imag, limits=limits)
|
||||
self.widget = gui.container_widgets.YaffWidget()
|
||||
self.widget.on_model_changed.connect(self.change_model)
|
||||
self.widget.configuration_changed.connect(self.change_configuration)
|
||||
self.color = QColor(32, 120, 29, int(255*0.82))
|
||||
self._libyaff = yafflib.Yaff(self.widget.getYaffType())
|
||||
self.id_label = self._libyaff.label
|
||||
self.id_string = "yaff"
|
||||
self._param_number = self._libyaff.params
|
||||
self._selector_mask = self.widget.selector_mask
|
||||
|
||||
@property
|
||||
def param_number( self ):
|
||||
return self._param_number
|
||||
|
||||
@param_number.setter
|
||||
def param_number( self, num=None ):
|
||||
self._param_number = self._libyaff.params
|
||||
|
||||
def change_configuration( self, t_list, tau_list ):
|
||||
self._libyaff.dist_tau = tau_list
|
||||
self._libyaff.time_points = t_list
|
||||
self.update_data()
|
||||
|
||||
def change_model( self ):
|
||||
self._libyaff = yafflib.Yaff(self.widget.getYaffType())
|
||||
self._selector_mask = self.widget.selector_mask
|
||||
self.id_label = self._libyaff.label
|
||||
self.param_number = self._libyaff.params
|
||||
self.update_data()
|
||||
|
||||
def function( self, p, x ):
|
||||
if self._abort:
|
||||
raise StopIteration
|
||||
ya = self._libyaff.loss(p, x)
|
||||
cplx = np.array([ya.imag, ya.real])
|
||||
return cplx
|
||||
|
||||
def start_parameter(self, pos):
|
||||
gg_y = 10**pos.y()*2
|
||||
gg_x = 1/(10**pos.x()*2*np.pi)
|
||||
yaff_par = [gg_y, gg_x, 20.0, 1.0, 0.5, gg_x/100, 1.0, 1.0]
|
||||
self.set_parameter(yaff_par)
|
0
src/data/__init__.py
Normal file
174
src/data/container_base.py
Normal file
@ -0,0 +1,174 @@
|
||||
from PyQt4.QtCore import QObject, pyqtSignal, Qt, pyqtSlot
|
||||
from PyQt4.QtGui import QColor
|
||||
import numpy as np
|
||||
import pyqtgraph as pg
|
||||
import abc
|
||||
|
||||
__author__ = 'markusro'
|
||||
|
||||
class QABCMeta(abc.ABCMeta, QObject.__class__):
|
||||
"""
|
||||
Allows us to use abstract base class module to fixate the container API.
|
||||
|
||||
The metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases.
|
||||
|
||||
This means the BaseContainer's metaclass must also be a subclass of QObject, as
|
||||
the BaseContainer is itself a subclass of QObject.
|
||||
|
||||
This class provides a suitable metaclass.
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
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.
|
||||
|
||||
"""
|
||||
__metaclass__ = QABCMeta
|
||||
|
||||
# TODO generalize the base class so that we can use plugins (self-contained fit functions)
|
||||
changedData = pyqtSignal()
|
||||
removeObj = pyqtSignal(QObject)
|
||||
|
||||
def __init__( self, plt_real=None, plt_imag=None, limits=None ):
|
||||
super(BaseContainer, self).__init__()
|
||||
|
||||
myPen = pg.mkPen(style=Qt.DotLine,
|
||||
width=2.5)
|
||||
|
||||
self.data_curve_real = pg.PlotDataItem(x=np.array([np.nan]), y=np.array([np.nan]), pen=myPen)
|
||||
self.plt_real = plt_real
|
||||
self.plt_real.addItem(self.data_curve_real)
|
||||
|
||||
self.data_curve_imag = pg.PlotDataItem(x=np.array([np.nan]), y=np.array([np.nan]), pen=myPen)
|
||||
self.plt_imag = plt_imag
|
||||
self.plt_imag.addItem(self.data_curve_imag)
|
||||
|
||||
self.limits = limits
|
||||
|
||||
# private varaibles
|
||||
|
||||
self._color = QColor("white")
|
||||
self._id_label = None
|
||||
self._id_string = None
|
||||
self._widget = None
|
||||
self._frequency = np.logspace(np.log10(limits[0]), np.log10(limits[1]), 256)
|
||||
self._data = None
|
||||
self._func = None
|
||||
self._beta = None
|
||||
self._sd_beta = None
|
||||
self._selector_mask = None
|
||||
self._param_number = 0
|
||||
self._abort = False
|
||||
|
||||
def set_limits( self, limits ):
|
||||
self.limits = limits
|
||||
self.update_data()
|
||||
|
||||
@pyqtSlot(bool)
|
||||
def abort( self, abort=False ):
|
||||
self._abort = abort
|
||||
|
||||
@property
|
||||
def param_number( self ):
|
||||
return self._param_number
|
||||
|
||||
@param_number.setter
|
||||
def param_number( self, num ):
|
||||
self._param_number = num
|
||||
|
||||
@property
|
||||
def id_string( self ):
|
||||
return self._id_string
|
||||
|
||||
@id_string.setter
|
||||
def id_string( self, id ):
|
||||
# self._func = self.functions.get_function(id)
|
||||
self._id_string = id
|
||||
|
||||
@property
|
||||
def id_label( self ):
|
||||
return self._id_label
|
||||
|
||||
@id_label.setter
|
||||
def id_label( self, id ):
|
||||
self._id_label = id
|
||||
|
||||
@property
|
||||
def color( self ):
|
||||
return self._color
|
||||
|
||||
@color.setter
|
||||
def color( self, c ):
|
||||
self._color = c
|
||||
self.data_curve_real.setPen(color=c, style=Qt.DotLine, width=2.5)
|
||||
self.data_curve_imag.setPen(color=c, style=Qt.DotLine, width=2.5)
|
||||
|
||||
@property
|
||||
def widget( self ):
|
||||
return self._widget
|
||||
|
||||
@widget.setter
|
||||
def widget( self, wdgt ):
|
||||
self._widget = wdgt
|
||||
self._widget.changedTable.connect(self.update_data) # TODO better to use self.setParameter
|
||||
self.removeObj.connect(self._widget.deleteLater)
|
||||
self._widget.removeMe.connect(self.removeMe)
|
||||
|
||||
def get_parameter( self ):
|
||||
p = self.widget.getTable() # TODO ugly ... should return self._beta etc ...?
|
||||
return p
|
||||
|
||||
def set_parameter( self, beta, sd_beta=None ):
|
||||
self._beta = beta
|
||||
self._sd_beta = sd_beta
|
||||
self.widget.update_table(beta, sd_beta)
|
||||
self.update_data()
|
||||
|
||||
def get_fixed( self ):
|
||||
p = self.widget.fixedParameter()
|
||||
return p
|
||||
|
||||
def get_data( self ):
|
||||
return self._frequency, self._data
|
||||
|
||||
def removeMe( self ):
|
||||
self.plt_imag.removeItem(self.data_curve_imag)
|
||||
self.plt_real.removeItem(self.data_curve_real)
|
||||
self.removeObj.emit(self)
|
||||
self.changedData.emit()
|
||||
|
||||
def update_data( self ):
|
||||
self._frequency = np.logspace(np.log10(self.limits[0]), np.log10(self.limits[1]), 256)
|
||||
self._data = self.function(self.get_parameter(), self._frequency)
|
||||
self.data_curve_real.setData(x=self._frequency, y=self._data[0])
|
||||
self.data_curve_imag.setData(x=self._frequency, y=self._data[1])
|
||||
self.changedData.emit()
|
||||
|
||||
def resampleData( self, x ):
|
||||
data = self.function(self.get_parameter(), x)
|
||||
return np.array([x, data[0], data[1]]).T
|
||||
|
||||
def subtractMe(self, flag):
|
||||
print "subtract"
|
||||
self._data = -self._data
|
||||
self.changedData.emit()
|
||||
|
||||
def clear_data( self ):
|
||||
self.data_curve_real.setData(x=[np.nan], y=[np.nan])
|
||||
self.data_curve_imag.setData(x=[np.nan], y=[np.nan])
|
||||
|
||||
@abc.abstractmethod
|
||||
def start_parameter(self, position):
|
||||
raise NotImplementedError("This needs to be implemented in your container subclass")
|
||||
|
||||
@abc.abstractmethod
|
||||
def function( self, p, x ):
|
||||
if self._abort:
|
||||
raise StopIteration
|
||||
raise NotImplementedError("This needs to be implemented in your container subclass")
|
||||
|
||||
|
21
src/data/data.py
Normal file
@ -0,0 +1,21 @@
|
||||
from PyQt4.QtCore import QObject, pyqtSignal
|
||||
|
||||
__author__ = 'markusro'
|
||||
|
||||
|
||||
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__()
|
||||
self._data = (x, y_real, y_imag)
|
||||
|
||||
def get_data(self):
|
||||
return self._data
|
||||
|
||||
def set_data(self, x, y_real, y_imag):
|
||||
if len(x) == len(y_real) == len(y_imag):
|
||||
self._data = (x, y_real, y_imag)
|
||||
self.data_changed_signal.emit(list(x), list(y_real), list(y_imag))
|
||||
else:
|
||||
raise AttributeError("Inhomogeneous data size x,real,imag: %i,%i,%i"(len(x), len(y_real), len(y_imag)))
|
73
src/data/experimental.py
Normal file
@ -0,0 +1,73 @@
|
||||
# -*- encoding: utf8 -*-
|
||||
from PyQt4.QtGui import QColor
|
||||
import numpy as np
|
||||
import pyqtgraph as pg
|
||||
|
||||
from libmath.BDSlib import FitFunctionCreator
|
||||
|
||||
|
||||
class Data:
|
||||
def __init__( self, frequency=np.zeros(1), die_real=np.zeros(1), die_imag=np.zeros(1) ):
|
||||
self.frequency = frequency
|
||||
self.epsilon = die_real+1j*die_imag
|
||||
self.frequency_fit = frequency[:]
|
||||
self.epsilon_fit = die_real[:]*0+1j*die_imag[:]*0
|
||||
myPen_imag = pg.mkPen(width=2.5, color=(255, 255, 127))
|
||||
myPen_real = pg.mkPen(width=2.5, color=(51, 255, 127))
|
||||
|
||||
self.experimental_curve_imag = pg.PlotDataItem(x=[np.nan], y=[np.nan],
|
||||
pen=None,
|
||||
symbol='o',
|
||||
symbolBrush=(255, 127, 0, 127))
|
||||
self.experimental_curve_real = pg.PlotDataItem(x=[np.nan], y=[np.nan],
|
||||
pen=QColor(0, 0, 0, 0),
|
||||
symbol='o',
|
||||
symbolBrush=(119, 202, 92, 127))
|
||||
self.model_curve_imag = pg.PlotDataItem(x=[np.nan], y=[np.nan], pen=myPen_imag)
|
||||
self.model_curve_real = pg.PlotDataItem(x=[np.nan], y=[np.nan], pen=myPen_real)
|
||||
self.length = len(frequency)
|
||||
self.meta = dict()
|
||||
self.fit_limits = [frequency.min(), frequency.max(), die_imag.min(), die_imag.max()]
|
||||
|
||||
self.fit_param = None
|
||||
self.fit_funcs = None # list of fit functions
|
||||
self.hide_funcs = None # remove these func from the data
|
||||
|
||||
def set_fit( self, param, funcs ):
|
||||
self.fit_funcs = funcs
|
||||
self.hide_funcs = []
|
||||
self.fit_param = param
|
||||
fit_real, fit_imag = FitFunctionCreator().fitfcn(param, self.frequency_fit, *funcs)
|
||||
self.epsilon_fit = fit_real+1j*fit_imag
|
||||
|
||||
def set_data( self, f, e_real, e_imag ):
|
||||
self.frequency = f
|
||||
self.frequency_fit = f[:]
|
||||
self.epsilon = e_real+1j*e_imag
|
||||
self.epsilon_fit = 0*e_real+1j*e_imag*0
|
||||
self.fit_limits = [f.min(), f.max(), e_imag.min(), e_imag.max()]
|
||||
self.experimental_curve_imag.setData(f, e_imag)
|
||||
self.experimental_curve_real.setData(f, e_real)
|
||||
|
||||
def set_fit_xlimits( self, xmin, xmax ):
|
||||
self.fit_limits[0] = xmin
|
||||
self.fit_limits[1] = xmax
|
||||
self.frequency_fit = self.frequency[(self.frequency <= xmax) & (self.frequency >= xmin)]
|
||||
|
||||
def set_fit_ylimits( self, ymin, ymax ):
|
||||
self.fit_limits[2] = ymin
|
||||
self.fit_limits[3] = ymax
|
||||
|
||||
def get_data( self ):
|
||||
# mask = np.ones(len(self.frequency), dtype='bool')
|
||||
mask = (self.frequency > self.fit_limits[0]) & (self.frequency < self.fit_limits[1])
|
||||
#mask &= (self.epsilon.imag > self.fit_limits[2]) & (self.epsilon.imag < self.fit_limits[3])
|
||||
return self.frequency[mask], self.epsilon[mask]
|
||||
|
||||
def remove_curves( self ):
|
||||
print "remove data_curve"
|
||||
# if self.data_curve is not None: self.data_curve.remove()
|
||||
print "remove fitted_curve"
|
||||
#if self.fitted_curve is not None: self.fitted_curve.remove()
|
||||
|
||||
|
0
src/fileio/__init__.py
Normal file
31
src/fileio/bds_file_reader.py
Normal file
@ -0,0 +1,31 @@
|
||||
import numpy as np
|
||||
import re
|
||||
from PyQt4.QtGui import QInputDialog
|
||||
|
||||
class FileReader:
|
||||
@staticmethod
|
||||
def read_datafile( path ):
|
||||
# TODO analyze file (LF,MF, HF) and act accordingly
|
||||
data = np.loadtxt(path, skiprows=4)
|
||||
numpat = re.compile('\d+\.\d+')
|
||||
try:
|
||||
Temp = None
|
||||
for line in open(path).readlines():
|
||||
if re.search("Fixed", line) or re.search("Temp", line):
|
||||
print "Found line containing 'Fixed' or 'Temp':"
|
||||
print line
|
||||
Temp = float(re.search(numpat, line).group())
|
||||
print "Temperature found in file:", Temp
|
||||
break
|
||||
search_temp_in_filename = re.search('\d+\.\d+K', path)
|
||||
if search_temp_in_filename:
|
||||
Temp = float(search_temp_in_filename.group()[:-1])
|
||||
if Temp == None: raise ValueError
|
||||
except:
|
||||
Temp = QInputDialog.getDouble( "No temperature found in data set", "Temperature/K:", value=0.00)[0]
|
||||
# mask the data to values > 0 (loglog plot)
|
||||
mask = (data[:, 1] > 0) & (data[:, 2] > 0) # & (data[:,2]>1e-3) & (data[:,0] > 1e-2)
|
||||
_freq = data[mask, 0]
|
||||
_die_stor = data[mask, 1]
|
||||
_die_loss = data[mask, 2]
|
||||
return Temp, _die_loss, _die_stor, _freq
|
170
src/fileio/gracedriver.py
Normal file
@ -0,0 +1,170 @@
|
||||
import re
|
||||
import PyQt4.QtGui
|
||||
|
||||
__author__ = 'markusro'
|
||||
|
||||
|
||||
import tempfile,os
|
||||
import numpy as np
|
||||
|
||||
|
||||
class GracePlot(object):
|
||||
def __init__(self, fname):
|
||||
self.fname = fname
|
||||
|
||||
self.ls_map = {"None":0, "-":1, ":":2, "--":3, "-.":4 }
|
||||
|
||||
# Symbols: 0:None 1:Circle 2:Square 3:Diamond 4:Triangle 5:up 6:left 7:down 8:right, 9:PLus 10:X 11:Star
|
||||
self.sym_map = {None:0, "None":0, "o":1, "s":2,
|
||||
"d":3, "D":4, "2":5,
|
||||
"v":6, "3":6, "4":7,"1":8,
|
||||
"+":8,"x":9,"*":10 }
|
||||
self.tmpfiles = []
|
||||
self.cmds = []
|
||||
self.color_map = {} # color map will pbe prepended to the final agr file
|
||||
self.data_counter = 0
|
||||
self.color_counter = 8 # keep first 8 colors already defined?
|
||||
|
||||
def __del__(self):
|
||||
# take care of tmp files:
|
||||
for f in self.tmpfiles:
|
||||
os.remove(f)
|
||||
|
||||
def plot(self, x, y, **kwds):
|
||||
# save data to temporary file
|
||||
tmp_fd, tmp_name = tempfile.mkstemp()
|
||||
self.tmpfiles.append(tmp_name)
|
||||
np.savetxt(tmp_name, np.array([x, y]).T)
|
||||
|
||||
# read data from temporary file
|
||||
self.cmds.append('READ NXY "%s"\n'%tmp_name)
|
||||
self.cmds.append('S%i SYMBOL SIZE 0.5\n'%(self.data_counter))
|
||||
self.cmds.append('S%i SYMBOL FILL PATTERN 1\n'%(self.data_counter))
|
||||
self.cmds.append('S%i SYMBOL 1\n'%(self.data_counter)) # No line
|
||||
|
||||
if "label" in kwds.keys():
|
||||
# TODO: implement at least greek symbols and lower upper case (_ and ^)?
|
||||
# with translate method?
|
||||
label = unicode(kwds["label"]).encode('ascii', 'ignore')
|
||||
|
||||
self.cmds.append('S%i LEGEND "%s"\n'%(self.data_counter, label))
|
||||
|
||||
if "ls" in kwds.keys():
|
||||
ls = kwds["ls"]
|
||||
if ls in self.ls_map.keys():
|
||||
self.cmds.append('S%i LINE LINESTYLE %i\n'%(self.data_counter, self.ls_map[ls])) # Line
|
||||
|
||||
if "sym" in kwds.keys():
|
||||
sym = kwds["sym"]
|
||||
if sym in self.sym_map.keys():
|
||||
self.cmds.append('S%i SYMBOL %i\n'%(self.data_counter, self.sym_map[sym]))
|
||||
if sym in ['+', 'x', '*']:
|
||||
self.cmds.append('S%i SYMBOL COLOR %i\n'%(self.data_counter, self.data_counter))
|
||||
else:
|
||||
self.cmds.append('S%i SYMBOL COLOR %i\n' % (self.data_counter, 1)) # vlack symbol outline
|
||||
|
||||
else:
|
||||
print "Symbol not known: %s"%sym
|
||||
|
||||
if "color" in kwds.keys():
|
||||
color = str(PyQt4.QtGui.QColor(kwds["color"]).getRgb()[:3])
|
||||
if color in self.color_map.keys():
|
||||
color_id = self.color_map[color][0]
|
||||
else:
|
||||
self.color_map[color] = [
|
||||
self.color_counter,
|
||||
"@MAP COLOR %i TO %s, \"qds%i\" \n"% (self.color_counter, color, self.color_counter)
|
||||
]
|
||||
color_id = self.color_counter
|
||||
self.color_counter += 1
|
||||
|
||||
self.cmds.append('S%i SYMBOL FILL COLOR %i\n' % (self.data_counter, color_id))
|
||||
self.cmds.append('S%i LINE COLOR %i\n' % (self.data_counter, color_id))
|
||||
|
||||
self.data_counter += 1
|
||||
|
||||
|
||||
def loglog(self, x,y, **kwds):
|
||||
self.cmds.append('YAXES SCALE LOGARITHMIC\n')
|
||||
self.cmds.append("YAXIS TICKLABEL FORMAT POWER\n")
|
||||
self.cmds.append("YAXIS TICKLABEL PREC 0\n")
|
||||
self.cmds.append('XAXES SCALE LOGARITHMIC\n')
|
||||
self.cmds.append("XAXIS TICKLABEL FORMAT POWER\n")
|
||||
self.cmds.append("XAXIS TICKLABEL PREC 0\n")
|
||||
self.plot(x, y, **kwds)
|
||||
|
||||
def semilogx(self, x, y, **kwds):
|
||||
self.cmds.append('XAXES SCALE LOGARITHMIC\n')
|
||||
self.cmds.append("xAXIS TICKLABEL FORMAT POWER\n")
|
||||
self.cmds.append("xAXIS TICKLABEL PREC 0\n")
|
||||
self.plot(x, y, **kwds)
|
||||
|
||||
def semilogy(self, x, y, **kwds):
|
||||
self.cmds.append('YAXES SCALE LOGARITHMIC\n')
|
||||
self.cmds.append("YAXIS TICKLABEL FORMAT POWER\n")
|
||||
self.cmds.append("YAXIS TICKLABEL PREC 0\n")
|
||||
self.plot(x, y, **kwds)
|
||||
|
||||
|
||||
def xlabel(self, label ):
|
||||
self.cmds.append('XAXIS LABEL "%s"\n'%label)
|
||||
pass
|
||||
|
||||
|
||||
def ylabel(self, label ):
|
||||
self.cmds.append('YAXIS LABEL "%s"\n'%label)
|
||||
pass
|
||||
|
||||
|
||||
def legend(self, on=True):
|
||||
if on:
|
||||
self.cmds.append('LEGEND ON\n')
|
||||
else:
|
||||
self.cmds.append('LEGEND OFF\n')
|
||||
|
||||
|
||||
def save(self):
|
||||
self.cmds.append('AUTOSCALE\n')
|
||||
self.cmds.append('SAVEALL "%s"\n'%self.fname)
|
||||
# write cmds to tmpfile
|
||||
tmp_fd, tmp_name = tempfile.mkstemp()
|
||||
self.tmpfiles.append(tmp_name)
|
||||
tmp_file = open(tmp_name, 'w')
|
||||
tmp_file.writelines(self.cmds)
|
||||
tmp_file.close()
|
||||
# excecute temporary xmgrace file to create final agr
|
||||
os.system("xmgrace -batch %s -hardcopy -nosafe -printfile tmp.tmp" % tmp_name)
|
||||
os.remove("tmp.tmp")
|
||||
# prepend color map to the new file
|
||||
with file(self.fname, 'r') as original_agr: data = original_agr.readlines()
|
||||
# get the last "@map color ..." line
|
||||
last_color_lineno = 0
|
||||
for i,line in enumerate(data):
|
||||
if line.lower().startswith("@map color"):
|
||||
last_color_lineno = i+1
|
||||
with file(self.fname, 'w') as new_agr:
|
||||
new_agr.writelines(data[:last_color_lineno])
|
||||
for color in self.color_map:
|
||||
new_agr.write(self.color_map[color][1])
|
||||
new_agr.writelines(data[last_color_lineno:])
|
||||
|
||||
if __name__ == "__main__":
|
||||
print "Testing Grace driver"
|
||||
np.random.seed(1337) # make it reproducible
|
||||
nums = 30
|
||||
gr = GracePlot()
|
||||
t = np.linspace(0,1,nums)
|
||||
for i in xrange(30):
|
||||
gr.loglog(t, i + np.sin(2*np.pi * 3 * t + i*0.33 ) + 0.3*np.random.random(nums),
|
||||
label="label %i"%i,
|
||||
ls=gr.ls_map.keys()[i%(len(gr.ls_map))],
|
||||
sym=gr.sym_map.keys()[i%(len(gr.sym_map))],
|
||||
color="red"
|
||||
)
|
||||
gr.xlabel(r"xlabel / \xm\sl\N\0")
|
||||
gr.ylabel(r"ylabel / \xt\sS\N\0")
|
||||
gr.save("test.agr")
|
||||
print "created test.agr"
|
||||
os.system("xmgrace test.agr")
|
||||
#print "deleting test.agr"
|
||||
#os.remove("test.agr")
|
31
src/gui/ExtraDifferentialWidget.py
Normal file
@ -0,0 +1,31 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
from ui import ExtraDifferential
|
||||
|
||||
__author__ = 'markusro'
|
||||
|
||||
from PyQt4.QtGui import QColor
|
||||
import pyqtgraph as pg
|
||||
import numpy as np
|
||||
|
||||
class DifferentialWidget(ExtraDifferential.PlotWidget):
|
||||
def __init__(self, parent=None):
|
||||
super(DifferentialWidget, self).__init__(parent)
|
||||
self.setLogMode(x=True, y=False)
|
||||
self.showGrid(x=True, y=True)
|
||||
self.addLegend()
|
||||
self.disableAutoRange()
|
||||
self.setLabel("bottom", "Frequency", units="Hz")
|
||||
|
||||
self.setLabel("left", u"Dielectric loss ε<sub>der</sub>''= ∂ε'/∂log10(v)" , units="Debye")
|
||||
self.curve_imag = pg.PlotDataItem(x=[np.nan], y=[np.nan],pen=QColor(0,0,0,0), symbol='o',
|
||||
symbolBrush=(255,127,0,127), name=u"Imaginary ε")
|
||||
self.curve_real = pg.PlotDataItem(x=[np.nan], y=[np.nan],pen=QColor(0,0,0,0), symbol='s',
|
||||
symbolBrush=(119,202,92,127), name=u"Real ε")
|
||||
self.addItem(self.curve_imag)
|
||||
self.addItem(self.curve_real)
|
||||
|
||||
def plot(self, x,real_y,imag_y):
|
||||
self.enableAutoRange()
|
||||
self.curve_real.setData(x, real_y)
|
||||
self.curve_imag.setData(x, imag_y)
|
||||
|
0
src/gui/__init__.py
Normal file
589
src/gui/container_widgets.py
Normal file
@ -0,0 +1,589 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
from ui import ConductivityGroupBox, PeakGroupBox, StaticGroupBox, PowerLawGroupBox, YAFFparameters, YAFFConfig
|
||||
|
||||
__author__ = 'Markus Rosenstihl <markus.rosenstihl@physik.tu-darmstadt.de>'
|
||||
|
||||
from PyQt4.QtGui import *
|
||||
from PyQt4.QtCore import QRegExp, pyqtSignal,pyqtSlot
|
||||
|
||||
|
||||
class ParameterWidget(QWidget):
|
||||
def __init__(self, parent = None):
|
||||
super(ParameterWidget, self).__init__(parent)
|
||||
self.vlayout = QVBoxLayout(self)
|
||||
self.vlayout.addSpacerItem(QSpacerItem(10,10,QSizePolicy.Minimum, QSizePolicy.Expanding) )
|
||||
self.blockSignals(True)
|
||||
|
||||
def add(self, wdgt):
|
||||
self.vlayout.insertWidget(self.vlayout.count()-1, wdgt)
|
||||
self.vlayout.update()
|
||||
|
||||
|
||||
|
||||
class LogFSpinBox(QDoubleSpinBox):
|
||||
scientificNotationValidator = QRegExpValidator(QRegExp("[+-]?(?:0|[1-9]\\d*)(?:\\.\\d*)?(?:[eE][+-]?\\d+)?"))
|
||||
def __init__(self, parent = None):
|
||||
super(LogFSpinBox, self).__init__(parent)
|
||||
self.setRange(0.0,1e18)
|
||||
self.setMinimum(0)
|
||||
self.setDecimals(17)
|
||||
self.setValue(1.0)
|
||||
|
||||
def stepBy(self, up_down):
|
||||
if self.value() != 0.0:
|
||||
self.setValue(self.value()*10**(up_down/9.0)) # 19 steps per decade
|
||||
|
||||
def textFromValue(self, value):
|
||||
return "%.3e"%value
|
||||
|
||||
def valueFromText(self, str_value):
|
||||
return str_value.toDouble()[0]
|
||||
|
||||
def validate(self, str_value, p_int):
|
||||
return self.scientificNotationValidator.validate(str_value, p_int)
|
||||
|
||||
|
||||
|
||||
class BaseWidget(QGroupBox):
|
||||
changedTable = pyqtSignal()
|
||||
removeMe = pyqtSignal()
|
||||
subtract = pyqtSignal(bool)
|
||||
|
||||
def __init__(self, parent=None):
|
||||
super(BaseWidget, self).__init__(parent)
|
||||
self.fixedCheckBoxes = []
|
||||
self.inputs = []
|
||||
self.errors = []
|
||||
self.names = []
|
||||
self._subtracted = False
|
||||
self.selector_mask = None # TODO: clean up
|
||||
self.func_type="None"
|
||||
|
||||
def remove(self):
|
||||
self.removeMe.emit()
|
||||
|
||||
def subtract(self):
|
||||
self.subtract.emit(self._subtracted)
|
||||
self._subtracted = not self._subtracted # Toggle state
|
||||
|
||||
|
||||
def change_values( self, num ):
|
||||
self.changedTable.emit()
|
||||
|
||||
def fixedParameter(self):
|
||||
return [0 if cb.isChecked() else 1 for cb in self.fixedCheckBoxes]
|
||||
|
||||
def setColor(self, color):
|
||||
r, g, b = color
|
||||
palette = self.palette()
|
||||
palette.setColor(QPalette.Foreground, QColor(r, g, b))
|
||||
self.setPalette(palette)
|
||||
|
||||
def getTable(self):
|
||||
tmp = [i.value() # selects the number, ignores the status
|
||||
for i in self.inputs]
|
||||
#print "getTable:", tmp
|
||||
return tmp
|
||||
|
||||
def update(self):
|
||||
self.changedTable.emit()
|
||||
|
||||
def update_table( self, beta, sd_beta=None ):
|
||||
self.blockSignals(True)
|
||||
for i, arg in enumerate(beta):
|
||||
self.inputs[i].setValue(arg)
|
||||
sd_style=""
|
||||
|
||||
if isinstance(self.inputs[i], LogFSpinBox) and sd_beta is not None:
|
||||
#if i in (0,) and sd_beta is not None:
|
||||
sd = "+/- %.3e"%(sd_beta[i])
|
||||
elif isinstance(self.inputs[i], QDoubleSpinBox) and sd_beta is not None:
|
||||
#elif i in (1,) and sd_beta is not None:
|
||||
sd = "+/- %.2f"%(sd_beta[i])
|
||||
if sd_beta is not None:
|
||||
if 0.0 < sd_beta[i]/arg < 0.2:
|
||||
sd_style="background-color: rgba(0, 255, 0, 64);"
|
||||
if 0.2 < sd_beta[i]/arg < 1.0:
|
||||
sd_style="background-color: rgba(255,255, 0, 64);"
|
||||
elif sd_beta[i]/arg > 1.0:
|
||||
sd_style="background-color: rgba(255, 0, 0, 64);"
|
||||
|
||||
else:
|
||||
sd = "( --- )"
|
||||
self.errors[i].setStyleSheet(sd_style)
|
||||
self.errors[i].setText(sd)
|
||||
self.blockSignals(False)
|
||||
|
||||
def replaceDoubleSpinBox(self, layout, widget):
|
||||
ndx = layout.indexOf(widget)
|
||||
row, column, cols, rows = layout.getItemPosition(ndx)
|
||||
widget.setParent(None)
|
||||
widget = LogFSpinBox(self)
|
||||
layout.addWidget(widget, row,column)
|
||||
|
||||
|
||||
class PeakWidget(BaseWidget,QGroupBox):
|
||||
def __init__(self, parent=None):
|
||||
QGroupBox.__init__(self)
|
||||
BaseWidget.__init__(self)
|
||||
super(PeakWidget, self).__init__(parent)
|
||||
self.ui = PeakGroupBox.Ui_PeakGroupBox()
|
||||
self.ui.setupUi(self)
|
||||
# replace eps and tau with LogFSpinBox
|
||||
self.ui.doubleSpinBox_1.setParent(None)
|
||||
self.ui.doubleSpinBox_1 = LogFSpinBox(self)
|
||||
self.ui.gridLayout.addWidget(self.ui.doubleSpinBox_1,1,1)
|
||||
self.ui.doubleSpinBox_2.setParent(None)
|
||||
self.ui.doubleSpinBox_2 = LogFSpinBox(self)
|
||||
self.ui.gridLayout.addWidget(self.ui.doubleSpinBox_2,2,1)
|
||||
|
||||
self.ui.removeButton.clicked.connect(self.remove)
|
||||
|
||||
self.names = [
|
||||
"Deps",
|
||||
"tau",
|
||||
"alpha",
|
||||
"beta"
|
||||
]
|
||||
|
||||
self.func_type="HN"
|
||||
|
||||
self.inputs = [
|
||||
self.ui.doubleSpinBox_1,
|
||||
self.ui.doubleSpinBox_2,
|
||||
self.ui.doubleSpinBox_3,
|
||||
self.ui.doubleSpinBox_4
|
||||
]
|
||||
|
||||
self.errors = [
|
||||
self.ui.label_5,
|
||||
self.ui.label_6,
|
||||
self.ui.label_7,
|
||||
self.ui.label_8,
|
||||
]
|
||||
|
||||
for dsb in self.inputs:
|
||||
dsb.valueChanged.connect(self.change_values)
|
||||
|
||||
self.fixedCheckBoxes = [self.ui.checkBox_1,
|
||||
self.ui.checkBox_2,
|
||||
self.ui.checkBox_3,
|
||||
self.ui.checkBox_4]
|
||||
self.ui.comboBox.currentIndexChanged.connect(self._distrib_select)
|
||||
|
||||
|
||||
def _distrib_select(self, dist):
|
||||
self._distrib_hn(1)
|
||||
if dist == 0: # hav-neg:
|
||||
self._distrib_hn(1)
|
||||
if dist == 1: # Cole-Cole:
|
||||
self._distrib_cc(1)
|
||||
if dist == 2: # Cole-Davidson
|
||||
self._distrib_cd(1)
|
||||
if dist == 3: # Cole-Davidson
|
||||
self._distrib_debye(1)
|
||||
|
||||
def _distrib_hn( self, state ):
|
||||
self.ui.checkBox_3.setChecked(False)
|
||||
self.ui.checkBox_3.setDisabled(False)
|
||||
self.ui.checkBox_4.setChecked(False)
|
||||
self.ui.checkBox_4.setDisabled(False)
|
||||
self.ui.doubleSpinBox_3.setDisabled(False)
|
||||
self.ui.doubleSpinBox_4.setDisabled(False)
|
||||
|
||||
def _distrib_cd(self, state):
|
||||
if state:
|
||||
self.ui.doubleSpinBox_3.setValue(1.0)
|
||||
self.ui.doubleSpinBox_3.setDisabled(True)
|
||||
self.ui.doubleSpinBox_4.setDisabled(False)
|
||||
self.ui.checkBox_3.setChecked(True)
|
||||
self.ui.checkBox_3.setDisabled(True)
|
||||
self.ui.checkBox_4.setChecked(False)
|
||||
self.func_type = "CD"
|
||||
else:
|
||||
self.ui.doubleSpinBox_3.setDisabled(False)
|
||||
self.func_type = "HN"
|
||||
|
||||
def _distrib_debye(self, state):
|
||||
if state:
|
||||
self.ui.doubleSpinBox_3.setValue(1.0)
|
||||
self.ui.doubleSpinBox_3.setDisabled(True)
|
||||
self.ui.doubleSpinBox_4.setValue(1.0)
|
||||
self.ui.doubleSpinBox_4.setDisabled(True)
|
||||
self.ui.checkBox_3.setChecked(True)
|
||||
self.ui.checkBox_3.setDisabled(True)
|
||||
self.ui.checkBox_4.setChecked(True)
|
||||
self.ui.checkBox_4.setDisabled(True)
|
||||
self.func_type = "Debye"
|
||||
|
||||
else:
|
||||
self.ui.doubleSpinBox_3.setDisabled(False)
|
||||
self.ui.doubleSpinBox_4.setDisabled(False)
|
||||
self.func_type = "HN"
|
||||
|
||||
|
||||
def _distrib_cc(self, state):
|
||||
if state:
|
||||
self.ui.doubleSpinBox_4.setValue(1.0)
|
||||
self.ui.doubleSpinBox_4.setDisabled(True)
|
||||
self.ui.doubleSpinBox_3.setDisabled(False)
|
||||
self.ui.checkBox_3.setChecked(False)
|
||||
self.ui.checkBox_4.setChecked(True)
|
||||
self.ui.checkBox_4.setDisabled(True)
|
||||
self.func_type = "CC"
|
||||
|
||||
else:
|
||||
self.ui.doubleSpinBox_4.setDisabled(False)
|
||||
self.func_type = "HN"
|
||||
|
||||
|
||||
|
||||
def setId(self, id):
|
||||
self.id = id
|
||||
self.setTitle("Peak %i" % id)
|
||||
|
||||
def setColor(self, color):
|
||||
palette = self.palette()
|
||||
palette.setColor(QPalette.Foreground, color)
|
||||
self.setPalette(palette)
|
||||
|
||||
|
||||
#
|
||||
# def updateTable(self, beta=None, sd_beta = None):
|
||||
#
|
||||
#
|
||||
# for i, arg in enumerate(beta):
|
||||
# self.inputs[i].setValue(arg)
|
||||
# sd_style=""
|
||||
# if i in (0,1) and sd_beta is not None:
|
||||
# sd = "+/- %.3e"%(sd_beta[i])
|
||||
# elif i in (2,3) and sd_beta is not None:
|
||||
# sd = "+/- %.2f"%(sd_beta[i])
|
||||
# if sd_beta is not None:
|
||||
# if 0.0 < sd_beta[i]/arg < 0.2:
|
||||
# sd_style="background-color: rgba(0, 255, 0, 64);"
|
||||
# if 0.2 < sd_beta[i]/arg < 1.0:
|
||||
# sd_style="background-color: rgba(255,255, 0, 64);"
|
||||
# elif sd_beta[i]/arg > 1.0:
|
||||
# sd_style="background-color: rgba(255, 0, 0, 64);"
|
||||
#
|
||||
# else:
|
||||
# sd = "( --- )"
|
||||
# self.errors[i].setStyleSheet(sd_style)
|
||||
# self.errors[i].setText(sd)
|
||||
|
||||
|
||||
class StaticWidget(BaseWidget, QGroupBox):
|
||||
|
||||
def __init__(self, parent=None):
|
||||
QGroupBox.__init__(self)
|
||||
BaseWidget.__init__(self)
|
||||
|
||||
super(StaticWidget, self).__init__(parent)
|
||||
self.ui = StaticGroupBox.Ui_StaticGroupBox()
|
||||
self.ui.setupUi(self)
|
||||
|
||||
#self.ui.doubleSpinBox_2.setParent(None)
|
||||
#self.ui.doubleSpinBox_2 = LogFSpinBox(self)
|
||||
#self.ui.gridLayout.addWidget(self.ui.doubleSpinBox_2,1,1)
|
||||
|
||||
self.names = ["e_infty"]
|
||||
self.errors = [self.ui.label_4]
|
||||
self.inputs = [self.ui.doubleSpinBox_1]
|
||||
|
||||
self.fixedCheckBoxes = [ self.ui.checkBox_1]
|
||||
for dsb in self.inputs:
|
||||
dsb.valueChanged.connect(self.change_values)
|
||||
|
||||
self.ui.removeButton.clicked.connect(self.remove)
|
||||
self.func_type=r"$\epsilon_\infty$"
|
||||
|
||||
|
||||
|
||||
class ConductivityWidget(BaseWidget, QGroupBox):
|
||||
|
||||
def __init__(self, parent=None):
|
||||
QGroupBox.__init__(self)
|
||||
BaseWidget.__init__(self)
|
||||
|
||||
super(ConductivityWidget, self).__init__(parent)
|
||||
self.ui = ConductivityGroupBox.Ui_ConductivityGroupBox()
|
||||
self.ui.setupUi(self)
|
||||
|
||||
self.ui.iSigma.setParent(None)
|
||||
self.ui.iSigma = LogFSpinBox(self)
|
||||
self.ui.gridLayout.addWidget(self.ui.iSigma,1,1)
|
||||
|
||||
self.ui.rSigma.setParent(None)
|
||||
self.ui.rSigma = LogFSpinBox(self)
|
||||
self.ui.gridLayout.addWidget(self.ui.rSigma,2,1)
|
||||
|
||||
self.ui.removeButton.clicked.connect(self.remove)
|
||||
self.ui.pushButton_hide.clicked.connect(self.subtract)
|
||||
|
||||
self.func_type="Cond."
|
||||
|
||||
self.names = [
|
||||
"iSig",
|
||||
"rSig",
|
||||
"pwrSig",
|
||||
]
|
||||
self.errors = [self.ui.iSigma_sd,
|
||||
self.ui.rSigma_sd,
|
||||
self.ui.pwrSigma_sd]
|
||||
|
||||
self.inputs = [self.ui.iSigma,
|
||||
self.ui.rSigma,
|
||||
self.ui.pwrSigma]
|
||||
|
||||
self.fixedCheckBoxes = [self.ui.checkBox_1,
|
||||
self.ui.checkBox_2,
|
||||
self.ui.checkBox_3]
|
||||
for dsb in self.inputs:
|
||||
dsb.valueChanged.connect(self.change_values)
|
||||
|
||||
|
||||
|
||||
class PowerLawWidget(BaseWidget):
|
||||
|
||||
def __init__(self, parent=None):
|
||||
#QGroupBox.__init__(self)
|
||||
BaseWidget.__init__(self)
|
||||
|
||||
super(PowerLawWidget, self).__init__(parent)
|
||||
self.ui = PowerLawGroupBox.Ui_PowerLawGroupBox()
|
||||
self.ui.setupUi(self)
|
||||
|
||||
self.ui.doubleSpinBox_2.setParent(None)
|
||||
self.ui.doubleSpinBox_2 = LogFSpinBox(self)
|
||||
self.ui.gridLayout.addWidget(self.ui.doubleSpinBox_2,1,1)
|
||||
self.ui.removeButton.clicked.connect(self.remove)
|
||||
self.ui.pushButton_hide.toggled.connect(self.subtract)
|
||||
self.func_type="Power Law"
|
||||
|
||||
self.names = ["Amp", "pwrAmp"]
|
||||
self.errors = [self.ui.label_5,
|
||||
self.ui.label_6]
|
||||
|
||||
self.inputs = [self.ui.doubleSpinBox_2,
|
||||
self.ui.doubleSpinBox_3]
|
||||
|
||||
self.fixedCheckBoxes = [ self.ui.checkBox_2,
|
||||
self.ui.checkBox_3]
|
||||
for dsb in self.inputs:
|
||||
dsb.valueChanged.connect(self.change_values)
|
||||
|
||||
|
||||
class YaffWidget(BaseWidget):
|
||||
on_model_changed = pyqtSignal()
|
||||
configuration_changed = pyqtSignal(list,list)
|
||||
|
||||
def __init__(self, parent=None):
|
||||
#QGroupBox.__init__(self)
|
||||
BaseWidget.__init__(self)
|
||||
super(YaffWidget, self).__init__(parent)
|
||||
|
||||
self.func_type="YAFF" # Todo wie bei peak für gg gb gge etc.
|
||||
|
||||
self.ui = YAFFparameters.Ui_Form()
|
||||
self.ui.setupUi(self)
|
||||
self.ui.doubleSpinBox_1.setParent(None)
|
||||
self.ui.doubleSpinBox_1 = LogFSpinBox(self)
|
||||
self.ui.gridLayout.addWidget(self.ui.doubleSpinBox_1, 2, 1)
|
||||
self.ui.doubleSpinBox_2.setParent(None)
|
||||
self.ui.doubleSpinBox_2 = LogFSpinBox(self)
|
||||
self.ui.gridLayout.addWidget(self.ui.doubleSpinBox_2, 3, 1)
|
||||
self.ui.doubleSpinBox_6.setParent(None)
|
||||
self.ui.doubleSpinBox_6 = LogFSpinBox(self)
|
||||
self.ui.gridLayout.addWidget(self.ui.doubleSpinBox_6, 9, 1)
|
||||
self.ui.doubleSpinBox_9.setParent(None)
|
||||
self.ui.doubleSpinBox_9 = LogFSpinBox(self)
|
||||
self.ui.gridLayout.addWidget(self.ui.doubleSpinBox_9, 12, 1)
|
||||
|
||||
self.ui.removeButton.clicked.connect(self.remove)
|
||||
self.ui.configButton.clicked.connect(self.configure)
|
||||
|
||||
self.ui.comboBox.currentIndexChanged.connect(self.change_model)
|
||||
self._names = [
|
||||
"Deps",
|
||||
"tau_a",
|
||||
"alpha",
|
||||
"beta",
|
||||
"lambda",
|
||||
"tau_b",
|
||||
"a",
|
||||
"b",
|
||||
"scale",
|
||||
"g"
|
||||
]
|
||||
|
||||
self.labels = [
|
||||
self.ui.label_111,
|
||||
self.ui.label_222,
|
||||
self.ui.label_322,
|
||||
self.ui.label_422,
|
||||
self.ui.label_522,
|
||||
self.ui.label_622,
|
||||
self.ui.label_72,
|
||||
self.ui.label_82,
|
||||
self.ui.label_112,
|
||||
self.ui.label_102
|
||||
]
|
||||
self.errors = [self.ui.label_1,
|
||||
self.ui.label_2,
|
||||
self.ui.label_3,
|
||||
self.ui.label_4,
|
||||
self.ui.label_5,
|
||||
self.ui.label_6,
|
||||
self.ui.label_7,
|
||||
self.ui.label_8,
|
||||
self.ui.label_9,
|
||||
self.ui.label_10,
|
||||
]
|
||||
|
||||
self.inputs = [self.ui.doubleSpinBox_1,
|
||||
self.ui.doubleSpinBox_2,
|
||||
self.ui.doubleSpinBox_3,
|
||||
self.ui.doubleSpinBox_4,
|
||||
self.ui.doubleSpinBox_5,
|
||||
self.ui.doubleSpinBox_6,
|
||||
self.ui.doubleSpinBox_7,
|
||||
self.ui.doubleSpinBox_8,
|
||||
self.ui.doubleSpinBox_9,
|
||||
self.ui.doubleSpinBox_10,
|
||||
]
|
||||
|
||||
self.fixedCheckBoxes = [ self.ui.checkBox_1,
|
||||
self.ui.checkBox_2,
|
||||
self.ui.checkBox_3,
|
||||
self.ui.checkBox_4,
|
||||
self.ui.checkBox_5,
|
||||
self.ui.checkBox_6,
|
||||
self.ui.checkBox_7,
|
||||
self.ui.checkBox_8,
|
||||
self.ui.checkBox_9,
|
||||
self.ui.checkBox_10,
|
||||
]
|
||||
for dsb in self.inputs:
|
||||
dsb.valueChanged.connect(self.change_values)
|
||||
self.change_model(0)
|
||||
self._t_list, self._tau_list = None, None
|
||||
|
||||
def configure(self):
|
||||
qd = YaffConfigWidget(t_list = self._t_list, tau_list = self._tau_list)
|
||||
qd.configuration_changed.connect(self._store_config)
|
||||
qd.exec_()
|
||||
#qd.show()
|
||||
def _store_config(self,t_list,tau_list):
|
||||
self._t_list = t_list
|
||||
self._tau_list = tau_list
|
||||
self.configuration_changed.emit(t_list,tau_list)
|
||||
|
||||
def getYaffType(self):
|
||||
return self.ui.comboBox.currentIndex()
|
||||
|
||||
@pyqtSlot(int)
|
||||
def change_model(self,ndx):
|
||||
#ndx = self.ui.comboBox.currentIndex()
|
||||
mask = [ # 0 show, 1 hide
|
||||
(0,0,0,0,1,1,1,1,1,1), # GG
|
||||
(0,0,0,0,1,1,1,1,0,0), # GGe
|
||||
(0,1,1,1,1,0,0,0,1,1), # Gb
|
||||
|
||||
(0,0,0,0,0,0,0,0,1,1), # GG + Gb
|
||||
(0,0,0,0,0,0,0,0,0,0), # GGe + Gb
|
||||
]
|
||||
self.names = []
|
||||
|
||||
for i,inp in enumerate(self.inputs):
|
||||
self.inputs[i].setDisabled(mask[ndx][i])
|
||||
self.inputs[i].setHidden(mask[ndx][i])
|
||||
|
||||
self.errors[i].setDisabled(mask[ndx][i])
|
||||
self.errors[i].setHidden(mask[ndx][i])
|
||||
self.errors[i].setText("(---)")
|
||||
|
||||
self.fixedCheckBoxes[i].setChecked(mask[ndx][i])
|
||||
self.fixedCheckBoxes[i].setDisabled(mask[ndx][i])
|
||||
self.fixedCheckBoxes[i].setHidden(mask[ndx][i])
|
||||
|
||||
self.labels[i].setHidden(mask[ndx][i])
|
||||
if mask[ndx][i]==0: self.names.append(self._names[i])
|
||||
self.selector_mask = [not i for i in mask[ndx] ]
|
||||
self.on_model_changed.emit()
|
||||
|
||||
class YaffConfigWidget(QDialog):
|
||||
configuration_changed = pyqtSignal(list,list)
|
||||
|
||||
def __init__(self, parent=None, t_list=None, tau_list=None):
|
||||
super(YaffConfigWidget,self).__init__(parent)
|
||||
|
||||
self.ui = YAFFConfig.Ui_Dialog()
|
||||
self.ui.setupUi(self)
|
||||
|
||||
# not working; cannot set values
|
||||
#self.replaceDoubleSpinBox(self.ui.gridLayout_time, self.ui.doubleSpinBox_tmin)
|
||||
#self.replaceDoubleSpinBox(self.ui.gridLayout_time, self.ui.doubleSpinBox_tmax)
|
||||
#self.replaceDoubleSpinBox(self.ui.gridLayout_tau, self.ui.doubleSpinBox_taumin)
|
||||
#self.replaceDoubleSpinBox(self.ui.gridLayout_tau, self.ui.doubleSpinBox_taumax)
|
||||
|
||||
|
||||
ndx = self.ui.gridLayout_time.indexOf(self.ui.doubleSpinBox_tmin)
|
||||
row, column, cols, rows = self.ui.gridLayout_time.getItemPosition(ndx)
|
||||
self.ui.doubleSpinBox_tmin.setParent(None)
|
||||
self.ui.doubleSpinBox_tmin = LogFSpinBox(self)
|
||||
|
||||
|
||||
|
||||
self.ui.gridLayout_time.addWidget(self.ui.doubleSpinBox_tmin, row,column)
|
||||
|
||||
ndx = self.ui.gridLayout_time.indexOf(self.ui.doubleSpinBox_tmax)
|
||||
row, column, cols, rows = self.ui.gridLayout_time.getItemPosition(ndx)
|
||||
self.ui.doubleSpinBox_tmax.setParent(None)
|
||||
self.ui.doubleSpinBox_tmax = LogFSpinBox(self)
|
||||
self.ui.gridLayout_time.addWidget(self.ui.doubleSpinBox_tmax, row,column)
|
||||
|
||||
ndx = self.ui.gridLayout_tau.indexOf(self.ui.doubleSpinBox_taumin)
|
||||
row, column, cols, rows = self.ui.gridLayout_tau.getItemPosition(ndx)
|
||||
self.ui.doubleSpinBox_taumin.setParent(None)
|
||||
self.ui.doubleSpinBox_taumin = LogFSpinBox(self)
|
||||
self.ui.gridLayout_tau.addWidget(self.ui.doubleSpinBox_taumin, row,column)
|
||||
|
||||
ndx = self.ui.gridLayout_tau.indexOf(self.ui.doubleSpinBox_taumax)
|
||||
row, column, cols, rows = self.ui.gridLayout_tau.getItemPosition(ndx)
|
||||
self.ui.doubleSpinBox_taumax.setParent(None)
|
||||
self.ui.doubleSpinBox_taumax = LogFSpinBox(self)
|
||||
self.ui.gridLayout_tau.addWidget(self.ui.doubleSpinBox_taumax, row,column)
|
||||
|
||||
if t_list is not None:
|
||||
self.ui.doubleSpinBox_tmin.setValue(t_list[0])
|
||||
self.ui.doubleSpinBox_tmax.setValue(t_list[1])
|
||||
else:
|
||||
self.ui.doubleSpinBox_tmin.setValue(1e-10)
|
||||
self.ui.doubleSpinBox_tmax.setValue(1e5)
|
||||
|
||||
if tau_list is not None:
|
||||
self.ui.doubleSpinBox_taumin.setValue(tau_list[0])
|
||||
self.ui.doubleSpinBox_taumax.setValue(tau_list[1])
|
||||
else:
|
||||
self.ui.doubleSpinBox_taumin.setValue(1e-10)
|
||||
self.ui.doubleSpinBox_taumax.setValue(1e5)
|
||||
|
||||
values = [self.ui.doubleSpinBox_tmin,
|
||||
self.ui.doubleSpinBox_tmax,
|
||||
self.ui.spinBox_tn,
|
||||
self.ui.doubleSpinBox_taumin,
|
||||
self.ui.doubleSpinBox_taumax,
|
||||
self.ui.spinBox_taun]
|
||||
for val in values: val.valueChanged.connect(self.changedConfiguration)
|
||||
|
||||
def changedConfiguration(self):
|
||||
t_list = [self.ui.doubleSpinBox_tmin.value(),
|
||||
self.ui.doubleSpinBox_tmax.value(),
|
||||
self.ui.spinBox_tn.value()]
|
||||
tau_list = [self.ui.doubleSpinBox_taumin.value(),
|
||||
self.ui.doubleSpinBox_taumax.value(),
|
||||
self.ui.spinBox_taun.value()]
|
||||
self.configuration_changed.emit(t_list,tau_list)
|
||||
|
83
src/gui/graphs.py
Normal file
@ -0,0 +1,83 @@
|
||||
# coding=utf-8
|
||||
from PyQt4.QtCore import pyqtSignal
|
||||
from PyQt4.QtGui import QColor
|
||||
from data.data import Daten
|
||||
from libmath.functions import ModelFunction
|
||||
|
||||
__author__ = 'markusro'
|
||||
|
||||
|
||||
import pyqtgraph as pg
|
||||
|
||||
|
||||
class Graph(object):
|
||||
def __init__(self,x = None, y = None):
|
||||
super(Graph, self).__init__(self)
|
||||
print "Graph"
|
||||
self._pen = pg.mkPen(color="w", width=2.0, style=3)
|
||||
self.graph_real = pg.PlotDataItem(x=x, y=y, pen=self._pen)
|
||||
self.graph_imag = pg.PlotDataItem(x=x, y=y, pen=self._pen)
|
||||
|
||||
@property
|
||||
def color(self):
|
||||
return self._pen.color()
|
||||
|
||||
@color.setter
|
||||
def color(self, c):
|
||||
self._pen.setColor(c)
|
||||
|
||||
@property
|
||||
def style(self):
|
||||
return self._pen.style()
|
||||
|
||||
@style.setter
|
||||
def style(self, s):
|
||||
self._pen.setStyle(s)
|
||||
|
||||
@property
|
||||
def width(self):
|
||||
return self._pen.width()
|
||||
|
||||
@width.setter
|
||||
def width(self, w):
|
||||
self._pen.setWidth(w)
|
||||
|
||||
def set_symbol(self, s):
|
||||
for gr in self.graph_real, self.graph_imag:
|
||||
gr.setSymbol(s)
|
||||
gr.setStyle(0)
|
||||
|
||||
|
||||
def update_graph_data(self, x, y_real, y_imag):
|
||||
"""
|
||||
Update Graph data.
|
||||
|
||||
@param x:
|
||||
@param y_real:
|
||||
@param y_imag:
|
||||
"""
|
||||
self.graph_real.setData(x, y_real)
|
||||
self.graph_imag.setData(x, y_imag)
|
||||
|
||||
class DataGraph(Graph):
|
||||
def __init__(self):
|
||||
super(DataGraph, self).__init__()
|
||||
self._pen = pg.mkPen(QColor(0, 0, 0, 0))
|
||||
self.graph_real = pg.PlotDataItem(x=x, y=y, pen=self._pen, symbol="o", symbolBrush=(255, 127, 0, 127))
|
||||
self.graph_imag = pg.PlotDataItem(x=x, y=y, pen=self._pen, symbol="o", symbolBrush=(255, 127, 0, 127))
|
||||
|
||||
|
||||
class GraphObject(Graph, Daten, ModelFunction):
|
||||
parameter_changed_signal = pyqtSignal(list)
|
||||
def __init__(self):
|
||||
super(GraphObject, self).__init__(self)
|
||||
self.data_changed_signal.connect(self.update_graph_data)
|
||||
|
||||
def update(self, x, p):
|
||||
if self.model is not None:
|
||||
_x, ry, iy = self.model.calculate(x, p)
|
||||
self.set_data(_x, ry, iy)
|
||||
self.parameter_changed_signal.emit(list(p))
|
||||
else:
|
||||
print "doing nothing"
|
||||
pass
|
372
src/libmath/BDSlib.py
Normal file
@ -0,0 +1,372 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
import yafflib
|
||||
|
||||
__author__ = 'markusro'
|
||||
|
||||
from PyQt4.QtGui import QColor
|
||||
from PyQt4.QtCore import QObject, pyqtSignal, pyqtSlot
|
||||
|
||||
import numpy as np
|
||||
from scipy import optimize as opt, odr
|
||||
|
||||
|
||||
def id_to_color( id ):
|
||||
colors = [
|
||||
QColor(255, 255, 255),
|
||||
QColor(168, 149, 17),
|
||||
QColor(45, 142, 15),
|
||||
QColor(160, 16, 36),
|
||||
QColor(54, 22, 115),
|
||||
QColor(36, 10, 85),
|
||||
QColor(118, 8, 23),
|
||||
QColor(31, 105, 7),
|
||||
QColor(124, 109, 8),
|
||||
]
|
||||
chosen_color = colors[id%len(colors)]
|
||||
return chosen_color
|
||||
|
||||
|
||||
class FitFunctionCreator(QObject):
|
||||
new_data = pyqtSignal(np.ndarray, np.ndarray)
|
||||
|
||||
def __init__( self ):
|
||||
super(FitFunctionCreator, self).__init__()
|
||||
self.data = None
|
||||
self.functions = Functions()
|
||||
|
||||
|
||||
def fitfcn( self, p0, x, *funcs ):
|
||||
if x.ndim == 2:
|
||||
self.data = np.zeros(x.shape)
|
||||
else:
|
||||
self.data = np.zeros((2, x.size))
|
||||
ndx = 0
|
||||
for fn in funcs: # loop over functions and add the results
|
||||
f, num_p = fn.function, fn.param_number
|
||||
p = p0[ndx:ndx+num_p]
|
||||
if x.ndim == 2:
|
||||
x = x[0]
|
||||
result = f(p, x)
|
||||
# fn.widget.updateTable(p)
|
||||
self.data += result # fit functions take only 1-dim x
|
||||
ndx += num_p
|
||||
self.new_data.emit(x, self.data)
|
||||
return self.data
|
||||
|
||||
def fitfcn_imag( self, p0, x, *funcs ):
|
||||
if x.ndim == 2:
|
||||
self.data = np.zeros(x.shape)
|
||||
else:
|
||||
self.data = np.zeros((2, x.size))
|
||||
ndx = 0
|
||||
for fn in funcs: # loop over functions and add the results
|
||||
f, num_p = fn.function, fn.param_number
|
||||
p = p0[ndx:ndx+num_p]
|
||||
if x.ndim == 2:
|
||||
x = x[0]
|
||||
result = f(p, x)
|
||||
self.data += result # fit functions take only 1-dim x
|
||||
ndx += num_p
|
||||
self.new_data.emit(x, self.data)
|
||||
return self.data[1]
|
||||
|
||||
|
||||
class FitRoutine(QObject):
|
||||
finished_fit = pyqtSignal()
|
||||
data_ready = pyqtSignal(np.ndarray, np.ndarray)
|
||||
|
||||
def __init__( self ):
|
||||
super(FitRoutine, self).__init__()
|
||||
self.f = FitFunctionCreator()
|
||||
self.f.new_data.connect(self.data_ready.emit)
|
||||
self._fitter = self.fit_odr_cmplx
|
||||
self._odr_fit = None
|
||||
self._start_parameter = None
|
||||
|
||||
@property
|
||||
def start_parameter( self ):
|
||||
return self._start_parameter
|
||||
|
||||
@start_parameter.setter
|
||||
def start_paramter( self, p0 ):
|
||||
self._start_parameter = p0
|
||||
|
||||
@property
|
||||
def fitter( self ):
|
||||
return self._fitter
|
||||
|
||||
@fitter.setter
|
||||
def fitter( self, f ):
|
||||
self._fitter = f
|
||||
|
||||
def fit_odr_cmplx( self, x, y, p0, fixed, fcns ):
|
||||
self._start_parameter = p0
|
||||
if np.iscomplexobj(y) and y.ndim == 1:
|
||||
weights = 1/np.abs(y)**2
|
||||
we = np.resize(weights, (2, weights.size))
|
||||
# we = 1/N.array([y.real**2, y.imag**2])
|
||||
y = np.array([y.real, y.imag])
|
||||
else:
|
||||
raise NotImplementedError, "need complex input for now"
|
||||
dat = odr.Data(x, y, we=we)
|
||||
mod = odr.Model(self.f.fitfcn, extra_args=fcns)
|
||||
self._odr_fit = odr.ODR(dat, mod, p0, ifixx=(0,), ifixb=fixed, maxit=800)
|
||||
|
||||
def fit_odr_imag( self, x, y, p0, fixed, fcns ):
|
||||
self._start_parameter = p0
|
||||
if np.iscomplexobj(y) and y.ndim == 1:
|
||||
we = 1/np.imag(y)**2
|
||||
else:
|
||||
raise NotImplementedError, "need complex input for now"
|
||||
dat = odr.Data(x, y.imag, we=we)
|
||||
mod = odr.Model(self.f.fitfcn_imag, extra_args=fcns)
|
||||
self._odr_fit = odr.ODR(dat, mod, p0, ifixx=(0,), ifixb=fixed, maxit=800)
|
||||
|
||||
@pyqtSlot()
|
||||
def fit( self ):
|
||||
try:
|
||||
self._odr_fit.run()
|
||||
except RuntimeError:
|
||||
print "muh"
|
||||
self.finished_fit.emit()
|
||||
|
||||
def result( self ):
|
||||
if self._odr_fit.output is None:
|
||||
self._odr_fit.output = odr.Output([self.start_parameter, None, None])
|
||||
self._odr_fit.output.stopreason = ["Aborted by user"]
|
||||
return self._odr_fit.output
|
||||
|
||||
|
||||
class FunctionRegister:
|
||||
def __init__( self ):
|
||||
self.registry = { }
|
||||
|
||||
def register_function( self, obj ):
|
||||
# print "FR: Registering:",obj
|
||||
id_string = obj.id_label
|
||||
if self.registry.has_key(obj):
|
||||
raise AssertionError, "The object is already registered! This should NOT happen"
|
||||
self.registry[obj] = id_string
|
||||
#print "FR: ",self.registry
|
||||
|
||||
def unregister_function( self, obj ):
|
||||
# print "FR: UnRegistering:",obj
|
||||
if self.registry.has_key(obj):
|
||||
self.registry.pop(obj)
|
||||
else:
|
||||
obj.deleteLater()
|
||||
raise AssertionError, "The object is not in the registry! This should NOT happen"
|
||||
#print "FR: ",self.registry
|
||||
|
||||
def get_registered_functions( self ):
|
||||
# returns functions, peaks sorted by tau
|
||||
|
||||
sorted_functions = list()
|
||||
tau_comp = 0
|
||||
for i_fcn, fcn in enumerate(self.registry):
|
||||
if fcn.id_string == "hn":
|
||||
for i, varname in enumerate(fcn.widget.names):
|
||||
if varname == "tau":
|
||||
if fcn._beta[i] <= tau_comp:
|
||||
sorted_functions.append(fcn)
|
||||
else:
|
||||
sorted_functions.insert(0, fcn)
|
||||
tau_comp = fcn._beta[i]
|
||||
# eps_infty to the front
|
||||
elif fcn.id_string == "eps_infty":
|
||||
sorted_functions.insert(0, fcn)
|
||||
# sort the rest lexigraphically
|
||||
elif fcn.id_string == "pwr":
|
||||
sorted_functions.append(fcn)
|
||||
elif fcn.id_string == "cond":
|
||||
sorted_functions.append(fcn)
|
||||
elif fcn.id_string == "yaff":
|
||||
sorted_functions.append(fcn)
|
||||
else:
|
||||
sorted_functions.append(fcn)
|
||||
return sorted_functions
|
||||
|
||||
|
||||
# ############# deprecated #####################
|
||||
def fit_odr_cmplx( x, y, p0, fixed, fcns ):
|
||||
f = FitFunctionCreator()
|
||||
#if x.ndim < 2:
|
||||
# x = N.resize(x, (2,x.size))
|
||||
if np.iscomplexobj(y) and y.ndim == 1:
|
||||
weights = 1/np.abs(y)**2
|
||||
we = np.resize(weights, (2, weights.size))
|
||||
#we = 1/N.array([y.real**2, y.imag**2])
|
||||
y = np.array([y.real, y.imag])
|
||||
else:
|
||||
raise NotImplementedError, "need complex input for now"
|
||||
dat = odr.Data(x, y, we=we)
|
||||
mod = odr.Model(f.fitfcn, extra_args=fcns)
|
||||
fit = odr.ODR(dat, mod, p0, ifixx=(0,), ifixb=fixed, maxit=8000)
|
||||
fit.run()
|
||||
#print fit.output.pprint()
|
||||
return fit.output
|
||||
|
||||
|
||||
### define funcs here
|
||||
class Functions(QObject):
|
||||
def __init__( self ):
|
||||
super(Functions, self).__init__()
|
||||
self.list = {
|
||||
# provides functions: "id_string":(function, number_of_parameters)
|
||||
"hn": (self.hn_cmplx, 4),
|
||||
"conductivity": (self.cond_cmplx, 3),
|
||||
"power": (self.power_cmplx, 2),
|
||||
"static": (self.static_cmplx, 1),
|
||||
"yaff": (self.yaff, 8)
|
||||
}
|
||||
self.YAFF = yafflib.Yaff()
|
||||
|
||||
def hn_cmplx( self, p, x ):
|
||||
om = 2*np.pi*x
|
||||
#hn = om*1j
|
||||
eps, t, a, b = p
|
||||
hn = eps/(1+(1j*om*t)**a)**b
|
||||
cplx = np.array([hn.real, -hn.imag])
|
||||
return cplx
|
||||
|
||||
def cond_cmplx( 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 power_cmplx( 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
|
||||
|
||||
def static_cmplx( self, p, x ):
|
||||
eps_inf = p[0]
|
||||
static = np.ones((2, x.size))*eps_inf
|
||||
static[1, :] *= 0 # set imag part zero
|
||||
#cplx = N.array([static.real, static.imag])
|
||||
return static
|
||||
|
||||
def yaff( self, p, x ):
|
||||
ya = self.YAFF.yaff(p[:8], x)
|
||||
cplx = np.array([ya.imag, ya.real])
|
||||
return cplx
|
||||
|
||||
def get_name( self, name ):
|
||||
return self.list[name]
|
||||
|
||||
def get_function( self, name ):
|
||||
return self.list[name][0]
|
||||
|
||||
|
||||
def fit_anneal( x, y, p0, fixed, funcs ):
|
||||
raise NotImplementedError
|
||||
bounds = [(0, 1e14), (0, 1)]
|
||||
for i in xrange(len(p0[2:])/4):
|
||||
bounds.append((1e-4, 1e12)) # delta_eps
|
||||
bounds.append((1e-12, 1e3)) # tau
|
||||
bounds.append((0.1, 1)) # a
|
||||
bounds.append((0.1, 1)) # b
|
||||
ret = opt.anneal(mini_func, p0,
|
||||
args=(x, y),
|
||||
maxeval=20000,
|
||||
maxiter=30000,
|
||||
lower=[b[0] for b in bounds],
|
||||
upper=[b[1] for b in bounds],
|
||||
dwell=100,
|
||||
full_output=1)
|
||||
#pmin, func_min, final_Temp, cooling_iters,accepted_tests, retval
|
||||
#retval : int
|
||||
#Flag indicating stopping condition::
|
||||
|
||||
# 0 : Points no longer changing
|
||||
# 1 : Cooled to final temperature
|
||||
# 2 : Maximum function evaluations
|
||||
# 3 : Maximum cooling iterations reached
|
||||
# 4 : Maximum accepted query locations reached
|
||||
# 5 : Final point not the minimum amongst encountered points
|
||||
|
||||
print "Stop reason", ret
|
||||
return ret[0]
|
||||
|
||||
|
||||
def fit_lbfgsb( x, y, p0, fixed, funcs ):
|
||||
raise NotImplementedError
|
||||
# TODO fixed parameters…
|
||||
bounds = [(0, None), (0, 1)]
|
||||
for i in xrange(len(p0[3:])/4):
|
||||
bounds.append((1e-4, 1e12)) # delta_eps
|
||||
bounds.append((1e-12, 1e3)) # tau
|
||||
bounds.append((0.1, 1)) # a
|
||||
bounds.append((0.1, 1)) # b
|
||||
|
||||
x, f_minvalue, info_dict = opt.fmin_l_bfgs_b(mini_func, p0,
|
||||
fprime=None,
|
||||
args=(x, y),
|
||||
approx_grad=True,
|
||||
bounds=bounds,
|
||||
iprint=0,
|
||||
maxfun=4000)
|
||||
if info_dict['warnflag'] != 0:
|
||||
print info_dict["task"]
|
||||
return x
|
||||
|
||||
|
||||
# Replaced with fit_odr_cmplx
|
||||
#
|
||||
#def fit_odr(x, y, p0, fixed, funcs):
|
||||
# dat = odr.Data(x, y, 1.0 / y**2)
|
||||
# mod = odr.Model(multi_hn)
|
||||
# fit = odr.ODR(dat, mod, p0, ifixx=(0,), ifixb=fixed, maxit=2000)
|
||||
# fit.run()
|
||||
# return fit.output.beta
|
||||
|
||||
|
||||
def hn( p, nu ):
|
||||
delta_eps, tau, a, b = p
|
||||
om = 2*np.pi*nu
|
||||
Phi = np.arctan((om*tau)**a*np.sin(np.pi*a/2.)/(1.+(om*tau)**a*np.cos(np.pi*a/2.)))
|
||||
e_loss = delta_eps*(1+2*(om*tau)**a*np.cos(np.pi*a/2.)+(om*tau)**(2.*a) )**(
|
||||
-b/2.)*np.sin(b*Phi)
|
||||
e_stor = delta_eps*(1+2*(om*tau)**a*np.cos(np.pi*a/2.)+(om*tau)**(2.*a) )**(
|
||||
-b/2.)*np.cos(b*Phi)
|
||||
return e_loss # 2* oder nicht?
|
||||
|
||||
|
||||
def mini_func( p, x, y ):
|
||||
res = y-multi_hn(p, x)
|
||||
# apply weights
|
||||
res /= 1/y
|
||||
return np.sqrt(np.dot(res, res))
|
||||
|
||||
|
||||
def multi_hn( p, nu ):
|
||||
conductivity = p[1]
|
||||
cond_beta = p[2]
|
||||
om = 2*np.pi*nu
|
||||
e_loss = conductivity/om**cond_beta
|
||||
e_loss += p[0]
|
||||
#for key, igroup in groupby(p[3:], lambda x: x//4):
|
||||
for i in xrange(len(p[3:])/4):
|
||||
delta_eps, tau, a, b = p[3+i*4:3+(i+1)*4]
|
||||
#delta_eps, tau, a, b = list(igroup)
|
||||
#print delta_eps,tau,a,b
|
||||
#a = 0.5 *(1 + N.tanh(a))
|
||||
#b = 0.5 *(1 + N.tanh(b))
|
||||
Phi = np.arctan((om*tau)**a*np.sin(np.pi*a/2.)/(1.+(om*tau)**a*np.cos(np.pi*a/2.)))
|
||||
e_loss += 2*delta_eps*(1+2*(om*tau)**a*np.cos(np.pi*a/2.)+(om*tau)**(2.*a) )**(
|
||||
-b/2.)*np.sin(b*Phi)
|
||||
#e_stor = delta_eps * (1+ 2*(om*tau)**a * N.cos(N.pi*a/2.) + (om*tau)**(2.*a) )**(-b/2.)*N.cos(b*Phi)
|
||||
return e_loss
|
||||
|
||||
|
||||
def tau_peak( f, a, b ):
|
||||
tau = (np.sin(np.pi*a/2./(b+1))/np.sin(np.pi*a*b/2./(b+1)))**(1/a)
|
||||
tau /= 2*np.pi*f
|
||||
return tau
|
||||
|
||||
|
||||
|
0
src/libmath/__init__.py
Normal file
142
src/libmath/functions.py
Normal file
@ -0,0 +1,142 @@
|
||||
# coding=utf-8
|
||||
import warnings
|
||||
import numpy as np
|
||||
import yafflib
|
||||
|
||||
__author__ = 'markusro'
|
||||
|
||||
|
||||
class Function(object):
|
||||
|
||||
|
||||
def __init__(self):
|
||||
super(Function, self).__init__()
|
||||
self._id_string = None
|
||||
self._num_parameters = None
|
||||
self._pretty_name = ""
|
||||
self._function = None
|
||||
|
||||
def get_id_string(cls):
|
||||
if cls._id_string is None:
|
||||
raise NotImplementedError("You need to set the id_string")
|
||||
return cls._id_string
|
||||
|
||||
def set_id_string(cls, s):
|
||||
cls._id_string = s
|
||||
|
||||
def get_num_paramters(cls):
|
||||
if cls._num_paramters is None:
|
||||
raise NotImplementedError("You need to set the num_paramters")
|
||||
return cls._num_paramters
|
||||
|
||||
def set_num_paramters(cls, s):
|
||||
cls._num_paramters = s
|
||||
|
||||
def get_function(cls):
|
||||
if cls._function is None:
|
||||
raise NotImplementedError("You need to set f")
|
||||
return cls._function
|
||||
|
||||
def set_function(cls, f):
|
||||
cls._function = f
|
||||
|
||||
def calculate(self, x, p):
|
||||
if self._function is None: raise NotImplementedError("You need to set f")
|
||||
data = self._function(x, p)
|
||||
return x,data[0],data[1]
|
||||
|
||||
|
||||
class HavNegCmplx(Function):
|
||||
def __init__(self):
|
||||
super(HavNegCmplx, self).__init__()
|
||||
self.set_function(hn)
|
||||
self.set_id_string("hn")
|
||||
self.set_num_paramters(4)
|
||||
|
||||
|
||||
def hn(p, x):
|
||||
om = 2*np.pi*x
|
||||
#hn = om*1j
|
||||
eps, t, a, b = p
|
||||
h_n = eps/(1+(1j*om*t)**a)**b
|
||||
cplx = np.array([h_n.real, -h_n.imag])
|
||||
return cplx
|
||||
|
||||
|
||||
class ConductivityCmplx(Function):
|
||||
def __init__(self):
|
||||
super(ConductivityCmplx, self).__init__()
|
||||
self.set_num_paramters(3)
|
||||
self.set_function(cond_cmplx)
|
||||
self.set_id_string("conductivity")
|
||||
|
||||
|
||||
def cond_cmplx(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 PowerCmplx(Function):
|
||||
def __init__(self):
|
||||
super(PowerCmplx, self).__init__()
|
||||
self.set_function(power_cmplx)
|
||||
self.set_num_paramters(2)
|
||||
self.set_id_string("power_law")
|
||||
|
||||
|
||||
def power_cmplx( p, x ):
|
||||
om = 2*np.pi*x
|
||||
sgma, n = p
|
||||
power = sgma/(om*1j)**n
|
||||
cplx = np.array([power.real, -power.imag])
|
||||
return cplx
|
||||
|
||||
|
||||
class EpsInftyCmplx(Function):
|
||||
def __init__(self):
|
||||
super(EpsInftyCmplx, self).__init__()
|
||||
self.set_function(static_cmplx)
|
||||
self.set_id_string("e_inf")
|
||||
self.set_num_paramters(1)
|
||||
|
||||
|
||||
def static_cmplx(p, x ):
|
||||
eps_inf = p[0]
|
||||
static = np.ones((2, x.size))*eps_inf
|
||||
static[1, :] *= 0 # set imag part zero
|
||||
return static
|
||||
|
||||
|
||||
|
||||
class YaffCmplx(Function):
|
||||
def __init__(self):
|
||||
super(YaffCmplx, self).__init__()
|
||||
self.set_function(yaff)
|
||||
self.set_id_string("yaff")
|
||||
self.set_num_paramters(8)
|
||||
|
||||
|
||||
def yaff( p, x ):
|
||||
#ya = self.YAFF.yaff(p[:8], x)
|
||||
ya = yafflib.Yaff.yaff(p[:,0], x)
|
||||
cplx = np.array([ya.imag, ya.real])
|
||||
return cplx
|
||||
|
||||
|
||||
class ModelFunction(object):
|
||||
def __init__(self):
|
||||
super(ModelFunction, self).__init__(self)
|
||||
self.model = None
|
||||
|
||||
@classmethod
|
||||
def select_model(self, model):
|
||||
self._functions_avail = ", ".join( cls().get_id_string() for cls in Function.__subclasses__())
|
||||
for cls in Function.__subclasses__():
|
||||
if model == cls().get_id_string():
|
||||
self.model = cls()
|
||||
return True
|
||||
warnings.warn("Function not found: %s \n(available functions: %s)"%(model, self._functions_avail))
|
||||
return False
|
258
src/libmath/yafflib.py
Normal file
@ -0,0 +1,258 @@
|
||||
__author__ = 'markusro'
|
||||
|
||||
from numpy import *
|
||||
import multiprocessing
|
||||
|
||||
from PyQt4.QtCore import pyqtSignal, QObject
|
||||
|
||||
import scipy.special
|
||||
import scipy.integrate
|
||||
|
||||
#define norm1(a,b) exp(gammln(b/a))/(a*pow(b/a,b/a))
|
||||
#define glntau1(x,t,a,b) exp( -exp( (log(x)-log(t))*a )*b/a) * pow(x/t,b)
|
||||
|
||||
|
||||
def filon(oms, unsorted_x,unsorted_y):
|
||||
x = unsorted_x[unsorted_x.argsort()]
|
||||
y = unsorted_y[unsorted_x.argsort()]
|
||||
amps = zeros(oms.size, dtype='complex')
|
||||
for i,om in enumerate(oms):
|
||||
amps[i] = sum(diff(y)/diff(x)*(cos(om*x[1:])-cos(om*x[:-1])))/om**2
|
||||
amps[i] += 1j*( - sum(diff(y)/diff(x)*(sin(om*x[1:])-sin(om*x[:-1])))/om**2)
|
||||
#-y[0]/om
|
||||
return amps
|
||||
|
||||
class PhiT:
|
||||
def __init__(self, dist_x, dist_y):
|
||||
self.dist_x = dist_x
|
||||
self.dist_y = dist_y
|
||||
def __call__(self, ts):
|
||||
phis = zeros(ts.size)
|
||||
for i,t in enumerate(ts):
|
||||
kern = self.dist_y*exp(-t/self.dist_x)
|
||||
phis[i] = scipy.integrate.simps(kern, log(self.dist_x))
|
||||
return phis
|
||||
|
||||
|
||||
class Yaff(QObject):
|
||||
step_signal = pyqtSignal(list)
|
||||
def __init__(self, dist_type=0):
|
||||
super(Yaff,self).__init__()
|
||||
self._dist_tau = logspace(-12,6,512)
|
||||
self.dist_y = zeros(self.dist_tau.size)
|
||||
self._time_points = logspace(-10,5,512*2)
|
||||
|
||||
yaff = [
|
||||
(self.yaff_gg, "GG"),
|
||||
(self.yaff_gge, "GGe"),
|
||||
(self.yaff_gb, "Gb"),
|
||||
(self.yaff, "GG + GGb"),
|
||||
(self.yaff_extended, "GGe + GGb"),
|
||||
]
|
||||
self.loss, self.label = yaff[dist_type]
|
||||
self.params = 10
|
||||
|
||||
|
||||
@property
|
||||
def time_points(self):
|
||||
return self._time_points
|
||||
|
||||
@time_points.setter
|
||||
def time_points(self, t_list):
|
||||
tmin, tmax, num = t_list
|
||||
tmi,tma = tmin, tmax
|
||||
self._time_points = logspace(log10(tmi), log10(tma), num)
|
||||
|
||||
@property
|
||||
def dist_tau(self):
|
||||
return self._dist_tau
|
||||
|
||||
@dist_tau.setter
|
||||
def dist_tau(self, tau_list):
|
||||
tmin, tmax, num = tau_list
|
||||
tmi,tma = tmin, tmax
|
||||
self._dist_tau = logspace(log10(tmi), log10(tma), num)
|
||||
|
||||
|
||||
def gg(self, p, tau):
|
||||
tau0, a, b = p
|
||||
"""
|
||||
Generalized Gamma function
|
||||
"""
|
||||
NGG = a * (b/a)**(b/a) / scipy.special.gamma(b/a)
|
||||
#g = exp(-b/a*exp( (log(tau)-log(tau0))*a))*(tau/tau0)**b
|
||||
g = exp(-b/a*exp( (log(tau)-log(tau0))*a))*(tau/tau0)**b
|
||||
return g*NGG
|
||||
|
||||
def ggb(self, p, tau):
|
||||
tau0,a,b = p
|
||||
norm_ggb = a*(1+b)/pi *b**(b/(1+b)) * sin(pi*b/(1+b))
|
||||
g = (b*exp( (log(tau)-log(tau0)) *a) + exp( (log(tau)-log(tau0))*(-a*b)))**(-1)
|
||||
return norm_ggb*g
|
||||
|
||||
def gg_hw(self, p ,tau):
|
||||
tau0, a, b, s,g = p
|
||||
"""
|
||||
Generalized Gamma function with HF wing.
|
||||
s gives the onset of the wing in units of tau0, i.e. 100 means 100*tau0 or two decades later
|
||||
g is the slope of the wing, smaller than b; if not the slope will be b
|
||||
"""
|
||||
NGG = a * (b/a)**(b/a) / ( scipy.special.gamma(b/a) + s**(g-b)*(a/b)**((g-b)/a)* scipy.special.gamma(g/a) )
|
||||
g = exp(-b/a*exp((log(tau) - log(tau0))*a))*(tau/tau0)**b * (1 + (tau*s/tau0)**(g-b))
|
||||
return g*NGG
|
||||
|
||||
def dist_to_eps(omegas,dist_x,dist_y):
|
||||
epp = zeros(len(omegas), dtype='complex')
|
||||
for i,om in enumerate(omegas):
|
||||
kern_imag = dist_y*om*dist_x/(1+(om*dist_x)**2)
|
||||
kern_real = dist_y/(1+(om*dist_x)**2)
|
||||
epp[i] = scipy.integrate.simps(kern_real,log(dist_x))
|
||||
epp[i] += 1j*scipy.integrate.simps(kern_imag,log(dist_x))
|
||||
return epp
|
||||
|
||||
# serial version
|
||||
def dist_to_relax_(self, ts,dist_x,dist_y):
|
||||
phi = zeros(len(ts))
|
||||
for i,t in enumerate(ts):
|
||||
phi[i] = self.phi_t(t,dist_x,dist_y)
|
||||
return phi
|
||||
|
||||
# parallel version
|
||||
def dist_to_relax(self, ts,dist_x,dist_y):
|
||||
pool = multiprocessing.Pool()
|
||||
num_cpus = multiprocessing.cpu_count()
|
||||
ts_chunks = array_split(ts,num_cpus)
|
||||
result = pool.map(PhiT(dist_x,dist_y), ts_chunks )
|
||||
pool.close()
|
||||
pool.terminate()
|
||||
pool.join()
|
||||
return concatenate(result)
|
||||
|
||||
|
||||
def phi_t(self, t, dist_x, dist_y):
|
||||
kern = dist_y*exp(-t/dist_x)
|
||||
phi = scipy.integrate.simps(kern,log(dist_x))
|
||||
return phi
|
||||
|
||||
def williams_watts(self, phi_1, phi_2, lambd):
|
||||
return phi_1 * ( (1-lambd) + lambd*phi_2)
|
||||
|
||||
def yaff2(self, p, x):
|
||||
"""
|
||||
GGe+G b ---> GG+GB - lambda determined by p
|
||||
"""
|
||||
delta_eps, s_c, tau1,a1,b1, g,s, tau2, a2, b2 = p
|
||||
p_ggb = tau2,a2,b2
|
||||
p_gghw=tau1,a1,b1,g,s
|
||||
lambd = 2*g/pi*a1*(b1/a1)**(b1/a1)
|
||||
lambd /= scipy.special.gamma(b1/a1)*s**(b1-g) + (a1/b1)**((g-b1)/a1)*scipy.special.gamma(g/a1)
|
||||
print "LAMBDA:",lambd,a1,b1,g,s
|
||||
dist_ggb = self.ggb(p_ggb, dist_t)
|
||||
phi_beta = self.dist_to_relax(ts, dist_t, dist_ggb ).real
|
||||
phi_alpha = self.dist_to_relax(ts, dist_t, self.gg_hw(p_gghw, dist_t)).real
|
||||
phi_tot = (1-lambd) + lambd*phi_beta
|
||||
phi_tot *= phi_alpha
|
||||
epp = delta_eps*2*pi*x*filon(2*pi*x, ts, phi_tot ).real
|
||||
epp += s_c/(2*pi*x)
|
||||
return epp
|
||||
|
||||
def yaff_extended(self, p,x, cb=None):
|
||||
"""
|
||||
GG + GB
|
||||
"""
|
||||
delta_eps, tau1, a1, b1, lambd, tau2, a2, b2, s, g = p
|
||||
|
||||
dist_ggb = self.ggb(p=[tau2,a2,b2], tau=self.dist_tau)
|
||||
dist_gg = self.gg_hw (p=[tau1,a1,b1,s,g], tau=self.dist_tau)
|
||||
|
||||
#ts = logspace(-10,5,512*2)
|
||||
|
||||
self.dist_y = dist_ggb
|
||||
phi_beta = self.dist_to_relax(self.time_points, self.dist_tau, self.dist_y).real
|
||||
|
||||
self.dist_y = dist_gg
|
||||
phi_alpha = self.dist_to_relax(self.time_points, self.dist_tau, self.dist_y).real
|
||||
|
||||
# William-Watts-Ansatz
|
||||
phi_tot = (1-lambd) + lambd*phi_beta
|
||||
phi_tot *= phi_alpha
|
||||
epp = delta_eps*2*pi*x*filon(2*pi*x, self.time_points, phi_tot)
|
||||
|
||||
self.step_signal.emit(list(p))
|
||||
return epp
|
||||
|
||||
def yaff(self, p,x, cb=None):
|
||||
"""
|
||||
GG + GB
|
||||
"""
|
||||
delta_eps, tau1, a1, b1, lambd, tau2, a2, b2, s, g = p
|
||||
|
||||
dist_ggb = self.ggb(p=[tau2,a2,b2], tau=self.dist_tau)
|
||||
dist_gg = self.gg (p=[tau1,a1,b1], tau=self.dist_tau)
|
||||
|
||||
#ts = logspace(-10,5,512*2)
|
||||
|
||||
self.dist_y = dist_ggb
|
||||
phi_beta = self.dist_to_relax(self.time_points, self.dist_tau, self.dist_y).real
|
||||
|
||||
self.dist_y = dist_gg
|
||||
phi_alpha = self.dist_to_relax(self.time_points, self.dist_tau, self.dist_y).real
|
||||
|
||||
# William-Watts-Ansatz
|
||||
phi_tot = (1-lambd) + lambd*phi_beta
|
||||
phi_tot *= phi_alpha
|
||||
epp = delta_eps*2*pi*x*filon(2*pi*x, self.time_points, phi_tot)
|
||||
|
||||
self.step_signal.emit(list(p))
|
||||
return epp
|
||||
|
||||
def yaff_gb(self, p,x, cb=None):
|
||||
"""
|
||||
GG
|
||||
"""
|
||||
delta_eps, tau1, a1, b1, lambd, tau2, a2, b2, s, g = p
|
||||
#ts = logspace(-10,5,512*2)
|
||||
dist_ggb = self.ggb(p=[tau2, a2, b2], tau=self.dist_tau)
|
||||
self.dist_y = dist_ggb
|
||||
phi_alpha = self.dist_to_relax(self.time_points, self.dist_tau, self.dist_y).real
|
||||
epp = delta_eps*2*pi*x*filon(2*pi*x, self.time_points, phi_alpha )
|
||||
self.step_signal.emit(list(p))
|
||||
return epp
|
||||
|
||||
def yaff_gg(self, p,x, cb=None):
|
||||
"""
|
||||
GG
|
||||
"""
|
||||
delta_eps, tau1, a1, b1, lambd, tau2, a2, b2, s, g = p
|
||||
#ts = logspace(-10,5,512*2)
|
||||
dist_gg = self.gg(p=[tau1,a1,b1], tau=self.dist_tau)
|
||||
self.dist_y = dist_gg
|
||||
phi_alpha = self.dist_to_relax(self.time_points, self.dist_tau, self.dist_y).real
|
||||
epp = delta_eps*2*pi*x*filon(2*pi*x, self.time_points, phi_alpha )
|
||||
self.step_signal.emit(list(p))
|
||||
return epp
|
||||
|
||||
def yaff_gge(self, p,x):
|
||||
"""
|
||||
GG
|
||||
"""
|
||||
delta_eps, tau1, a1, b1, lambd, tau2, a2, b2, s, g = p
|
||||
#ts = logspace(-10,5,512*2)
|
||||
dist_gg = self.gg_hw(p=[tau1, a1, b1, s, g], tau=self.dist_tau)
|
||||
self.dist_y = dist_gg
|
||||
phi_alpha = self.dist_to_relax(self.time_points, self.dist_tau, self.dist_y).real
|
||||
epp = delta_eps*2*pi*x*filon(2*pi*x, self.time_points, phi_alpha )
|
||||
self.step_signal.emit(list(p))
|
||||
return epp
|
||||
|
||||
|
||||
def show_correlations(cov, ax):
|
||||
cor = zeros(cov.shape)
|
||||
for i in range(cor.shape[0]):
|
||||
for j in range(cor.shape[1]):
|
||||
if cov[i,i] == 0 or cov[j,j]==0:
|
||||
cor[i,j] = 0
|
||||
else:
|
||||
cor[i,j] = cov[i,j]/sqrt(cov[i,i]*cov[j,j])
|
||||
ax.matshow(abs(cor), cmap=cm.RdYlGn)
|
||||
ax.colorbar()
|
591
src/qds.py
Executable file
@ -0,0 +1,591 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- encoding: utf-8 -*-
|
||||
import fileio.gracedriver
|
||||
|
||||
_author_ = "Markus Rosenstihl"
|
||||
|
||||
import hashlib, uuid
|
||||
import time
|
||||
import os, sys, re, signal
|
||||
|
||||
import matplotlib
|
||||
|
||||
matplotlib.use('agg')
|
||||
|
||||
from matplotlib import pyplot
|
||||
from matplotlib.colors import hex2color
|
||||
# matplotlib.rc_file("default.mplrc")
|
||||
|
||||
|
||||
from PyQt4.QtCore import *
|
||||
from PyQt4.QtGui import *
|
||||
|
||||
import numpy as np
|
||||
import pyqtgraph as pg
|
||||
|
||||
from data.Container import Conductivity, PowerComplex, Static, Peak, YAFF
|
||||
from gui.container_widgets import ParameterWidget
|
||||
from ui import QDSMain
|
||||
|
||||
from libmath.BDSlib import FunctionRegister, FitRoutine
|
||||
from data.experimental import Data
|
||||
from gui import ExtraDifferentialWidget
|
||||
|
||||
from fileio import bds_file_reader
|
||||
|
||||
|
||||
class AppWindow(QMainWindow):
|
||||
def __init__( self, files=[], parent=None ):
|
||||
super(AppWindow, self).__init__(parent)
|
||||
self.ui = QDSMain.Ui_MainWindow()
|
||||
self.ui.setupUi(self)
|
||||
self._file_paths = self._sortInputFiles(files)
|
||||
self._last_written_header = None
|
||||
|
||||
# create action group
|
||||
actions = {
|
||||
self.ui.actionAdd_Peak: True,
|
||||
self.ui.actionAdd_Cond: True,
|
||||
self.ui.actionAdd_PowerLaw: True,
|
||||
self.ui.actionAdd_Eps_Infty: True,
|
||||
self.ui.actionYAFF: True,
|
||||
}
|
||||
|
||||
self.myActionGroup = QActionGroup(self)
|
||||
for a in actions.keys(): self.myActionGroup.addAction(a)
|
||||
|
||||
self._init_menu()
|
||||
|
||||
self.function_registry = FunctionRegister()
|
||||
self.session_id = uuid.uuid4()
|
||||
self.peakId = 0
|
||||
|
||||
self.parameterWidget = ParameterWidget()
|
||||
self.ui.dockWidget_3.setWidget(self.parameterWidget)
|
||||
|
||||
self.data = Data()
|
||||
|
||||
self.fit_boundary_imag = pg.LinearRegionItem(brush=QColor(0, 127, 254, 15))
|
||||
self.fit_boundary_real = pg.LinearRegionItem(brush=QColor(0, 127, 254, 15))
|
||||
|
||||
self.ui.pgPlotWidget_imag.addItem(self.data.experimental_curve_imag)
|
||||
self.ui.pgPlotWidget_real.addItem(self.data.experimental_curve_real)
|
||||
self.ui.pgPlotWidget_imag.addItem(self.data.model_curve_imag)
|
||||
self.ui.pgPlotWidget_real.addItem(self.data.model_curve_real)
|
||||
|
||||
self.ui.pgPlotWidget_imag.addItem(self.fit_boundary_imag)
|
||||
self.ui.pgPlotWidget_real.addItem(self.fit_boundary_real)
|
||||
|
||||
# fit boundary signals
|
||||
self.fit_boundary_imag.sigRegionChanged.connect(self._update_fit_boundary_imag)
|
||||
self.fit_boundary_imag.sigRegionChangeFinished.connect(self.update_plot)
|
||||
self.fit_boundary_real.sigRegionChanged.connect(self._update_fit_boundary_real)
|
||||
self.fit_boundary_real.sigRegionChangeFinished.connect(self.update_plot)
|
||||
|
||||
for pltwidgt in (self.ui.pgPlotWidget_real, self.ui.pgPlotWidget_imag):
|
||||
pltwidgt.setLogMode(x=True, y=True)
|
||||
pltwidgt.showGrid(x=True, y=True)
|
||||
pltwidgt.disableAutoRange()
|
||||
pltwidgt.setLabel("bottom", "Frequency", units="Hz")
|
||||
|
||||
self.ui.pgPlotWidget_imag.setLabel("left", u'Dielectric loss ε"', units="Debye")
|
||||
self.ui.pgPlotWidget_real.setLabel("left", u"Dielectric loss ε' ", units="Debye")
|
||||
|
||||
sc_real = self.ui.pgPlotWidget_real.scene()
|
||||
sc_real.sigMouseClicked.connect(self.mousePress)
|
||||
sc_real.sigMouseMoved.connect(self.updateCrosshair)
|
||||
|
||||
sc_imag = self.ui.pgPlotWidget_imag.scene()
|
||||
sc_imag.sigMouseClicked.connect(self.mousePress)
|
||||
sc_imag.sigMouseMoved.connect(self.updateCrosshair)
|
||||
|
||||
self._fit_thread = QThread()
|
||||
self._fit_method = FitRoutine()
|
||||
self._fit_method.moveToThread(self._fit_thread)
|
||||
self._fit_method.finished_fit.connect(self.fitData_update)
|
||||
self._fit_method.data_ready.connect(self.updateIntermediatePlot)
|
||||
self._fit_thread.started.connect(self._fit_method.fit)
|
||||
|
||||
|
||||
# finally process cmd line args
|
||||
if files != []:
|
||||
self.openFile(unicode(self._file_paths[0]))
|
||||
self._current_file_index = 0
|
||||
|
||||
def _init_menu( self ):
|
||||
fileMenu = self.menuBar().addMenu("File")
|
||||
|
||||
openFile = QAction("&Open", self)
|
||||
openFile.setShortcut(QKeySequence.Open)
|
||||
openFile.triggered.connect(self.getFileNames)
|
||||
fileMenu.addAction(openFile)
|
||||
|
||||
nextFile = QAction("Next", self)
|
||||
nextFile.setShortcut(QKeySequence("Ctrl+k"))
|
||||
nextFile.triggered.connect(self.nextFile)
|
||||
fileMenu.addAction(nextFile)
|
||||
|
||||
previousFile = QAction("Previous", self)
|
||||
previousFile.setShortcut(QKeySequence("Ctrl+j"))
|
||||
previousFile.triggered.connect(self.previousFile)
|
||||
fileMenu.addAction(previousFile)
|
||||
|
||||
saveFile = QAction("&Save Fit Result (Data)", self)
|
||||
saveFile.setShortcut(QKeySequence.Save)
|
||||
saveFile.triggered.connect(self.saveFitResult)
|
||||
fileMenu.addAction(saveFile)
|
||||
|
||||
self.ui.actionSave_FitResult.triggered.connect(lambda: self._saveFitFigure(mode="w"))
|
||||
self.ui.actionAppend_Fit.triggered.connect(lambda: self._saveFitFigure(mode="a"))
|
||||
|
||||
# fitting methods
|
||||
fitMenu = self.menuBar().addMenu("Standard Fits")
|
||||
# lm
|
||||
fit_lmAction = QAction("Complex NLS", self)
|
||||
fit_lmAction.setShortcut(QKeySequence("Ctrl+F"))
|
||||
fitMenu.addAction(fit_lmAction)
|
||||
# lbfgsb
|
||||
fit_lbfgsbAction = QAction("NLS (Imag.)", self)
|
||||
fitMenu.addAction(fit_lbfgsbAction)
|
||||
# Simulated Annealing
|
||||
fit_annealAction = QAction("&Simulated Annealing", self)
|
||||
fitMenu.addAction(fit_annealAction)
|
||||
|
||||
self.ui.actionActionAbortFit.triggered.connect(self.abortFit)
|
||||
|
||||
self.signalMapper = QSignalMapper(self)
|
||||
for i, fit_action in enumerate([fit_lmAction, fit_lbfgsbAction, fit_annealAction
|
||||
]):
|
||||
self.signalMapper.setMapping(fit_action, i)
|
||||
fit_action.triggered.connect(self.signalMapper.map)
|
||||
self.signalMapper.mapped.connect(self.fitData_start)
|
||||
|
||||
self.ui.actionShow_Derivative.triggered.connect(self.show_derivative)
|
||||
|
||||
self.ui.menuConfiguration.triggered.connect(self.conf)
|
||||
|
||||
def conf(self):
|
||||
pass
|
||||
|
||||
def show_derivative( self ):
|
||||
self.xtra_wdgt = ExtraDifferentialWidget.DifferentialWidget()
|
||||
#self.xtra_wdgt.set
|
||||
deriv_r = np.diff(np.log10(self.data.epsilon.real))
|
||||
deriv_i = np.diff(np.log10(self.data.epsilon.imag))*0
|
||||
deriv_i = -np.pi/2*np.diff(np.log10(self.data.epsilon.real))/np.diff(np.log10(self.data.frequency))
|
||||
self.xtra_wdgt.plot(self.data.frequency[:-1], deriv_r, deriv_i)
|
||||
# self.xtra_wdgt.plot([0,1], [0,1], [0,1])
|
||||
self.xtra_wdgt.setGeometry(self.ui.pgPlotWidget_real.geometry())
|
||||
self.xtra_wdgt.show()
|
||||
#self.xtra_wdgt.showCenterd()
|
||||
self.xtra_wdgt.raise_()
|
||||
|
||||
|
||||
def updateCrosshair( self, evt ):
|
||||
|
||||
vb_real = self.ui.pgPlotWidget_real.getPlotItem().vb
|
||||
vb_imag = self.ui.pgPlotWidget_imag.getPlotItem().vb
|
||||
if self.ui.pgPlotWidget_imag.underMouse():
|
||||
pos = vb_imag.mapSceneToView(evt)
|
||||
elif self.ui.pgPlotWidget_real.underMouse():
|
||||
pos = vb_real.mapSceneToView(evt)
|
||||
else:
|
||||
pos = QPointF(0.0, 0.0)
|
||||
self.last_pos = pos
|
||||
|
||||
def mousePress( self, evt ):
|
||||
data_pos = self.last_pos
|
||||
mouse_in_imag = self.ui.pgPlotWidget_imag.underMouse()
|
||||
mouse_in_real = self.ui.pgPlotWidget_real.underMouse()
|
||||
msgBox = QMessageBox()
|
||||
|
||||
if self.ui.actionAdd_Peak.isChecked():
|
||||
if mouse_in_imag:
|
||||
id_list = [key.id_num for key in
|
||||
self.function_registry.get_registered_functions()
|
||||
if key.id_string == 'hn']
|
||||
self.peakId = 1
|
||||
while self.peakId in id_list:
|
||||
self.peakId += 1
|
||||
_pk = self.addContainer(Peak, data_pos)
|
||||
_pk.set_id(self.peakId)
|
||||
# self.addPeak(data_pos)
|
||||
self.ui.actionAdd_Peak.setChecked(False)
|
||||
else:
|
||||
msgBox.setText("Click in imaginary part")
|
||||
msgBox.exec_()
|
||||
|
||||
if self.ui.actionAdd_Cond.isChecked():
|
||||
if mouse_in_imag:
|
||||
self.addContainer(Conductivity, data_pos)
|
||||
self.ui.actionAdd_Cond.setChecked(False)
|
||||
else:
|
||||
msgBox.setText("Click in imaginary part")
|
||||
msgBox.exec_()
|
||||
|
||||
if self.ui.actionYAFF.isChecked():
|
||||
if mouse_in_imag:
|
||||
self.addContainer(YAFF, data_pos)
|
||||
self.ui.actionYAFF.setChecked(False)
|
||||
else:
|
||||
msgBox.setText("Click in imaginary part")
|
||||
msgBox.exec_()
|
||||
|
||||
if self.ui.actionAdd_PowerLaw.isChecked():
|
||||
if mouse_in_imag:
|
||||
self.addContainer(PowerComplex, data_pos)
|
||||
self.ui.actionAdd_PowerLaw.setChecked(False)
|
||||
else:
|
||||
msgBox.setText("Click in imaginary part")
|
||||
msgBox.exec_()
|
||||
|
||||
if self.ui.actionAdd_Eps_Infty.isChecked():
|
||||
if mouse_in_real:
|
||||
self.addContainer(Static, data_pos)
|
||||
self.ui.actionAdd_Eps_Infty.setChecked(False)
|
||||
else:
|
||||
msgBox.setText("Click in real part")
|
||||
msgBox.exec_()
|
||||
|
||||
def abortFit( self ):
|
||||
for container in self.function_registry.get_registered_functions():
|
||||
container.abort(True)
|
||||
self._fit_thread.terminate()
|
||||
|
||||
def saveFitResult( self ):
|
||||
"""
|
||||
Saving fit parameters to fitresults.log
|
||||
including temperature
|
||||
"""
|
||||
self._saveFitFigure()
|
||||
if not os.path.exists("fitresults.log"):
|
||||
f = open("fitresults.log", "w")
|
||||
else:
|
||||
f = open("fitresults.log", "a")
|
||||
|
||||
# prepare header
|
||||
file_id = hashlib.md5(open(self._file_paths[self._current_file_index]).read()).hexdigest()
|
||||
pre_header = "# Date: {date}\n".format(date=time.strftime("%Y-%m-%d"))
|
||||
pre_header += "# Time: {time}\n# SessionID={id}\n".format(time=time.strftime("%H:%M:%S"), id=self.session_id)
|
||||
pars = []
|
||||
base_filename, file_ext = os.path.splitext(self.filepath)
|
||||
header = "{n1:13}{n2:13}".format(n1="# 0:T", n2="1:1000/T")
|
||||
varnum = 2 # T, invT are the first two columns
|
||||
|
||||
for i_fcn, fcn in enumerate(self.function_registry.get_registered_functions()):
|
||||
fit_function_name = fcn.id_string
|
||||
for i, name in enumerate(fcn.widget.names): # get variable names
|
||||
header += "{n:13}{n_sd:13}".format(n="%i:%s"%(varnum, name), n_sd="%i:%s_sd"%(varnum+1, name))
|
||||
varnum += 2
|
||||
pre_header += "# %s\n"%fit_function_name
|
||||
# write for each function an extra file
|
||||
fit_filename = "%s_%i.fit"%(base_filename, i_fcn)
|
||||
f_fcn = open(fit_filename, 'w')
|
||||
# retrieve correct function type peak
|
||||
#if fit_function_name == "hn":
|
||||
f_fcn.write("# type=%s\n"%fcn.widget.func_type)
|
||||
f_fcn.write("# SourceID=%s\n"%file_id)
|
||||
#else:
|
||||
# f_fcn.write("# type=%s\n"%fit_function_name)
|
||||
for i, par in enumerate(fcn._beta): # params # TODO: ughh
|
||||
if fcn._selector_mask is not None:
|
||||
if fcn._selector_mask[i]:
|
||||
pars.extend([par])
|
||||
pars.extend([fcn._sd_beta[i]])
|
||||
f_fcn.write('# param=%s %e %e\n'%(fcn.widget.names[i], par, fcn._sd_beta[i]))
|
||||
else:
|
||||
pars.extend([par])
|
||||
pars.extend([fcn._sd_beta[i]])
|
||||
f_fcn.write('# param=%s %e %e\n'%(fcn.widget.names[i], par, fcn._sd_beta[i]))
|
||||
|
||||
# finish writing fit function file
|
||||
f_fcn.flush()
|
||||
np.savetxt(f_fcn, fcn.resampleData(self.data.frequency))
|
||||
f_fcn.close()
|
||||
|
||||
# append fit limits header
|
||||
header += "%-13s%-13s\n"%("fit_xlow", "fit_xhigh")
|
||||
|
||||
# write new header if fit model changed TODO: more robust detection
|
||||
if self._last_written_header != header:
|
||||
f.write(pre_header)
|
||||
f.write(header)
|
||||
f.flush()
|
||||
self._last_written_header = header
|
||||
else:
|
||||
pass
|
||||
|
||||
pars.insert(0, self.data.meta["T"])
|
||||
pars.insert(1, 1e3/self.data.meta["T"])
|
||||
pars.append(self.data.fit_limits[0])
|
||||
pars.append(self.data.fit_limits[1])
|
||||
pars = np.array([pars])
|
||||
np.savetxt(f, pars, fmt='%-12.3e', delimiter=" ")
|
||||
f.close()
|
||||
|
||||
def _saveFitFigure( self , mode="w"):
|
||||
fig = pyplot.figure(figsize=(3.54*1.4, 2.75*1.4))
|
||||
|
||||
font = { 'family': 'sans serif',
|
||||
'weight': 'normal',
|
||||
'size': 9 }
|
||||
|
||||
matplotlib.rc('font', **font)
|
||||
pyplot.grid(linestyle="solid", alpha=0.3, color="0.5")
|
||||
|
||||
pyplot.loglog(self.data.frequency, self.data.epsilon.imag, 'bo', markersize=4, label="Data")
|
||||
pyplot.loglog(self.data.frequency_fit, self.data.epsilon_fit.imag, 'r-', lw=1.2, label="Fit")
|
||||
|
||||
for fcn in self.function_registry.get_registered_functions():
|
||||
f, eps = fcn.get_data()
|
||||
label = fcn.id_label
|
||||
color = hex2color(str(fcn.color.name()))
|
||||
pyplot.loglog(f, eps[1], ls=":", color=color, lw=1, dashes=(1, 1), label=label)
|
||||
|
||||
for i in (0, 1): pyplot.axvline(x=self.data.fit_limits[i], color='b', ls="-", lw=0.5)
|
||||
pyplot.legend(title="T=%.1f K"%(self.data.meta["T"]))
|
||||
pyplot.xlabel('f/Hz')
|
||||
pyplot.ylabel(u'ε"')
|
||||
pyplot.ylim(self.data.epsilon.imag.min(), self.data.epsilon.imag.max())
|
||||
#pyplot.savefig(os.path.splitext(self.filepath)[0]+".png")
|
||||
pyplot.savefig(os.path.splitext(self.filepath)[0]+".pdf")
|
||||
fig.clear()
|
||||
del (fig)
|
||||
self._saveFitFigureGrace(mode)
|
||||
|
||||
def _saveFitFigureGrace(self, mode="w"):
|
||||
fname = os.path.splitext(self.filepath)[0] + ".agr"
|
||||
if mode == "w":
|
||||
self.grace_plot = fileio.gracedriver.GracePlot(fname)
|
||||
elif mode == "a":
|
||||
# FIXME: very ugly hack, should be global variable?
|
||||
# Check if self.grace_plot attribute exists
|
||||
try:
|
||||
self.grace_plot is not None
|
||||
except AttributeError:
|
||||
self.grace_plot = fileio.gracedriver.GracePlot(fname)
|
||||
|
||||
self.grace_plot.loglog(self.data.frequency, self.data.epsilon.imag, sym='o', ls="-", label="Data")
|
||||
self.grace_plot.loglog(self.data.frequency_fit, self.data.epsilon_fit.imag, sym=None, ls="-", label="Fit")
|
||||
|
||||
# loop over functions and add data to plot
|
||||
for fcn in self.function_registry.get_registered_functions():
|
||||
f, eps = fcn.get_data()
|
||||
label = fcn.id_label
|
||||
color = hex2color(str(fcn.color.name()))
|
||||
self.grace_plot.loglog(f, eps[1], ls=":", color=color, sym=None, label=label)
|
||||
# vertical lines (fit limits)
|
||||
#for i in (0, 1): pyplot.axvline(x=self.data.fit_limits[i], color='b', ls="-", lw=0.5)
|
||||
self.grace_plot.legend(True)
|
||||
self.grace_plot.xlabel("f / Hz")
|
||||
self.grace_plot.ylabel("eps")
|
||||
print self.grace_plot.cmds
|
||||
self.grace_plot.save()
|
||||
|
||||
|
||||
def addContainer(self, selected_container, pos):
|
||||
_cont = selected_container(plt_real=self.ui.pgPlotWidget_real,
|
||||
plt_imag=self.ui.pgPlotWidget_imag,
|
||||
limits=self.data.fit_limits)
|
||||
_cont.blockSignals(True)
|
||||
_cont.changedData.connect(self.update_plot)
|
||||
_cont.removeObj.connect(self.delParamterObject)
|
||||
_cont.start_parameter(pos)
|
||||
self.parameterWidget.add(_cont.widget)
|
||||
self.function_registry.register_function(_cont)
|
||||
self.update_plot()
|
||||
_cont.blockSignals(False)
|
||||
return _cont
|
||||
|
||||
def delParamterObject( self, obj ):
|
||||
self.function_registry.unregister_function(obj)
|
||||
self.update_plot()
|
||||
|
||||
def fitData_start( self, method ):
|
||||
#fit_methods = [fit_odr_cmplx, fit_odr_imag, fit_lbfgsb, fit_anneal]
|
||||
self.fit_boundary_real.hide()
|
||||
self.fit_boundary_imag.hide()
|
||||
fit_method = [
|
||||
self._fit_method.fit_odr_cmplx,
|
||||
self._fit_method.fit_odr_imag,
|
||||
][method]
|
||||
|
||||
# build function list
|
||||
p0, funcs, fixed_params = [], [], []
|
||||
for fcn in self.function_registry.get_registered_functions():
|
||||
p0.extend(fcn.get_parameter())
|
||||
funcs.append(fcn)
|
||||
fixed_params.extend(fcn.get_fixed())
|
||||
fcn.clear_data()
|
||||
_freq, _fit = self.data.get_data()
|
||||
|
||||
if not self._fit_thread.isRunning():
|
||||
#self._fit_method.fit_odr_cmplx(_freq, _fit, p0, fixed_params, funcs)
|
||||
fit_method(_freq, _fit, p0, fixed_params, funcs)
|
||||
self._fit_thread.start()
|
||||
self.ui.statusbar.showMessage("Fitting ...")
|
||||
else:
|
||||
self.ui.statusbar.showMessage("Still fitting ...")
|
||||
|
||||
def fitData_update( self ):
|
||||
self._fit_thread.quit()
|
||||
odr_result = self._fit_method.result()
|
||||
p0, funcs, fixed_params = [], [], []
|
||||
for fcn in self.function_registry.get_registered_functions():
|
||||
p0.extend(fcn.get_parameter())
|
||||
funcs.append(fcn)
|
||||
fixed_params.extend(fcn.get_fixed())
|
||||
|
||||
for container in self.function_registry.get_registered_functions():
|
||||
container.abort(False)
|
||||
|
||||
self.data.set_fit(odr_result.beta, funcs)
|
||||
self.ui.statusbar.showMessage(" ".join(odr_result.stopreason))
|
||||
ndx = 0
|
||||
for i, fcn in enumerate(self.function_registry.get_registered_functions()):
|
||||
num_p = len(fcn.get_parameter())
|
||||
beta = odr_result.beta[ndx:num_p+ndx]
|
||||
if odr_result.sd_beta is not None:
|
||||
sd_beta = odr_result.sd_beta[ndx:num_p+ndx]
|
||||
else:
|
||||
sd_beta = None
|
||||
fcn.set_parameter(beta, sd_beta)
|
||||
ndx += num_p
|
||||
|
||||
self.fit_boundary_real.show()
|
||||
self.fit_boundary_imag.show()
|
||||
|
||||
def getFileNames( self ):
|
||||
tmp = QFileDialog.getOpenFileNames(self, "Open file", "", '*.dat *.TXT')
|
||||
if len(tmp) != 0:
|
||||
self._file_paths = tmp
|
||||
self._current_file_index = 0
|
||||
path = unicode(self._file_paths[self._current_file_index])
|
||||
self.openFile(path)
|
||||
|
||||
def nextFile( self ):
|
||||
lim = self.fit_boundary_imag.getRegion() # store limits
|
||||
if len(self._file_paths) > self._current_file_index+1: # wrap around
|
||||
self._current_file_index += 1
|
||||
else:
|
||||
self._current_file_index = 0
|
||||
path = unicode(self._file_paths[self._current_file_index])
|
||||
self.openFile(path)
|
||||
self.fit_boundary_imag.setRegion(lim)
|
||||
|
||||
def previousFile( self ):
|
||||
lim = self.fit_boundary_imag.getRegion() # store limits
|
||||
if self._current_file_index == 0: # wrap around
|
||||
self._current_file_index = len(self._file_paths)-1
|
||||
else:
|
||||
self._current_file_index -= 1
|
||||
path = unicode(self._file_paths[self._current_file_index])
|
||||
self.openFile(path)
|
||||
self.fit_boundary_imag.setRegion(lim)
|
||||
|
||||
def _sortInputFiles( self, files ):
|
||||
return QStringList(sorted(files, key=lambda x: re.findall("\d+\.\d+K", x)))
|
||||
|
||||
|
||||
def openFile( self, path ):
|
||||
print "opening: %s"%path
|
||||
self.filepath = path
|
||||
Temp, _die_loss, _die_stor, _freq = bds_file_reader.FileReader.read_datafile(path)
|
||||
|
||||
self.setWindowTitle("%s - %.2f K"%(os.path.basename(path), Temp))
|
||||
|
||||
self.data.set_data(_freq, _die_stor, _die_loss)
|
||||
self.data.meta["T"] = Temp
|
||||
self.fit_boundary_imag.setRegion([np.log10(_freq.min()), np.log10(_freq.max())])
|
||||
self.ui.pgPlotWidget_imag.disableAutoRange()
|
||||
self.ui.pgPlotWidget_real.disableAutoRange()
|
||||
|
||||
self.ui.pgPlotWidget_imag.setXRange(np.log10(_freq.min()), np.log10(_freq.max()))
|
||||
self.ui.pgPlotWidget_imag.setYRange(np.log10(_die_loss.min()), np.log10(_die_loss.max()))
|
||||
|
||||
self.ui.pgPlotWidget_real.setXRange(np.log10(_freq.min()), np.log10(_freq.max()))
|
||||
self.ui.pgPlotWidget_real.setYRange(np.log10(_die_stor.min()), np.log10(_die_stor.max()))
|
||||
|
||||
|
||||
#self.ui.pgPlotWidget_real.setRange(xRange=(_freq.min(), _freq.max()),
|
||||
# yRange=(_die_stor.min(), _die_stor.max()) )
|
||||
self.update_plot()
|
||||
|
||||
|
||||
def update_plot( self ):
|
||||
print "redrawing plot", self.sender()
|
||||
log10fmin, log10fmax = self.fit_boundary_imag.getRegion()
|
||||
self.data.set_fit_xlimits(10**log10fmin, 10**log10fmax)
|
||||
|
||||
p0, funcs = [], []
|
||||
for fcn in self.function_registry.get_registered_functions():
|
||||
p0.extend(fcn.get_parameter())
|
||||
funcs.append(fcn)
|
||||
|
||||
|
||||
# calculate parametrized curve
|
||||
self.data.set_fit(p0, funcs)
|
||||
|
||||
|
||||
# replot data and fit, TODO: replot only if measurement data changed
|
||||
self.data.experimental_curve_real.setData(self.data.frequency, self.data.epsilon.real)
|
||||
self.data.experimental_curve_imag.setData(self.data.frequency, self.data.epsilon.imag)
|
||||
#print "updatePlot: ",self.data.frequency_fit, self.data.epsilon_fit
|
||||
if len(funcs) > 0:
|
||||
#print "funcs > 0:",self.data.frequency_fit, self.data.epsilon_fit
|
||||
self.data.model_curve_real.setData(x=self.data.frequency_fit, y=self.data.epsilon_fit.real)
|
||||
self.data.model_curve_imag.setData(x=self.data.frequency_fit, y=self.data.epsilon_fit.imag)
|
||||
else:
|
||||
self.data.model_curve_real.setData(x=np.array([np.nan]), y=np.array([np.nan]))
|
||||
self.data.model_curve_imag.setData(x=np.array([np.nan]), y=np.array([np.nan]))
|
||||
|
||||
|
||||
def updateIntermediatePlot( self, freq, intermediate_data ):
|
||||
self.data.model_curve_real.setData(freq, intermediate_data[0])
|
||||
self.data.model_curve_imag.setData(freq, intermediate_data[1])
|
||||
|
||||
def _update_fit_boundary_imag( self ):
|
||||
"""
|
||||
Update real region when with imag reagion
|
||||
"""
|
||||
self.fit_boundary_real.setRegion(self.fit_boundary_imag.getRegion())
|
||||
self._update_fit_boundary()
|
||||
|
||||
def _update_fit_boundary_real( self ):
|
||||
"""
|
||||
Update imag region when with real reagion
|
||||
"""
|
||||
self.fit_boundary_imag.setRegion(self.fit_boundary_real.getRegion())
|
||||
self._update_fit_boundary()
|
||||
|
||||
def _update_fit_boundary( self ):
|
||||
"""
|
||||
Update limits in container.
|
||||
"""
|
||||
for container in self.function_registry.get_registered_functions():
|
||||
lims = [10**i for i in self.fit_boundary_real.getRegion()]
|
||||
container.set_limits(lims)
|
||||
|
||||
|
||||
def sigint_handler( *args ):
|
||||
"""
|
||||
Handler for the SIGINT signal (CTRL + C).
|
||||
"""
|
||||
sys.stderr.write('\r')
|
||||
if QMessageBox.question(None, '', "Are you sure you want to quit?",
|
||||
QMessageBox.Yes | QMessageBox.No,
|
||||
QMessageBox.Yes) == QMessageBox.Yes:
|
||||
QApplication.quit()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
signal.signal(signal.SIGINT, sigint_handler)
|
||||
files = sys.argv[1:]
|
||||
app = QApplication(sys.argv)
|
||||
timer = QTimer()
|
||||
timer.start(1000) # Check every second for Strg-c on Cmd line
|
||||
timer.timeout.connect(lambda: None)
|
||||
main = AppWindow(files=files)
|
||||
main.showMaximized()
|
||||
main.raise_()
|
||||
sys.exit(app.exec_())
|
153
src/ui/ConductivityGroupBox.py
Normal file
@ -0,0 +1,153 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Form implementation generated from reading ui file 'ui/ConductivityGroupBox.ui'
|
||||
#
|
||||
# Created: Tue Dec 16 15:06:22 2014
|
||||
# by: PyQt4 UI code generator 4.11.3
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
try:
|
||||
_fromUtf8 = QtCore.QString.fromUtf8
|
||||
except AttributeError:
|
||||
def _fromUtf8(s):
|
||||
return s
|
||||
|
||||
try:
|
||||
_encoding = QtGui.QApplication.UnicodeUTF8
|
||||
def _translate(context, text, disambig):
|
||||
return QtGui.QApplication.translate(context, text, disambig, _encoding)
|
||||
except AttributeError:
|
||||
def _translate(context, text, disambig):
|
||||
return QtGui.QApplication.translate(context, text, disambig)
|
||||
|
||||
class Ui_ConductivityGroupBox(object):
|
||||
def setupUi(self, ConductivityGroupBox):
|
||||
ConductivityGroupBox.setObjectName(_fromUtf8("ConductivityGroupBox"))
|
||||
ConductivityGroupBox.resize(253, 158)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(ConductivityGroupBox.sizePolicy().hasHeightForWidth())
|
||||
ConductivityGroupBox.setSizePolicy(sizePolicy)
|
||||
ConductivityGroupBox.setMinimumSize(QtCore.QSize(0, 0))
|
||||
self.gridLayout_2 = QtGui.QGridLayout(ConductivityGroupBox)
|
||||
self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2"))
|
||||
self.gridLayout = QtGui.QGridLayout()
|
||||
self.gridLayout.setSizeConstraint(QtGui.QLayout.SetFixedSize)
|
||||
self.gridLayout.setSpacing(1)
|
||||
self.gridLayout.setContentsMargins(0, 0, -1, -1)
|
||||
self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
|
||||
self.pwrSigma_sd = QtGui.QLabel(ConductivityGroupBox)
|
||||
self.pwrSigma_sd.setObjectName(_fromUtf8("pwrSigma_sd"))
|
||||
self.gridLayout.addWidget(self.pwrSigma_sd, 3, 2, 1, 1)
|
||||
self.checkBox_2 = QtGui.QCheckBox(ConductivityGroupBox)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.checkBox_2.sizePolicy().hasHeightForWidth())
|
||||
self.checkBox_2.setSizePolicy(sizePolicy)
|
||||
self.checkBox_2.setText(_fromUtf8(""))
|
||||
self.checkBox_2.setObjectName(_fromUtf8("checkBox_2"))
|
||||
self.gridLayout.addWidget(self.checkBox_2, 2, 3, 1, 1, QtCore.Qt.AlignHCenter)
|
||||
self.checkBox_3 = QtGui.QCheckBox(ConductivityGroupBox)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.checkBox_3.sizePolicy().hasHeightForWidth())
|
||||
self.checkBox_3.setSizePolicy(sizePolicy)
|
||||
self.checkBox_3.setText(_fromUtf8(""))
|
||||
self.checkBox_3.setChecked(True)
|
||||
self.checkBox_3.setObjectName(_fromUtf8("checkBox_3"))
|
||||
self.gridLayout.addWidget(self.checkBox_3, 3, 3, 1, 1, QtCore.Qt.AlignHCenter|QtCore.Qt.AlignVCenter)
|
||||
self.label_2 = QtGui.QLabel(ConductivityGroupBox)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.label_2.sizePolicy().hasHeightForWidth())
|
||||
self.label_2.setSizePolicy(sizePolicy)
|
||||
self.label_2.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.label_2.setObjectName(_fromUtf8("label_2"))
|
||||
self.gridLayout.addWidget(self.label_2, 2, 0, 1, 1)
|
||||
self.label = QtGui.QLabel(ConductivityGroupBox)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth())
|
||||
self.label.setSizePolicy(sizePolicy)
|
||||
self.label.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.label.setObjectName(_fromUtf8("label"))
|
||||
self.gridLayout.addWidget(self.label, 0, 3, 1, 1)
|
||||
self.removeButton = QtGui.QPushButton(ConductivityGroupBox)
|
||||
self.removeButton.setObjectName(_fromUtf8("removeButton"))
|
||||
self.gridLayout.addWidget(self.removeButton, 0, 1, 1, 1)
|
||||
self.label_4 = QtGui.QLabel(ConductivityGroupBox)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.label_4.sizePolicy().hasHeightForWidth())
|
||||
self.label_4.setSizePolicy(sizePolicy)
|
||||
self.label_4.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.label_4.setObjectName(_fromUtf8("label_4"))
|
||||
self.gridLayout.addWidget(self.label_4, 3, 0, 1, 1)
|
||||
self.rSigma_sd = QtGui.QLabel(ConductivityGroupBox)
|
||||
self.rSigma_sd.setObjectName(_fromUtf8("rSigma_sd"))
|
||||
self.gridLayout.addWidget(self.rSigma_sd, 2, 2, 1, 1)
|
||||
self.pwrSigma = QtGui.QDoubleSpinBox(ConductivityGroupBox)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.pwrSigma.sizePolicy().hasHeightForWidth())
|
||||
self.pwrSigma.setSizePolicy(sizePolicy)
|
||||
self.pwrSigma.setSingleStep(0.05)
|
||||
self.pwrSigma.setProperty("value", 1.0)
|
||||
self.pwrSigma.setObjectName(_fromUtf8("pwrSigma"))
|
||||
self.gridLayout.addWidget(self.pwrSigma, 3, 1, 1, 1)
|
||||
self.rSigma = QtGui.QDoubleSpinBox(ConductivityGroupBox)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.rSigma.sizePolicy().hasHeightForWidth())
|
||||
self.rSigma.setSizePolicy(sizePolicy)
|
||||
self.rSigma.setObjectName(_fromUtf8("rSigma"))
|
||||
self.gridLayout.addWidget(self.rSigma, 2, 1, 1, 1)
|
||||
self.pushButton_hide = QtGui.QPushButton(ConductivityGroupBox)
|
||||
self.pushButton_hide.setCheckable(True)
|
||||
self.pushButton_hide.setObjectName(_fromUtf8("pushButton_hide"))
|
||||
self.gridLayout.addWidget(self.pushButton_hide, 0, 2, 1, 1)
|
||||
self.label_3 = QtGui.QLabel(ConductivityGroupBox)
|
||||
self.label_3.setObjectName(_fromUtf8("label_3"))
|
||||
self.gridLayout.addWidget(self.label_3, 1, 0, 1, 1, QtCore.Qt.AlignHCenter)
|
||||
self.iSigma = QtGui.QDoubleSpinBox(ConductivityGroupBox)
|
||||
self.iSigma.setObjectName(_fromUtf8("iSigma"))
|
||||
self.gridLayout.addWidget(self.iSigma, 1, 1, 1, 1)
|
||||
self.iSigma_sd = QtGui.QLabel(ConductivityGroupBox)
|
||||
self.iSigma_sd.setObjectName(_fromUtf8("iSigma_sd"))
|
||||
self.gridLayout.addWidget(self.iSigma_sd, 1, 2, 1, 1)
|
||||
self.checkBox_1 = QtGui.QCheckBox(ConductivityGroupBox)
|
||||
self.checkBox_1.setText(_fromUtf8(""))
|
||||
self.checkBox_1.setObjectName(_fromUtf8("checkBox_1"))
|
||||
self.gridLayout.addWidget(self.checkBox_1, 1, 3, 1, 1, QtCore.Qt.AlignHCenter)
|
||||
self.gridLayout_2.addLayout(self.gridLayout, 0, 0, 1, 1)
|
||||
|
||||
self.retranslateUi(ConductivityGroupBox)
|
||||
QtCore.QObject.connect(self.removeButton, QtCore.SIGNAL(_fromUtf8("clicked()")), ConductivityGroupBox.hide)
|
||||
QtCore.QMetaObject.connectSlotsByName(ConductivityGroupBox)
|
||||
|
||||
def retranslateUi(self, ConductivityGroupBox):
|
||||
ConductivityGroupBox.setWindowTitle(_translate("ConductivityGroupBox", "GroupBox", None))
|
||||
ConductivityGroupBox.setTitle(_translate("ConductivityGroupBox", "Conductivity", None))
|
||||
self.pwrSigma_sd.setText(_translate("ConductivityGroupBox", "TextLabel", None))
|
||||
self.label_2.setText(_translate("ConductivityGroupBox", "<html><head/><body><p>σ\'<span style=\" vertical-align:sub;\">(DC)</span></p></body></html>", None))
|
||||
self.label.setText(_translate("ConductivityGroupBox", "Fix", None))
|
||||
self.removeButton.setText(_translate("ConductivityGroupBox", "Remove", None))
|
||||
self.label_4.setText(_translate("ConductivityGroupBox", "α", None))
|
||||
self.rSigma_sd.setText(_translate("ConductivityGroupBox", "TextLabel", None))
|
||||
self.rSigma.setToolTip(_translate("ConductivityGroupBox", "<html><head/><body><p>DC conductivity, should only be seen in the imaginary permitivity. If there is a Jonscher type of U<span style=\" font-style:italic;\">niversal Dielectric Response, </span>the ratio of σ"/σ\'<span style=\" vertical-align:sub;\">(DC)</span> is a constant</p></body></html>", None))
|
||||
self.pushButton_hide.setText(_translate("ConductivityGroupBox", "Hide", None))
|
||||
self.label_3.setText(_translate("ConductivityGroupBox", "<html><head/><body><p>σ"</p></body></html>", None))
|
||||
self.iSigma.setToolTip(_translate("ConductivityGroupBox", "<html><head/><body><p>If there is a Jonscher type of U<span style=\" font-style:italic;\">niversal Dielectric Response, </span>the ratio of σ"/σ\'<span style=\" vertical-align:sub;\">(DC)</span> is a constant</p></body></html>", None))
|
||||
self.iSigma_sd.setText(_translate("ConductivityGroupBox", "TextLabel", None))
|
||||
|
234
src/ui/ConductivityGroupBox.ui
Normal file
@ -0,0 +1,234 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>ConductivityGroupBox</class>
|
||||
<widget class="QGroupBox" name="ConductivityGroupBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>253</width>
|
||||
<height>158</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>GroupBox</string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Conductivity</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetFixedSize</enum>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<item row="3" column="2">
|
||||
<widget class="QLabel" name="pwrSigma_sd">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3" alignment="Qt::AlignHCenter">
|
||||
<widget class="QCheckBox" name="checkBox_2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="3" alignment="Qt::AlignHCenter|Qt::AlignVCenter">
|
||||
<widget class="QCheckBox" name="checkBox_3">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><html><head/><body><p>σ'<span style=" vertical-align:sub;">(DC)</span></p></body></html></string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Fix</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QPushButton" name="removeButton">
|
||||
<property name="text">
|
||||
<string>Remove</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>α</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QLabel" name="rSigma_sd">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QDoubleSpinBox" name="pwrSigma">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>0.050000000000000</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QDoubleSpinBox" name="rSigma">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>DC conductivity, should only be seen in the imaginary permitivity. If there is a Jonscher type of U<span style=" font-style:italic;">niversal Dielectric Response, </span>the ratio of σ&quot;/σ'<span style=" vertical-align:sub;">(DC)</span> is a constant</p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QPushButton" name="pushButton_hide">
|
||||
<property name="text">
|
||||
<string>Hide</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" alignment="Qt::AlignHCenter">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string><html><head/><body><p>σ&quot;</p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QDoubleSpinBox" name="iSigma">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>If there is a Jonscher type of U<span style=" font-style:italic;">niversal Dielectric Response, </span>the ratio of σ&quot;/σ'<span style=" vertical-align:sub;">(DC)</span> is a constant</p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLabel" name="iSigma_sd">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3" alignment="Qt::AlignHCenter">
|
||||
<widget class="QCheckBox" name="checkBox_1">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>removeButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>ConductivityGroupBox</receiver>
|
||||
<slot>hide()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>95</x>
|
||||
<y>48</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>144</x>
|
||||
<y>80</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
175
src/ui/ConfigurationOptions.ui
Normal file
@ -0,0 +1,175 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Form</class>
|
||||
<widget class="QWidget" name="Form">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>433</width>
|
||||
<height>324</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QToolBox" name="toolBox">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>409</width>
|
||||
<height>300</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="page">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>409</width>
|
||||
<height>232</height>
|
||||
</rect>
|
||||
</property>
|
||||
<attribute name="label">
|
||||
<string>Output Options</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>380</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="sizeIncrement">
|
||||
<size>
|
||||
<width>380</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>File Types</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_4">
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="checkBox">
|
||||
<property name="text">
|
||||
<string>Grace (*.agr)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QComboBox" name="comboBox">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>PDF</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>PNG</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>JPG</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>EPS</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="checkBox_3">
|
||||
<property name="text">
|
||||
<string>ASCII Table (*.dat)</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QComboBox" name="comboBox_2">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>72 dpi</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>100 dpi</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>200 dpi</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>300 dpi</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>600 dpi</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>1200 dpi</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" rowspan="2">
|
||||
<widget class="QCheckBox" name="checkBox_2">
|
||||
<property name="text">
|
||||
<string>Image (*.pdf, *.png, *.jpg, *.eps)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="page_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>409</width>
|
||||
<height>232</height>
|
||||
</rect>
|
||||
</property>
|
||||
<attribute name="label">
|
||||
<string>Input Options</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
42
src/ui/ExtraDifferential.py
Normal file
@ -0,0 +1,42 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Form implementation generated from reading ui file 'ui/ExtraDifferential.ui'
|
||||
#
|
||||
# Created: Wed Sep 24 21:21:48 2014
|
||||
# by: PyQt4 UI code generator 4.11.1
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
try:
|
||||
_fromUtf8 = QtCore.QString.fromUtf8
|
||||
except AttributeError:
|
||||
def _fromUtf8(s):
|
||||
return s
|
||||
|
||||
try:
|
||||
_encoding = QtGui.QApplication.UnicodeUTF8
|
||||
def _translate(context, text, disambig):
|
||||
return QtGui.QApplication.translate(context, text, disambig, _encoding)
|
||||
except AttributeError:
|
||||
def _translate(context, text, disambig):
|
||||
return QtGui.QApplication.translate(context, text, disambig)
|
||||
|
||||
class Ui_Form(object):
|
||||
def setupUi(self, Form):
|
||||
Form.setObjectName(_fromUtf8("Form"))
|
||||
Form.resize(668, 556)
|
||||
self.horizontalLayout = QtGui.QHBoxLayout(Form)
|
||||
self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
|
||||
self.graphicsView = PlotWidget(Form)
|
||||
self.graphicsView.setObjectName(_fromUtf8("graphicsView"))
|
||||
self.horizontalLayout.addWidget(self.graphicsView)
|
||||
|
||||
self.retranslateUi(Form)
|
||||
QtCore.QMetaObject.connectSlotsByName(Form)
|
||||
|
||||
def retranslateUi(self, Form):
|
||||
Form.setWindowTitle(_translate("Form", "Form", None))
|
||||
|
||||
from pyqtgraph import PlotWidget
|
31
src/ui/ExtraDifferential.ui
Normal file
@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Form</class>
|
||||
<widget class="QWidget" name="Form">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>668</width>
|
||||
<height>556</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="PlotWidget" name="graphicsView"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>PlotWidget</class>
|
||||
<extends>QGraphicsView</extends>
|
||||
<header>pyqtgraph</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
180
src/ui/PeakGroupBox.py
Normal file
@ -0,0 +1,180 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Form implementation generated from reading ui file 'ui/PeakGroupBox.ui'
|
||||
#
|
||||
# Created: Wed Sep 24 21:21:48 2014
|
||||
# by: PyQt4 UI code generator 4.11.1
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
try:
|
||||
_fromUtf8 = QtCore.QString.fromUtf8
|
||||
except AttributeError:
|
||||
def _fromUtf8(s):
|
||||
return s
|
||||
|
||||
try:
|
||||
_encoding = QtGui.QApplication.UnicodeUTF8
|
||||
def _translate(context, text, disambig):
|
||||
return QtGui.QApplication.translate(context, text, disambig, _encoding)
|
||||
except AttributeError:
|
||||
def _translate(context, text, disambig):
|
||||
return QtGui.QApplication.translate(context, text, disambig)
|
||||
|
||||
class Ui_PeakGroupBox(object):
|
||||
def setupUi(self, PeakGroupBox):
|
||||
PeakGroupBox.setObjectName(_fromUtf8("PeakGroupBox"))
|
||||
PeakGroupBox.setEnabled(True)
|
||||
PeakGroupBox.resize(269, 179)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(PeakGroupBox.sizePolicy().hasHeightForWidth())
|
||||
PeakGroupBox.setSizePolicy(sizePolicy)
|
||||
PeakGroupBox.setMinimumSize(QtCore.QSize(0, 0))
|
||||
PeakGroupBox.setAutoFillBackground(False)
|
||||
PeakGroupBox.setFlat(False)
|
||||
PeakGroupBox.setCheckable(False)
|
||||
self.gridLayout_2 = QtGui.QGridLayout(PeakGroupBox)
|
||||
self.gridLayout_2.setMargin(10)
|
||||
self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2"))
|
||||
self.gridLayout = QtGui.QGridLayout()
|
||||
self.gridLayout.setSizeConstraint(QtGui.QLayout.SetFixedSize)
|
||||
self.gridLayout.setSpacing(1)
|
||||
self.gridLayout.setContentsMargins(0, 0, -1, -1)
|
||||
self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
|
||||
self.label = QtGui.QLabel(PeakGroupBox)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth())
|
||||
self.label.setSizePolicy(sizePolicy)
|
||||
self.label.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.label.setObjectName(_fromUtf8("label"))
|
||||
self.gridLayout.addWidget(self.label, 0, 3, 1, 1)
|
||||
self.label_5 = QtGui.QLabel(PeakGroupBox)
|
||||
self.label_5.setObjectName(_fromUtf8("label_5"))
|
||||
self.gridLayout.addWidget(self.label_5, 1, 2, 1, 1)
|
||||
self.label_7 = QtGui.QLabel(PeakGroupBox)
|
||||
self.label_7.setObjectName(_fromUtf8("label_7"))
|
||||
self.gridLayout.addWidget(self.label_7, 3, 2, 1, 1)
|
||||
self.label_6 = QtGui.QLabel(PeakGroupBox)
|
||||
self.label_6.setObjectName(_fromUtf8("label_6"))
|
||||
self.gridLayout.addWidget(self.label_6, 2, 2, 1, 1)
|
||||
self.removeButton = QtGui.QPushButton(PeakGroupBox)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.removeButton.sizePolicy().hasHeightForWidth())
|
||||
self.removeButton.setSizePolicy(sizePolicy)
|
||||
self.removeButton.setMinimumSize(QtCore.QSize(0, 0))
|
||||
self.removeButton.setObjectName(_fromUtf8("removeButton"))
|
||||
self.gridLayout.addWidget(self.removeButton, 0, 1, 1, 1, QtCore.Qt.AlignHCenter|QtCore.Qt.AlignVCenter)
|
||||
self.label_1 = QtGui.QLabel(PeakGroupBox)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.label_1.sizePolicy().hasHeightForWidth())
|
||||
self.label_1.setSizePolicy(sizePolicy)
|
||||
self.label_1.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.label_1.setObjectName(_fromUtf8("label_1"))
|
||||
self.gridLayout.addWidget(self.label_1, 1, 0, 1, 1)
|
||||
self.label_3 = QtGui.QLabel(PeakGroupBox)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.label_3.sizePolicy().hasHeightForWidth())
|
||||
self.label_3.setSizePolicy(sizePolicy)
|
||||
self.label_3.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.label_3.setObjectName(_fromUtf8("label_3"))
|
||||
self.gridLayout.addWidget(self.label_3, 3, 0, 1, 1)
|
||||
self.label_8 = QtGui.QLabel(PeakGroupBox)
|
||||
self.label_8.setObjectName(_fromUtf8("label_8"))
|
||||
self.gridLayout.addWidget(self.label_8, 4, 2, 1, 1)
|
||||
self.doubleSpinBox_4 = QtGui.QDoubleSpinBox(PeakGroupBox)
|
||||
self.doubleSpinBox_4.setSingleStep(0.05)
|
||||
self.doubleSpinBox_4.setObjectName(_fromUtf8("doubleSpinBox_4"))
|
||||
self.gridLayout.addWidget(self.doubleSpinBox_4, 4, 1, 1, 1)
|
||||
self.doubleSpinBox_3 = QtGui.QDoubleSpinBox(PeakGroupBox)
|
||||
self.doubleSpinBox_3.setSingleStep(0.05)
|
||||
self.doubleSpinBox_3.setObjectName(_fromUtf8("doubleSpinBox_3"))
|
||||
self.gridLayout.addWidget(self.doubleSpinBox_3, 3, 1, 1, 1)
|
||||
self.doubleSpinBox_2 = QtGui.QDoubleSpinBox(PeakGroupBox)
|
||||
self.doubleSpinBox_2.setObjectName(_fromUtf8("doubleSpinBox_2"))
|
||||
self.gridLayout.addWidget(self.doubleSpinBox_2, 2, 1, 1, 1)
|
||||
self.doubleSpinBox_1 = QtGui.QDoubleSpinBox(PeakGroupBox)
|
||||
self.doubleSpinBox_1.setObjectName(_fromUtf8("doubleSpinBox_1"))
|
||||
self.gridLayout.addWidget(self.doubleSpinBox_1, 1, 1, 1, 1)
|
||||
self.label_4 = QtGui.QLabel(PeakGroupBox)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.label_4.sizePolicy().hasHeightForWidth())
|
||||
self.label_4.setSizePolicy(sizePolicy)
|
||||
self.label_4.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.label_4.setObjectName(_fromUtf8("label_4"))
|
||||
self.gridLayout.addWidget(self.label_4, 4, 0, 1, 1)
|
||||
self.checkBox_4 = QtGui.QCheckBox(PeakGroupBox)
|
||||
self.checkBox_4.setText(_fromUtf8(""))
|
||||
self.checkBox_4.setObjectName(_fromUtf8("checkBox_4"))
|
||||
self.gridLayout.addWidget(self.checkBox_4, 4, 3, 1, 1, QtCore.Qt.AlignHCenter)
|
||||
self.label_2 = QtGui.QLabel(PeakGroupBox)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.label_2.sizePolicy().hasHeightForWidth())
|
||||
self.label_2.setSizePolicy(sizePolicy)
|
||||
self.label_2.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.label_2.setObjectName(_fromUtf8("label_2"))
|
||||
self.gridLayout.addWidget(self.label_2, 2, 0, 1, 1)
|
||||
self.checkBox_2 = QtGui.QCheckBox(PeakGroupBox)
|
||||
self.checkBox_2.setText(_fromUtf8(""))
|
||||
self.checkBox_2.setObjectName(_fromUtf8("checkBox_2"))
|
||||
self.gridLayout.addWidget(self.checkBox_2, 2, 3, 1, 1, QtCore.Qt.AlignHCenter)
|
||||
self.checkBox_3 = QtGui.QCheckBox(PeakGroupBox)
|
||||
self.checkBox_3.setText(_fromUtf8(""))
|
||||
self.checkBox_3.setObjectName(_fromUtf8("checkBox_3"))
|
||||
self.gridLayout.addWidget(self.checkBox_3, 3, 3, 1, 1, QtCore.Qt.AlignHCenter)
|
||||
self.checkBox_1 = QtGui.QCheckBox(PeakGroupBox)
|
||||
self.checkBox_1.setLayoutDirection(QtCore.Qt.LeftToRight)
|
||||
self.checkBox_1.setText(_fromUtf8(""))
|
||||
self.checkBox_1.setObjectName(_fromUtf8("checkBox_1"))
|
||||
self.gridLayout.addWidget(self.checkBox_1, 1, 3, 1, 1, QtCore.Qt.AlignHCenter)
|
||||
self.comboBox = QtGui.QComboBox(PeakGroupBox)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.comboBox.sizePolicy().hasHeightForWidth())
|
||||
self.comboBox.setSizePolicy(sizePolicy)
|
||||
self.comboBox.setObjectName(_fromUtf8("comboBox"))
|
||||
self.comboBox.addItem(_fromUtf8(""))
|
||||
self.comboBox.addItem(_fromUtf8(""))
|
||||
self.comboBox.addItem(_fromUtf8(""))
|
||||
self.comboBox.addItem(_fromUtf8(""))
|
||||
self.gridLayout.addWidget(self.comboBox, 0, 2, 1, 1, QtCore.Qt.AlignHCenter|QtCore.Qt.AlignVCenter)
|
||||
self.gridLayout_2.addLayout(self.gridLayout, 0, 0, 1, 1)
|
||||
|
||||
self.retranslateUi(PeakGroupBox)
|
||||
QtCore.QObject.connect(self.removeButton, QtCore.SIGNAL(_fromUtf8("clicked()")), PeakGroupBox.hide)
|
||||
QtCore.QMetaObject.connectSlotsByName(PeakGroupBox)
|
||||
|
||||
def retranslateUi(self, PeakGroupBox):
|
||||
PeakGroupBox.setWindowTitle(_translate("PeakGroupBox", "GroupBox", None))
|
||||
PeakGroupBox.setTitle(_translate("PeakGroupBox", "GroupBox", None))
|
||||
self.label.setText(_translate("PeakGroupBox", "Fix", None))
|
||||
self.label_5.setText(_translate("PeakGroupBox", "TextLabel", None))
|
||||
self.label_7.setText(_translate("PeakGroupBox", "TextLabel", None))
|
||||
self.label_6.setText(_translate("PeakGroupBox", "TextLabel", None))
|
||||
self.removeButton.setText(_translate("PeakGroupBox", "Remove", None))
|
||||
self.label_1.setText(_translate("PeakGroupBox", "Δε", None))
|
||||
self.label_3.setText(_translate("PeakGroupBox", "<html><head/><body><p>γ<span style=\" vertical-align:sub;\">CC</span></p></body></html>", None))
|
||||
self.label_8.setText(_translate("PeakGroupBox", "TextLabel", None))
|
||||
self.label_4.setText(_translate("PeakGroupBox", "<html><head/><body><p>β<span style=\" vertical-align:sub;\">CD</span></p></body></html>", None))
|
||||
self.label_2.setText(_translate("PeakGroupBox", "τ", None))
|
||||
self.comboBox.setItemText(0, _translate("PeakGroupBox", "H-N", None))
|
||||
self.comboBox.setItemText(1, _translate("PeakGroupBox", "C-C", None))
|
||||
self.comboBox.setItemText(2, _translate("PeakGroupBox", "C-D", None))
|
||||
self.comboBox.setItemText(3, _translate("PeakGroupBox", "Debye", None))
|
||||
|
292
src/ui/PeakGroupBox.ui
Normal file
@ -0,0 +1,292 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>PeakGroupBox</class>
|
||||
<widget class="QGroupBox" name="PeakGroupBox">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>269</width>
|
||||
<height>179</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>GroupBox</string>
|
||||
</property>
|
||||
<property name="autoFillBackground">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>GroupBox</string>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2" rowstretch="0">
|
||||
<property name="margin">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout" rowstretch="0,0,0,0,0" columnstretch="0,0,0,0">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetFixedSize</enum>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Fix</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" alignment="Qt::AlignHCenter|Qt::AlignVCenter">
|
||||
<widget class="QPushButton" name="removeButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Remove</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_1">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Δε</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><html><head/><body><p>γ<span style=" vertical-align:sub;">CC</span></p></body></html></string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_4">
|
||||
<property name="singleStep">
|
||||
<double>0.050000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_3">
|
||||
<property name="singleStep">
|
||||
<double>0.050000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_2"/>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_1"/>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><html><head/><body><p>β<span style=" vertical-align:sub;">CD</span></p></body></html></string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="3" alignment="Qt::AlignHCenter">
|
||||
<widget class="QCheckBox" name="checkBox_4">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>τ</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3" alignment="Qt::AlignHCenter">
|
||||
<widget class="QCheckBox" name="checkBox_2">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="3" alignment="Qt::AlignHCenter">
|
||||
<widget class="QCheckBox" name="checkBox_3">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3" alignment="Qt::AlignHCenter">
|
||||
<widget class="QCheckBox" name="checkBox_1">
|
||||
<property name="layoutDirection">
|
||||
<enum>Qt::LeftToRight</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2" alignment="Qt::AlignHCenter|Qt::AlignVCenter">
|
||||
<widget class="QComboBox" name="comboBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string extracomment="Havriliak-Negami Distribution">H-N</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string extracomment="Cole-Cole Distribution">C-C</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string extracomment="Cole-Davidson Distribution">C-D</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Debye</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>removeButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>PeakGroupBox</receiver>
|
||||
<slot>hide()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>82</x>
|
||||
<y>42</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>131</x>
|
||||
<y>88</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
136
src/ui/PowerLawGroupBox.py
Normal file
@ -0,0 +1,136 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Form implementation generated from reading ui file 'ui/PowerLawGroupBox.ui'
|
||||
#
|
||||
# Created: Tue Dec 16 15:03:15 2014
|
||||
# by: PyQt4 UI code generator 4.11.3
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
try:
|
||||
_fromUtf8 = QtCore.QString.fromUtf8
|
||||
except AttributeError:
|
||||
def _fromUtf8(s):
|
||||
return s
|
||||
|
||||
try:
|
||||
_encoding = QtGui.QApplication.UnicodeUTF8
|
||||
def _translate(context, text, disambig):
|
||||
return QtGui.QApplication.translate(context, text, disambig, _encoding)
|
||||
except AttributeError:
|
||||
def _translate(context, text, disambig):
|
||||
return QtGui.QApplication.translate(context, text, disambig)
|
||||
|
||||
class Ui_PowerLawGroupBox(object):
|
||||
def setupUi(self, PowerLawGroupBox):
|
||||
PowerLawGroupBox.setObjectName(_fromUtf8("PowerLawGroupBox"))
|
||||
PowerLawGroupBox.resize(253, 131)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(PowerLawGroupBox.sizePolicy().hasHeightForWidth())
|
||||
PowerLawGroupBox.setSizePolicy(sizePolicy)
|
||||
PowerLawGroupBox.setMinimumSize(QtCore.QSize(0, 0))
|
||||
self.gridLayout_2 = QtGui.QGridLayout(PowerLawGroupBox)
|
||||
self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2"))
|
||||
self.gridLayout = QtGui.QGridLayout()
|
||||
self.gridLayout.setSizeConstraint(QtGui.QLayout.SetFixedSize)
|
||||
self.gridLayout.setSpacing(1)
|
||||
self.gridLayout.setContentsMargins(0, 0, -1, -1)
|
||||
self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
|
||||
self.label = QtGui.QLabel(PowerLawGroupBox)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth())
|
||||
self.label.setSizePolicy(sizePolicy)
|
||||
self.label.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.label.setObjectName(_fromUtf8("label"))
|
||||
self.gridLayout.addWidget(self.label, 0, 3, 1, 1)
|
||||
self.removeButton = QtGui.QPushButton(PowerLawGroupBox)
|
||||
self.removeButton.setObjectName(_fromUtf8("removeButton"))
|
||||
self.gridLayout.addWidget(self.removeButton, 0, 1, 1, 1)
|
||||
self.checkBox_3 = QtGui.QCheckBox(PowerLawGroupBox)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.checkBox_3.sizePolicy().hasHeightForWidth())
|
||||
self.checkBox_3.setSizePolicy(sizePolicy)
|
||||
self.checkBox_3.setText(_fromUtf8(""))
|
||||
self.checkBox_3.setChecked(True)
|
||||
self.checkBox_3.setObjectName(_fromUtf8("checkBox_3"))
|
||||
self.gridLayout.addWidget(self.checkBox_3, 2, 3, 1, 1, QtCore.Qt.AlignHCenter|QtCore.Qt.AlignVCenter)
|
||||
self.label_6 = QtGui.QLabel(PowerLawGroupBox)
|
||||
self.label_6.setObjectName(_fromUtf8("label_6"))
|
||||
self.gridLayout.addWidget(self.label_6, 2, 2, 1, 1)
|
||||
self.doubleSpinBox_3 = QtGui.QDoubleSpinBox(PowerLawGroupBox)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.doubleSpinBox_3.sizePolicy().hasHeightForWidth())
|
||||
self.doubleSpinBox_3.setSizePolicy(sizePolicy)
|
||||
self.doubleSpinBox_3.setSingleStep(0.05)
|
||||
self.doubleSpinBox_3.setProperty("value", 1.0)
|
||||
self.doubleSpinBox_3.setObjectName(_fromUtf8("doubleSpinBox_3"))
|
||||
self.gridLayout.addWidget(self.doubleSpinBox_3, 2, 1, 1, 1)
|
||||
self.label_5 = QtGui.QLabel(PowerLawGroupBox)
|
||||
self.label_5.setObjectName(_fromUtf8("label_5"))
|
||||
self.gridLayout.addWidget(self.label_5, 1, 2, 1, 1)
|
||||
self.doubleSpinBox_2 = QtGui.QDoubleSpinBox(PowerLawGroupBox)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.doubleSpinBox_2.sizePolicy().hasHeightForWidth())
|
||||
self.doubleSpinBox_2.setSizePolicy(sizePolicy)
|
||||
self.doubleSpinBox_2.setObjectName(_fromUtf8("doubleSpinBox_2"))
|
||||
self.gridLayout.addWidget(self.doubleSpinBox_2, 1, 1, 1, 1)
|
||||
self.label_3 = QtGui.QLabel(PowerLawGroupBox)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.label_3.sizePolicy().hasHeightForWidth())
|
||||
self.label_3.setSizePolicy(sizePolicy)
|
||||
self.label_3.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.label_3.setObjectName(_fromUtf8("label_3"))
|
||||
self.gridLayout.addWidget(self.label_3, 2, 0, 1, 1)
|
||||
self.label_2 = QtGui.QLabel(PowerLawGroupBox)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.label_2.sizePolicy().hasHeightForWidth())
|
||||
self.label_2.setSizePolicy(sizePolicy)
|
||||
self.label_2.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.label_2.setObjectName(_fromUtf8("label_2"))
|
||||
self.gridLayout.addWidget(self.label_2, 1, 0, 1, 1)
|
||||
self.checkBox_2 = QtGui.QCheckBox(PowerLawGroupBox)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.checkBox_2.sizePolicy().hasHeightForWidth())
|
||||
self.checkBox_2.setSizePolicy(sizePolicy)
|
||||
self.checkBox_2.setText(_fromUtf8(""))
|
||||
self.checkBox_2.setObjectName(_fromUtf8("checkBox_2"))
|
||||
self.gridLayout.addWidget(self.checkBox_2, 1, 3, 1, 1, QtCore.Qt.AlignHCenter)
|
||||
self.pushButton_hide = QtGui.QPushButton(PowerLawGroupBox)
|
||||
self.pushButton_hide.setCheckable(True)
|
||||
self.pushButton_hide.setObjectName(_fromUtf8("pushButton_hide"))
|
||||
self.gridLayout.addWidget(self.pushButton_hide, 0, 2, 1, 1)
|
||||
self.gridLayout_2.addLayout(self.gridLayout, 0, 0, 1, 1)
|
||||
|
||||
self.retranslateUi(PowerLawGroupBox)
|
||||
QtCore.QObject.connect(self.removeButton, QtCore.SIGNAL(_fromUtf8("clicked()")), PowerLawGroupBox.hide)
|
||||
QtCore.QMetaObject.connectSlotsByName(PowerLawGroupBox)
|
||||
|
||||
def retranslateUi(self, PowerLawGroupBox):
|
||||
PowerLawGroupBox.setWindowTitle(_translate("PowerLawGroupBox", "GroupBox", None))
|
||||
PowerLawGroupBox.setTitle(_translate("PowerLawGroupBox", "Power Law", None))
|
||||
self.label.setText(_translate("PowerLawGroupBox", "Fix", None))
|
||||
self.removeButton.setText(_translate("PowerLawGroupBox", "Remove", None))
|
||||
self.label_6.setText(_translate("PowerLawGroupBox", "TextLabel", None))
|
||||
self.label_5.setText(_translate("PowerLawGroupBox", "TextLabel", None))
|
||||
self.label_3.setText(_translate("PowerLawGroupBox", "n", None))
|
||||
self.label_2.setText(_translate("PowerLawGroupBox", "U", None))
|
||||
self.pushButton_hide.setText(_translate("PowerLawGroupBox", "Hide", None))
|
||||
|
203
src/ui/PowerLawGroupBox.ui
Normal file
@ -0,0 +1,203 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>PowerLawGroupBox</class>
|
||||
<widget class="QGroupBox" name="PowerLawGroupBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>253</width>
|
||||
<height>131</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>GroupBox</string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Power Law</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetFixedSize</enum>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Fix</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QPushButton" name="removeButton">
|
||||
<property name="text">
|
||||
<string>Remove</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3" alignment="Qt::AlignHCenter|Qt::AlignVCenter">
|
||||
<widget class="QCheckBox" name="checkBox_3">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_3">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>0.050000000000000</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>n</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>U</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3" alignment="Qt::AlignHCenter">
|
||||
<widget class="QCheckBox" name="checkBox_2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QPushButton" name="pushButton_hide">
|
||||
<property name="text">
|
||||
<string>Hide</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>removeButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>PowerLawGroupBox</receiver>
|
||||
<slot>hide()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>95</x>
|
||||
<y>48</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>144</x>
|
||||
<y>80</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
174
src/ui/QDSMain.py
Normal file
@ -0,0 +1,174 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Form implementation generated from reading ui file 'ui/QDSMain.ui'
|
||||
#
|
||||
# Created: Fri Jan 9 21:17:26 2015
|
||||
# by: PyQt4 UI code generator 4.11.3
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
try:
|
||||
_fromUtf8 = QtCore.QString.fromUtf8
|
||||
except AttributeError:
|
||||
def _fromUtf8(s):
|
||||
return s
|
||||
|
||||
try:
|
||||
_encoding = QtGui.QApplication.UnicodeUTF8
|
||||
def _translate(context, text, disambig):
|
||||
return QtGui.QApplication.translate(context, text, disambig, _encoding)
|
||||
except AttributeError:
|
||||
def _translate(context, text, disambig):
|
||||
return QtGui.QApplication.translate(context, text, disambig)
|
||||
|
||||
class Ui_MainWindow(object):
|
||||
def setupUi(self, MainWindow):
|
||||
MainWindow.setObjectName(_fromUtf8("MainWindow"))
|
||||
MainWindow.resize(956, 699)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Maximum, QtGui.QSizePolicy.Maximum)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(MainWindow.sizePolicy().hasHeightForWidth())
|
||||
MainWindow.setSizePolicy(sizePolicy)
|
||||
self.centralwidget = QtGui.QWidget(MainWindow)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.centralwidget.sizePolicy().hasHeightForWidth())
|
||||
self.centralwidget.setSizePolicy(sizePolicy)
|
||||
self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
|
||||
self.verticalLayout = QtGui.QVBoxLayout(self.centralwidget)
|
||||
self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
|
||||
self.splitter = QtGui.QSplitter(self.centralwidget)
|
||||
self.splitter.setOrientation(QtCore.Qt.Horizontal)
|
||||
self.splitter.setObjectName(_fromUtf8("splitter"))
|
||||
self.pgPlotWidget_imag = PlotWidget(self.splitter)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
|
||||
sizePolicy.setHorizontalStretch(3)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.pgPlotWidget_imag.sizePolicy().hasHeightForWidth())
|
||||
self.pgPlotWidget_imag.setSizePolicy(sizePolicy)
|
||||
self.pgPlotWidget_imag.viewport().setProperty("cursor", QtGui.QCursor(QtCore.Qt.CrossCursor))
|
||||
self.pgPlotWidget_imag.setObjectName(_fromUtf8("pgPlotWidget_imag"))
|
||||
self.pgPlotWidget_real = PlotWidget(self.splitter)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
|
||||
sizePolicy.setHorizontalStretch(3)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.pgPlotWidget_real.sizePolicy().hasHeightForWidth())
|
||||
self.pgPlotWidget_real.setSizePolicy(sizePolicy)
|
||||
self.pgPlotWidget_real.viewport().setProperty("cursor", QtGui.QCursor(QtCore.Qt.CrossCursor))
|
||||
self.pgPlotWidget_real.setObjectName(_fromUtf8("pgPlotWidget_real"))
|
||||
self.verticalLayout.addWidget(self.splitter)
|
||||
MainWindow.setCentralWidget(self.centralwidget)
|
||||
self.menubar = QtGui.QMenuBar(MainWindow)
|
||||
self.menubar.setGeometry(QtCore.QRect(0, 0, 956, 22))
|
||||
self.menubar.setObjectName(_fromUtf8("menubar"))
|
||||
self.menuExtras = QtGui.QMenu(self.menubar)
|
||||
self.menuExtras.setObjectName(_fromUtf8("menuExtras"))
|
||||
self.menuConfiguration = QtGui.QMenu(self.menubar)
|
||||
self.menuConfiguration.setObjectName(_fromUtf8("menuConfiguration"))
|
||||
MainWindow.setMenuBar(self.menubar)
|
||||
self.statusbar = QtGui.QStatusBar(MainWindow)
|
||||
self.statusbar.setObjectName(_fromUtf8("statusbar"))
|
||||
MainWindow.setStatusBar(self.statusbar)
|
||||
self.toolBar = QtGui.QToolBar(MainWindow)
|
||||
self.toolBar.setIconSize(QtCore.QSize(48, 48))
|
||||
self.toolBar.setToolButtonStyle(QtCore.Qt.ToolButtonTextUnderIcon)
|
||||
self.toolBar.setObjectName(_fromUtf8("toolBar"))
|
||||
MainWindow.addToolBar(QtCore.Qt.TopToolBarArea, self.toolBar)
|
||||
self.dockWidget_3 = QtGui.QDockWidget(MainWindow)
|
||||
self.dockWidget_3.setFeatures(QtGui.QDockWidget.DockWidgetFloatable|QtGui.QDockWidget.DockWidgetMovable)
|
||||
self.dockWidget_3.setObjectName(_fromUtf8("dockWidget_3"))
|
||||
self.dockWidgetContents_4 = QtGui.QWidget()
|
||||
self.dockWidgetContents_4.setObjectName(_fromUtf8("dockWidgetContents_4"))
|
||||
self.dockWidget_3.setWidget(self.dockWidgetContents_4)
|
||||
MainWindow.addDockWidget(QtCore.Qt.DockWidgetArea(1), self.dockWidget_3)
|
||||
self.actionAdd_Peak = QtGui.QAction(MainWindow)
|
||||
self.actionAdd_Peak.setCheckable(True)
|
||||
icon = QtGui.QIcon()
|
||||
icon.addPixmap(QtGui.QPixmap(_fromUtf8(":/icons/add_peak.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.actionAdd_Peak.setIcon(icon)
|
||||
self.actionAdd_Peak.setObjectName(_fromUtf8("actionAdd_Peak"))
|
||||
self.actionAdd_Cond = QtGui.QAction(MainWindow)
|
||||
self.actionAdd_Cond.setCheckable(True)
|
||||
icon1 = QtGui.QIcon()
|
||||
icon1.addPixmap(QtGui.QPixmap(_fromUtf8(":/icons/add_cond.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.actionAdd_Cond.setIcon(icon1)
|
||||
self.actionAdd_Cond.setObjectName(_fromUtf8("actionAdd_Cond"))
|
||||
self.actionSave_FitResult = QtGui.QAction(MainWindow)
|
||||
icon2 = QtGui.QIcon()
|
||||
icon2.addPixmap(QtGui.QPixmap(_fromUtf8(":/icons/save_fit.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.actionSave_FitResult.setIcon(icon2)
|
||||
self.actionSave_FitResult.setObjectName(_fromUtf8("actionSave_FitResult"))
|
||||
self.actionAdd_PowerLaw = QtGui.QAction(MainWindow)
|
||||
self.actionAdd_PowerLaw.setCheckable(True)
|
||||
self.actionAdd_PowerLaw.setIcon(icon1)
|
||||
self.actionAdd_PowerLaw.setObjectName(_fromUtf8("actionAdd_PowerLaw"))
|
||||
self.actionAdd_Eps_Infty = QtGui.QAction(MainWindow)
|
||||
self.actionAdd_Eps_Infty.setCheckable(True)
|
||||
icon3 = QtGui.QIcon()
|
||||
icon3.addPixmap(QtGui.QPixmap(_fromUtf8(":/icons/add_eps_infty.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.actionAdd_Eps_Infty.setIcon(icon3)
|
||||
self.actionAdd_Eps_Infty.setObjectName(_fromUtf8("actionAdd_Eps_Infty"))
|
||||
self.actionYAFF = QtGui.QAction(MainWindow)
|
||||
self.actionYAFF.setCheckable(True)
|
||||
icon4 = QtGui.QIcon()
|
||||
icon4.addPixmap(QtGui.QPixmap(_fromUtf8(":/icons/add_yaff.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.actionYAFF.setIcon(icon4)
|
||||
self.actionYAFF.setObjectName(_fromUtf8("actionYAFF"))
|
||||
self.actionActionAbortFit = QtGui.QAction(MainWindow)
|
||||
icon5 = QtGui.QIcon()
|
||||
icon5.addPixmap(QtGui.QPixmap(_fromUtf8(":/icons/qds_fit_abort.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.actionActionAbortFit.setIcon(icon5)
|
||||
self.actionActionAbortFit.setObjectName(_fromUtf8("actionActionAbortFit"))
|
||||
self.actionShow_Derivative = QtGui.QAction(MainWindow)
|
||||
self.actionShow_Derivative.setObjectName(_fromUtf8("actionShow_Derivative"))
|
||||
self.actionAppend_Fit = QtGui.QAction(MainWindow)
|
||||
icon6 = QtGui.QIcon()
|
||||
icon6.addPixmap(QtGui.QPixmap(_fromUtf8(":/icons/append_save_fit.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.actionAppend_Fit.setIcon(icon6)
|
||||
self.actionAppend_Fit.setObjectName(_fromUtf8("actionAppend_Fit"))
|
||||
self.menuExtras.addAction(self.actionShow_Derivative)
|
||||
self.menubar.addAction(self.menuExtras.menuAction())
|
||||
self.menubar.addAction(self.menuConfiguration.menuAction())
|
||||
self.toolBar.addAction(self.actionAdd_Peak)
|
||||
self.toolBar.addAction(self.actionAdd_Cond)
|
||||
self.toolBar.addAction(self.actionAdd_PowerLaw)
|
||||
self.toolBar.addAction(self.actionAdd_Eps_Infty)
|
||||
self.toolBar.addSeparator()
|
||||
self.toolBar.addAction(self.actionYAFF)
|
||||
self.toolBar.addSeparator()
|
||||
self.toolBar.addAction(self.actionSave_FitResult)
|
||||
self.toolBar.addAction(self.actionAppend_Fit)
|
||||
self.toolBar.addSeparator()
|
||||
self.toolBar.addAction(self.actionActionAbortFit)
|
||||
|
||||
self.retranslateUi(MainWindow)
|
||||
QtCore.QMetaObject.connectSlotsByName(MainWindow)
|
||||
|
||||
def retranslateUi(self, MainWindow):
|
||||
MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow", None))
|
||||
self.menuExtras.setTitle(_translate("MainWindow", "Extras", None))
|
||||
self.menuConfiguration.setTitle(_translate("MainWindow", "Configuration", None))
|
||||
self.toolBar.setWindowTitle(_translate("MainWindow", "toolBar", None))
|
||||
self.actionAdd_Peak.setText(_translate("MainWindow", "Add Peak", None))
|
||||
self.actionAdd_Cond.setText(_translate("MainWindow", "Add Cond.", None))
|
||||
self.actionAdd_Cond.setToolTip(_translate("MainWindow", "Added Conductivity Term", None))
|
||||
self.actionSave_FitResult.setText(_translate("MainWindow", "Save Fit", None))
|
||||
self.actionSave_FitResult.setToolTip(_translate("MainWindow", "Save Fit Result", None))
|
||||
self.actionAdd_PowerLaw.setText(_translate("MainWindow", "Add Power Law", None))
|
||||
self.actionAdd_PowerLaw.setToolTip(_translate("MainWindow", "Add (complex) Power Law", None))
|
||||
self.actionAdd_Eps_Infty.setText(_translate("MainWindow", "Add e_infty", None))
|
||||
self.actionAdd_Eps_Infty.setToolTip(_translate("MainWindow", "Add eps_infty", None))
|
||||
self.actionYAFF.setText(_translate("MainWindow", "YAFF", None))
|
||||
self.actionYAFF.setToolTip(_translate("MainWindow", "Fit with YAFF", None))
|
||||
self.actionActionAbortFit.setText(_translate("MainWindow", "Abort Fit", None))
|
||||
self.actionActionAbortFit.setShortcut(_translate("MainWindow", "Ctrl+C", None))
|
||||
self.actionShow_Derivative.setText(_translate("MainWindow", "Show Derivative", None))
|
||||
self.actionAppend_Fit.setText(_translate("MainWindow", "Append Fit", None))
|
||||
self.actionAppend_Fit.setToolTip(_translate("MainWindow", "Appends current plot to existing plot.", None))
|
||||
|
||||
from pyqtgraph import PlotWidget
|
||||
import images_rc
|
250
src/ui/QDSMain.ui
Normal file
@ -0,0 +1,250 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>MainWindow</class>
|
||||
<widget class="QMainWindow" name="MainWindow">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>956</width>
|
||||
<height>699</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Maximum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>MainWindow</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralwidget">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QSplitter" name="splitter">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<widget class="PlotWidget" name="pgPlotWidget_imag">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>3</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="cursor" stdset="0">
|
||||
<cursorShape>CrossCursor</cursorShape>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="PlotWidget" name="pgPlotWidget_real">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>3</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="cursor" stdset="0">
|
||||
<cursorShape>CrossCursor</cursorShape>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QMenuBar" name="menubar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>956</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="menuExtras">
|
||||
<property name="title">
|
||||
<string>Extras</string>
|
||||
</property>
|
||||
<addaction name="actionShow_Derivative"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menuConfiguration">
|
||||
<property name="title">
|
||||
<string>Configuration</string>
|
||||
</property>
|
||||
</widget>
|
||||
<addaction name="menuExtras"/>
|
||||
<addaction name="menuConfiguration"/>
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="statusbar"/>
|
||||
<widget class="QToolBar" name="toolBar">
|
||||
<property name="windowTitle">
|
||||
<string>toolBar</string>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>48</width>
|
||||
<height>48</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolButtonStyle">
|
||||
<enum>Qt::ToolButtonTextUnderIcon</enum>
|
||||
</property>
|
||||
<attribute name="toolBarArea">
|
||||
<enum>TopToolBarArea</enum>
|
||||
</attribute>
|
||||
<attribute name="toolBarBreak">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<addaction name="actionAdd_Peak"/>
|
||||
<addaction name="actionAdd_Cond"/>
|
||||
<addaction name="actionAdd_PowerLaw"/>
|
||||
<addaction name="actionAdd_Eps_Infty"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionYAFF"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionSave_FitResult"/>
|
||||
<addaction name="actionAppend_Fit"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionActionAbortFit"/>
|
||||
</widget>
|
||||
<widget class="QDockWidget" name="dockWidget_3">
|
||||
<property name="features">
|
||||
<set>QDockWidget::DockWidgetFloatable|QDockWidget::DockWidgetMovable</set>
|
||||
</property>
|
||||
<attribute name="dockWidgetArea">
|
||||
<number>1</number>
|
||||
</attribute>
|
||||
<widget class="QWidget" name="dockWidgetContents_4"/>
|
||||
</widget>
|
||||
<action name="actionAdd_Peak">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="icons/images.qrc">
|
||||
<normaloff>:/icons/add_peak.svg</normaloff>:/icons/add_peak.svg</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Add Peak</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionAdd_Cond">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="icons/images.qrc">
|
||||
<normaloff>:/icons/add_cond.svg</normaloff>:/icons/add_cond.svg</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Add Cond.</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Added Conductivity Term</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionSave_FitResult">
|
||||
<property name="icon">
|
||||
<iconset resource="icons/images.qrc">
|
||||
<normaloff>:/icons/save_fit.png</normaloff>:/icons/save_fit.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Save Fit</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Save Fit Result</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionAdd_PowerLaw">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="icons/images.qrc">
|
||||
<normaloff>:/icons/add_cond.svg</normaloff>:/icons/add_cond.svg</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Add Power Law</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Add (complex) Power Law</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionAdd_Eps_Infty">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="icons/images.qrc">
|
||||
<normaloff>:/icons/add_eps_infty.png</normaloff>:/icons/add_eps_infty.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Add e_infty</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Add eps_infty</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionYAFF">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="icons/images.qrc">
|
||||
<normaloff>:/icons/add_yaff.png</normaloff>:/icons/add_yaff.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>YAFF</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Fit with YAFF</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionActionAbortFit">
|
||||
<property name="icon">
|
||||
<iconset resource="icons/images.qrc">
|
||||
<normaloff>:/icons/qds_fit_abort.png</normaloff>:/icons/qds_fit_abort.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Abort Fit</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+C</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionShow_Derivative">
|
||||
<property name="text">
|
||||
<string>Show Derivative</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionAppend_Fit">
|
||||
<property name="icon">
|
||||
<iconset resource="icons/images.qrc">
|
||||
<normaloff>:/icons/append_save_fit.png</normaloff>:/icons/append_save_fit.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Append Fit</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Appends current plot to existing plot.</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>PlotWidget</class>
|
||||
<extends>QGraphicsView</extends>
|
||||
<header>pyqtgraph</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="icons/images.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
100
src/ui/StaticGroupBox.py
Normal file
@ -0,0 +1,100 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Form implementation generated from reading ui file 'ui/StaticGroupBox.ui'
|
||||
#
|
||||
# Created: Wed Sep 24 21:21:48 2014
|
||||
# by: PyQt4 UI code generator 4.11.1
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
try:
|
||||
_fromUtf8 = QtCore.QString.fromUtf8
|
||||
except AttributeError:
|
||||
def _fromUtf8(s):
|
||||
return s
|
||||
|
||||
try:
|
||||
_encoding = QtGui.QApplication.UnicodeUTF8
|
||||
def _translate(context, text, disambig):
|
||||
return QtGui.QApplication.translate(context, text, disambig, _encoding)
|
||||
except AttributeError:
|
||||
def _translate(context, text, disambig):
|
||||
return QtGui.QApplication.translate(context, text, disambig)
|
||||
|
||||
class Ui_StaticGroupBox(object):
|
||||
def setupUi(self, StaticGroupBox):
|
||||
StaticGroupBox.setObjectName(_fromUtf8("StaticGroupBox"))
|
||||
StaticGroupBox.resize(218, 102)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(StaticGroupBox.sizePolicy().hasHeightForWidth())
|
||||
StaticGroupBox.setSizePolicy(sizePolicy)
|
||||
StaticGroupBox.setMinimumSize(QtCore.QSize(0, 0))
|
||||
self.gridLayout_2 = QtGui.QGridLayout(StaticGroupBox)
|
||||
self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2"))
|
||||
self.gridLayout = QtGui.QGridLayout()
|
||||
self.gridLayout.setSizeConstraint(QtGui.QLayout.SetFixedSize)
|
||||
self.gridLayout.setSpacing(1)
|
||||
self.gridLayout.setContentsMargins(0, 0, -1, -1)
|
||||
self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
|
||||
self.label = QtGui.QLabel(StaticGroupBox)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth())
|
||||
self.label.setSizePolicy(sizePolicy)
|
||||
self.label.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.label.setObjectName(_fromUtf8("label"))
|
||||
self.gridLayout.addWidget(self.label, 0, 3, 1, 1)
|
||||
self.removeButton = QtGui.QPushButton(StaticGroupBox)
|
||||
self.removeButton.setObjectName(_fromUtf8("removeButton"))
|
||||
self.gridLayout.addWidget(self.removeButton, 0, 1, 1, 1)
|
||||
self.label_4 = QtGui.QLabel(StaticGroupBox)
|
||||
self.label_4.setObjectName(_fromUtf8("label_4"))
|
||||
self.gridLayout.addWidget(self.label_4, 1, 2, 1, 1)
|
||||
self.doubleSpinBox_1 = QtGui.QDoubleSpinBox(StaticGroupBox)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.doubleSpinBox_1.sizePolicy().hasHeightForWidth())
|
||||
self.doubleSpinBox_1.setSizePolicy(sizePolicy)
|
||||
self.doubleSpinBox_1.setSingleStep(0.05)
|
||||
self.doubleSpinBox_1.setObjectName(_fromUtf8("doubleSpinBox_1"))
|
||||
self.gridLayout.addWidget(self.doubleSpinBox_1, 1, 1, 1, 1)
|
||||
self.label_1 = QtGui.QLabel(StaticGroupBox)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.label_1.sizePolicy().hasHeightForWidth())
|
||||
self.label_1.setSizePolicy(sizePolicy)
|
||||
self.label_1.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.label_1.setObjectName(_fromUtf8("label_1"))
|
||||
self.gridLayout.addWidget(self.label_1, 1, 0, 1, 1)
|
||||
self.checkBox_1 = QtGui.QCheckBox(StaticGroupBox)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.checkBox_1.sizePolicy().hasHeightForWidth())
|
||||
self.checkBox_1.setSizePolicy(sizePolicy)
|
||||
self.checkBox_1.setLayoutDirection(QtCore.Qt.LeftToRight)
|
||||
self.checkBox_1.setText(_fromUtf8(""))
|
||||
self.checkBox_1.setChecked(True)
|
||||
self.checkBox_1.setObjectName(_fromUtf8("checkBox_1"))
|
||||
self.gridLayout.addWidget(self.checkBox_1, 1, 3, 1, 1, QtCore.Qt.AlignHCenter|QtCore.Qt.AlignVCenter)
|
||||
self.gridLayout_2.addLayout(self.gridLayout, 0, 0, 1, 1)
|
||||
|
||||
self.retranslateUi(StaticGroupBox)
|
||||
QtCore.QObject.connect(self.removeButton, QtCore.SIGNAL(_fromUtf8("clicked()")), StaticGroupBox.hide)
|
||||
QtCore.QMetaObject.connectSlotsByName(StaticGroupBox)
|
||||
|
||||
def retranslateUi(self, StaticGroupBox):
|
||||
StaticGroupBox.setWindowTitle(_translate("StaticGroupBox", "GroupBox", None))
|
||||
StaticGroupBox.setTitle(_translate("StaticGroupBox", "e\'_infty", None))
|
||||
self.label.setText(_translate("StaticGroupBox", "Fix", None))
|
||||
self.removeButton.setText(_translate("StaticGroupBox", "Remove", None))
|
||||
self.label_4.setText(_translate("StaticGroupBox", "TextLabel", None))
|
||||
self.label_1.setText(_translate("StaticGroupBox", "<html><head/><body><p>ε<span style=\" vertical-align:sub;\">infty</span></p></body></html>", None))
|
||||
|
147
src/ui/StaticGroupBox.ui
Normal file
@ -0,0 +1,147 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>StaticGroupBox</class>
|
||||
<widget class="QGroupBox" name="StaticGroupBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>218</width>
|
||||
<height>102</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>GroupBox</string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>e'_infty</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetFixedSize</enum>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Fix</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QPushButton" name="removeButton">
|
||||
<property name="text">
|
||||
<string>Remove</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_1">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>0.050000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_1">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><html><head/><body><p>ε<span style=" vertical-align:sub;">infty</span></p></body></html></string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3" alignment="Qt::AlignHCenter|Qt::AlignVCenter">
|
||||
<widget class="QCheckBox" name="checkBox_1">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="layoutDirection">
|
||||
<enum>Qt::LeftToRight</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>removeButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>StaticGroupBox</receiver>
|
||||
<slot>hide()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>95</x>
|
||||
<y>48</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>144</x>
|
||||
<y>80</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
107
src/ui/YAFFConfig.py
Normal file
@ -0,0 +1,107 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Form implementation generated from reading ui file 'ui/YAFFConfig.ui'
|
||||
#
|
||||
# Created: Wed Sep 24 21:21:48 2014
|
||||
# by: PyQt4 UI code generator 4.11.1
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
try:
|
||||
_fromUtf8 = QtCore.QString.fromUtf8
|
||||
except AttributeError:
|
||||
def _fromUtf8(s):
|
||||
return s
|
||||
|
||||
try:
|
||||
_encoding = QtGui.QApplication.UnicodeUTF8
|
||||
def _translate(context, text, disambig):
|
||||
return QtGui.QApplication.translate(context, text, disambig, _encoding)
|
||||
except AttributeError:
|
||||
def _translate(context, text, disambig):
|
||||
return QtGui.QApplication.translate(context, text, disambig)
|
||||
|
||||
class Ui_Dialog(object):
|
||||
def setupUi(self, Dialog):
|
||||
Dialog.setObjectName(_fromUtf8("Dialog"))
|
||||
Dialog.resize(250, 229)
|
||||
self.gridLayout_3 = QtGui.QGridLayout(Dialog)
|
||||
self.gridLayout_3.setObjectName(_fromUtf8("gridLayout_3"))
|
||||
self.groupBox_time = QtGui.QGroupBox(Dialog)
|
||||
self.groupBox_time.setObjectName(_fromUtf8("groupBox_time"))
|
||||
self.gridLayout_time = QtGui.QGridLayout(self.groupBox_time)
|
||||
self.gridLayout_time.setObjectName(_fromUtf8("gridLayout_time"))
|
||||
self.label = QtGui.QLabel(self.groupBox_time)
|
||||
self.label.setObjectName(_fromUtf8("label"))
|
||||
self.gridLayout_time.addWidget(self.label, 0, 0, 1, 1)
|
||||
self.label_2 = QtGui.QLabel(self.groupBox_time)
|
||||
self.label_2.setObjectName(_fromUtf8("label_2"))
|
||||
self.gridLayout_time.addWidget(self.label_2, 0, 1, 1, 1)
|
||||
self.label_3 = QtGui.QLabel(self.groupBox_time)
|
||||
self.label_3.setObjectName(_fromUtf8("label_3"))
|
||||
self.gridLayout_time.addWidget(self.label_3, 0, 2, 1, 1)
|
||||
self.doubleSpinBox_tmin = QtGui.QDoubleSpinBox(self.groupBox_time)
|
||||
self.doubleSpinBox_tmin.setObjectName(_fromUtf8("doubleSpinBox_tmin"))
|
||||
self.gridLayout_time.addWidget(self.doubleSpinBox_tmin, 1, 0, 1, 1)
|
||||
self.doubleSpinBox_tmax = QtGui.QDoubleSpinBox(self.groupBox_time)
|
||||
self.doubleSpinBox_tmax.setObjectName(_fromUtf8("doubleSpinBox_tmax"))
|
||||
self.gridLayout_time.addWidget(self.doubleSpinBox_tmax, 1, 1, 1, 1)
|
||||
self.spinBox_tn = QtGui.QSpinBox(self.groupBox_time)
|
||||
self.spinBox_tn.setMinimum(256)
|
||||
self.spinBox_tn.setMaximum(8192)
|
||||
self.spinBox_tn.setSingleStep(256)
|
||||
self.spinBox_tn.setProperty("value", 512)
|
||||
self.spinBox_tn.setObjectName(_fromUtf8("spinBox_tn"))
|
||||
self.gridLayout_time.addWidget(self.spinBox_tn, 1, 2, 1, 1)
|
||||
self.gridLayout_3.addWidget(self.groupBox_time, 0, 0, 1, 1)
|
||||
self.groupBox_tau = QtGui.QGroupBox(Dialog)
|
||||
self.groupBox_tau.setObjectName(_fromUtf8("groupBox_tau"))
|
||||
self.gridLayout_tau = QtGui.QGridLayout(self.groupBox_tau)
|
||||
self.gridLayout_tau.setObjectName(_fromUtf8("gridLayout_tau"))
|
||||
self.label_7 = QtGui.QLabel(self.groupBox_tau)
|
||||
self.label_7.setObjectName(_fromUtf8("label_7"))
|
||||
self.gridLayout_tau.addWidget(self.label_7, 0, 0, 1, 1)
|
||||
self.label_8 = QtGui.QLabel(self.groupBox_tau)
|
||||
self.label_8.setObjectName(_fromUtf8("label_8"))
|
||||
self.gridLayout_tau.addWidget(self.label_8, 0, 1, 1, 1)
|
||||
self.label_9 = QtGui.QLabel(self.groupBox_tau)
|
||||
self.label_9.setObjectName(_fromUtf8("label_9"))
|
||||
self.gridLayout_tau.addWidget(self.label_9, 0, 2, 1, 1)
|
||||
self.doubleSpinBox_taumin = QtGui.QDoubleSpinBox(self.groupBox_tau)
|
||||
self.doubleSpinBox_taumin.setObjectName(_fromUtf8("doubleSpinBox_taumin"))
|
||||
self.gridLayout_tau.addWidget(self.doubleSpinBox_taumin, 1, 0, 1, 1)
|
||||
self.doubleSpinBox_taumax = QtGui.QDoubleSpinBox(self.groupBox_tau)
|
||||
self.doubleSpinBox_taumax.setObjectName(_fromUtf8("doubleSpinBox_taumax"))
|
||||
self.gridLayout_tau.addWidget(self.doubleSpinBox_taumax, 1, 1, 1, 1)
|
||||
self.spinBox_taun = QtGui.QSpinBox(self.groupBox_tau)
|
||||
self.spinBox_taun.setMinimum(256)
|
||||
self.spinBox_taun.setMaximum(8192)
|
||||
self.spinBox_taun.setSingleStep(256)
|
||||
self.spinBox_taun.setProperty("value", 512)
|
||||
self.spinBox_taun.setObjectName(_fromUtf8("spinBox_taun"))
|
||||
self.gridLayout_tau.addWidget(self.spinBox_taun, 1, 2, 1, 1)
|
||||
self.gridLayout_3.addWidget(self.groupBox_tau, 1, 0, 1, 1)
|
||||
self.buttonBox = QtGui.QDialogButtonBox(Dialog)
|
||||
self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
|
||||
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
|
||||
self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
|
||||
self.gridLayout_3.addWidget(self.buttonBox, 2, 0, 1, 1)
|
||||
|
||||
self.retranslateUi(Dialog)
|
||||
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("accepted()")), Dialog.accept)
|
||||
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), Dialog.reject)
|
||||
QtCore.QMetaObject.connectSlotsByName(Dialog)
|
||||
|
||||
def retranslateUi(self, Dialog):
|
||||
Dialog.setWindowTitle(_translate("Dialog", "YAFF Configuration", None))
|
||||
self.groupBox_time.setTitle(_translate("Dialog", "Time values (log10[t])", None))
|
||||
self.label.setText(_translate("Dialog", "<html><head/><body><p>t<span style=\" vertical-align:sub;\">min</span></p></body></html>", None))
|
||||
self.label_2.setText(_translate("Dialog", "<html><head/><body><p>t<span style=\" vertical-align:sub;\">max</span></p></body></html>", None))
|
||||
self.label_3.setText(_translate("Dialog", "N", None))
|
||||
self.groupBox_tau.setTitle(_translate("Dialog", "τ-Distribution (log10[τ])", None))
|
||||
self.label_7.setText(_translate("Dialog", "<html><head/><body><p>t<span style=\" vertical-align:sub;\">min</span></p></body></html>", None))
|
||||
self.label_8.setText(_translate("Dialog", "<html><head/><body><p>t<span style=\" vertical-align:sub;\">max</span></p></body></html>", None))
|
||||
self.label_9.setText(_translate("Dialog", "N", None))
|
||||
|
168
src/ui/YAFFConfig.ui
Normal file
@ -0,0 +1,168 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Dialog</class>
|
||||
<widget class="QDialog" name="Dialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>250</width>
|
||||
<height>229</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>YAFF Configuration</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="0" column="0">
|
||||
<widget class="QGroupBox" name="groupBox_time">
|
||||
<property name="title">
|
||||
<string>Time values (log10[t])</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_time">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string><html><head/><body><p>t<span style=" vertical-align:sub;">min</span></p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string><html><head/><body><p>t<span style=" vertical-align:sub;">max</span></p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>N</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_tmin"/>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_tmax"/>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QSpinBox" name="spinBox_tn">
|
||||
<property name="minimum">
|
||||
<number>256</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>8192</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>256</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>512</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QGroupBox" name="groupBox_tau">
|
||||
<property name="title">
|
||||
<string>τ-Distribution (log10[τ])</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_tau">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string><html><head/><body><p>t<span style=" vertical-align:sub;">min</span></p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="text">
|
||||
<string><html><head/><body><p>t<span style=" vertical-align:sub;">max</span></p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="text">
|
||||
<string>N</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_taumin"/>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_taumax"/>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QSpinBox" name="spinBox_taun">
|
||||
<property name="minimum">
|
||||
<number>256</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>8192</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>256</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>512</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>Dialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>Dialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
302
src/ui/YAFFparameters.py
Normal file
@ -0,0 +1,302 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Form implementation generated from reading ui file 'ui/YAFFparameters.ui'
|
||||
#
|
||||
# Created: Wed Sep 24 21:21:48 2014
|
||||
# by: PyQt4 UI code generator 4.11.1
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
try:
|
||||
_fromUtf8 = QtCore.QString.fromUtf8
|
||||
except AttributeError:
|
||||
def _fromUtf8(s):
|
||||
return s
|
||||
|
||||
try:
|
||||
_encoding = QtGui.QApplication.UnicodeUTF8
|
||||
def _translate(context, text, disambig):
|
||||
return QtGui.QApplication.translate(context, text, disambig, _encoding)
|
||||
except AttributeError:
|
||||
def _translate(context, text, disambig):
|
||||
return QtGui.QApplication.translate(context, text, disambig)
|
||||
|
||||
class Ui_Form(object):
|
||||
def setupUi(self, Form):
|
||||
Form.setObjectName(_fromUtf8("Form"))
|
||||
Form.resize(300, 322)
|
||||
self.gridLayout = QtGui.QGridLayout(Form)
|
||||
self.gridLayout.setMargin(0)
|
||||
self.gridLayout.setSpacing(1)
|
||||
self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
|
||||
self.checkBox_2 = QtGui.QCheckBox(Form)
|
||||
self.checkBox_2.setText(_fromUtf8(""))
|
||||
self.checkBox_2.setObjectName(_fromUtf8("checkBox_2"))
|
||||
self.gridLayout.addWidget(self.checkBox_2, 3, 3, 1, 1)
|
||||
self.checkBox_1 = QtGui.QCheckBox(Form)
|
||||
self.checkBox_1.setText(_fromUtf8(""))
|
||||
self.checkBox_1.setObjectName(_fromUtf8("checkBox_1"))
|
||||
self.gridLayout.addWidget(self.checkBox_1, 2, 3, 1, 1)
|
||||
self.label_422 = QtGui.QLabel(Form)
|
||||
self.label_422.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
|
||||
self.label_422.setObjectName(_fromUtf8("label_422"))
|
||||
self.gridLayout.addWidget(self.label_422, 7, 0, 1, 1)
|
||||
self.label_10 = QtGui.QLabel(Form)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Preferred)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.label_10.sizePolicy().hasHeightForWidth())
|
||||
self.label_10.setSizePolicy(sizePolicy)
|
||||
self.label_10.setObjectName(_fromUtf8("label_10"))
|
||||
self.gridLayout.addWidget(self.label_10, 13, 2, 1, 1)
|
||||
self.doubleSpinBox_1 = QtGui.QDoubleSpinBox(Form)
|
||||
self.doubleSpinBox_1.setObjectName(_fromUtf8("doubleSpinBox_1"))
|
||||
self.gridLayout.addWidget(self.doubleSpinBox_1, 2, 1, 1, 1)
|
||||
self.doubleSpinBox_4 = QtGui.QDoubleSpinBox(Form)
|
||||
self.doubleSpinBox_4.setSingleStep(0.05)
|
||||
self.doubleSpinBox_4.setProperty("value", 1.0)
|
||||
self.doubleSpinBox_4.setObjectName(_fromUtf8("doubleSpinBox_4"))
|
||||
self.gridLayout.addWidget(self.doubleSpinBox_4, 7, 1, 1, 1)
|
||||
self.label_111 = QtGui.QLabel(Form)
|
||||
self.label_111.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
|
||||
self.label_111.setObjectName(_fromUtf8("label_111"))
|
||||
self.gridLayout.addWidget(self.label_111, 2, 0, 1, 1)
|
||||
self.label_4 = QtGui.QLabel(Form)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Preferred)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.label_4.sizePolicy().hasHeightForWidth())
|
||||
self.label_4.setSizePolicy(sizePolicy)
|
||||
self.label_4.setObjectName(_fromUtf8("label_4"))
|
||||
self.gridLayout.addWidget(self.label_4, 7, 2, 1, 1)
|
||||
self.doubleSpinBox_6 = QtGui.QDoubleSpinBox(Form)
|
||||
self.doubleSpinBox_6.setObjectName(_fromUtf8("doubleSpinBox_6"))
|
||||
self.gridLayout.addWidget(self.doubleSpinBox_6, 9, 1, 1, 1)
|
||||
self.label_5 = QtGui.QLabel(Form)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Preferred)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.label_5.sizePolicy().hasHeightForWidth())
|
||||
self.label_5.setSizePolicy(sizePolicy)
|
||||
self.label_5.setObjectName(_fromUtf8("label_5"))
|
||||
self.gridLayout.addWidget(self.label_5, 8, 2, 1, 1)
|
||||
self.label_522 = QtGui.QLabel(Form)
|
||||
self.label_522.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
|
||||
self.label_522.setObjectName(_fromUtf8("label_522"))
|
||||
self.gridLayout.addWidget(self.label_522, 8, 0, 1, 1)
|
||||
self.label_112 = QtGui.QLabel(Form)
|
||||
self.label_112.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
|
||||
self.label_112.setObjectName(_fromUtf8("label_112"))
|
||||
self.gridLayout.addWidget(self.label_112, 12, 0, 1, 1)
|
||||
self.label_9 = QtGui.QLabel(Form)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Preferred)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.label_9.sizePolicy().hasHeightForWidth())
|
||||
self.label_9.setSizePolicy(sizePolicy)
|
||||
self.label_9.setObjectName(_fromUtf8("label_9"))
|
||||
self.gridLayout.addWidget(self.label_9, 12, 2, 1, 1)
|
||||
self.label_6 = QtGui.QLabel(Form)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Preferred)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.label_6.sizePolicy().hasHeightForWidth())
|
||||
self.label_6.setSizePolicy(sizePolicy)
|
||||
self.label_6.setObjectName(_fromUtf8("label_6"))
|
||||
self.gridLayout.addWidget(self.label_6, 9, 2, 1, 1)
|
||||
self.label_type = QtGui.QLabel(Form)
|
||||
self.label_type.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
|
||||
self.label_type.setObjectName(_fromUtf8("label_type"))
|
||||
self.gridLayout.addWidget(self.label_type, 0, 0, 1, 1)
|
||||
self.doubleSpinBox_3 = QtGui.QDoubleSpinBox(Form)
|
||||
self.doubleSpinBox_3.setSingleStep(0.05)
|
||||
self.doubleSpinBox_3.setProperty("value", 1.0)
|
||||
self.doubleSpinBox_3.setObjectName(_fromUtf8("doubleSpinBox_3"))
|
||||
self.gridLayout.addWidget(self.doubleSpinBox_3, 5, 1, 1, 1)
|
||||
self.label_huh = QtGui.QLabel(Form)
|
||||
self.label_huh.setObjectName(_fromUtf8("label_huh"))
|
||||
self.gridLayout.addWidget(self.label_huh, 1, 0, 1, 1)
|
||||
self.label_2 = QtGui.QLabel(Form)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Preferred)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.label_2.sizePolicy().hasHeightForWidth())
|
||||
self.label_2.setSizePolicy(sizePolicy)
|
||||
self.label_2.setObjectName(_fromUtf8("label_2"))
|
||||
self.gridLayout.addWidget(self.label_2, 3, 2, 1, 1)
|
||||
self.label_102 = QtGui.QLabel(Form)
|
||||
self.label_102.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
|
||||
self.label_102.setObjectName(_fromUtf8("label_102"))
|
||||
self.gridLayout.addWidget(self.label_102, 13, 0, 1, 1)
|
||||
self.label_222 = QtGui.QLabel(Form)
|
||||
self.label_222.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
|
||||
self.label_222.setObjectName(_fromUtf8("label_222"))
|
||||
self.gridLayout.addWidget(self.label_222, 3, 0, 1, 1)
|
||||
self.label_322 = QtGui.QLabel(Form)
|
||||
self.label_322.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
|
||||
self.label_322.setObjectName(_fromUtf8("label_322"))
|
||||
self.gridLayout.addWidget(self.label_322, 5, 0, 1, 1)
|
||||
self.doubleSpinBox_9 = QtGui.QDoubleSpinBox(Form)
|
||||
self.doubleSpinBox_9.setMinimum(1.0)
|
||||
self.doubleSpinBox_9.setProperty("value", 1.0)
|
||||
self.doubleSpinBox_9.setObjectName(_fromUtf8("doubleSpinBox_9"))
|
||||
self.gridLayout.addWidget(self.doubleSpinBox_9, 12, 1, 1, 1)
|
||||
self.label_8 = QtGui.QLabel(Form)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Preferred)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.label_8.sizePolicy().hasHeightForWidth())
|
||||
self.label_8.setSizePolicy(sizePolicy)
|
||||
self.label_8.setObjectName(_fromUtf8("label_8"))
|
||||
self.gridLayout.addWidget(self.label_8, 11, 2, 1, 1)
|
||||
self.label_1 = QtGui.QLabel(Form)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Preferred)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.label_1.sizePolicy().hasHeightForWidth())
|
||||
self.label_1.setSizePolicy(sizePolicy)
|
||||
self.label_1.setObjectName(_fromUtf8("label_1"))
|
||||
self.gridLayout.addWidget(self.label_1, 2, 2, 1, 1)
|
||||
self.label_3 = QtGui.QLabel(Form)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Preferred)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.label_3.sizePolicy().hasHeightForWidth())
|
||||
self.label_3.setSizePolicy(sizePolicy)
|
||||
self.label_3.setObjectName(_fromUtf8("label_3"))
|
||||
self.gridLayout.addWidget(self.label_3, 5, 2, 1, 1)
|
||||
self.label_82 = QtGui.QLabel(Form)
|
||||
self.label_82.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
|
||||
self.label_82.setObjectName(_fromUtf8("label_82"))
|
||||
self.gridLayout.addWidget(self.label_82, 11, 0, 1, 1)
|
||||
self.label_622 = QtGui.QLabel(Form)
|
||||
self.label_622.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
|
||||
self.label_622.setObjectName(_fromUtf8("label_622"))
|
||||
self.gridLayout.addWidget(self.label_622, 9, 0, 1, 1)
|
||||
self.doubleSpinBox_7 = QtGui.QDoubleSpinBox(Form)
|
||||
self.doubleSpinBox_7.setSingleStep(0.05)
|
||||
self.doubleSpinBox_7.setProperty("value", 1.0)
|
||||
self.doubleSpinBox_7.setObjectName(_fromUtf8("doubleSpinBox_7"))
|
||||
self.gridLayout.addWidget(self.doubleSpinBox_7, 10, 1, 1, 1)
|
||||
self.label_7 = QtGui.QLabel(Form)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Preferred)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.label_7.sizePolicy().hasHeightForWidth())
|
||||
self.label_7.setSizePolicy(sizePolicy)
|
||||
self.label_7.setObjectName(_fromUtf8("label_7"))
|
||||
self.gridLayout.addWidget(self.label_7, 10, 2, 1, 1)
|
||||
self.label_72 = QtGui.QLabel(Form)
|
||||
self.label_72.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
|
||||
self.label_72.setObjectName(_fromUtf8("label_72"))
|
||||
self.gridLayout.addWidget(self.label_72, 10, 0, 1, 1)
|
||||
self.doubleSpinBox_8 = QtGui.QDoubleSpinBox(Form)
|
||||
self.doubleSpinBox_8.setSingleStep(0.05)
|
||||
self.doubleSpinBox_8.setProperty("value", 1.0)
|
||||
self.doubleSpinBox_8.setObjectName(_fromUtf8("doubleSpinBox_8"))
|
||||
self.gridLayout.addWidget(self.doubleSpinBox_8, 11, 1, 1, 1)
|
||||
self.doubleSpinBox_10 = QtGui.QDoubleSpinBox(Form)
|
||||
self.doubleSpinBox_10.setMaximum(1.0)
|
||||
self.doubleSpinBox_10.setSingleStep(0.05)
|
||||
self.doubleSpinBox_10.setProperty("value", 1.0)
|
||||
self.doubleSpinBox_10.setObjectName(_fromUtf8("doubleSpinBox_10"))
|
||||
self.gridLayout.addWidget(self.doubleSpinBox_10, 13, 1, 1, 1)
|
||||
self.doubleSpinBox_5 = QtGui.QDoubleSpinBox(Form)
|
||||
self.doubleSpinBox_5.setSingleStep(0.05)
|
||||
self.doubleSpinBox_5.setProperty("value", 0.8)
|
||||
self.doubleSpinBox_5.setObjectName(_fromUtf8("doubleSpinBox_5"))
|
||||
self.gridLayout.addWidget(self.doubleSpinBox_5, 8, 1, 1, 1)
|
||||
self.doubleSpinBox_2 = QtGui.QDoubleSpinBox(Form)
|
||||
self.doubleSpinBox_2.setObjectName(_fromUtf8("doubleSpinBox_2"))
|
||||
self.gridLayout.addWidget(self.doubleSpinBox_2, 3, 1, 1, 1)
|
||||
self.checkBox_4 = QtGui.QCheckBox(Form)
|
||||
self.checkBox_4.setText(_fromUtf8(""))
|
||||
self.checkBox_4.setObjectName(_fromUtf8("checkBox_4"))
|
||||
self.gridLayout.addWidget(self.checkBox_4, 7, 3, 1, 1)
|
||||
self.checkBox_3 = QtGui.QCheckBox(Form)
|
||||
self.checkBox_3.setText(_fromUtf8(""))
|
||||
self.checkBox_3.setObjectName(_fromUtf8("checkBox_3"))
|
||||
self.gridLayout.addWidget(self.checkBox_3, 5, 3, 1, 1)
|
||||
self.checkBox_5 = QtGui.QCheckBox(Form)
|
||||
self.checkBox_5.setText(_fromUtf8(""))
|
||||
self.checkBox_5.setObjectName(_fromUtf8("checkBox_5"))
|
||||
self.gridLayout.addWidget(self.checkBox_5, 8, 3, 1, 1)
|
||||
self.checkBox_6 = QtGui.QCheckBox(Form)
|
||||
self.checkBox_6.setText(_fromUtf8(""))
|
||||
self.checkBox_6.setObjectName(_fromUtf8("checkBox_6"))
|
||||
self.gridLayout.addWidget(self.checkBox_6, 9, 3, 1, 1)
|
||||
self.checkBox_7 = QtGui.QCheckBox(Form)
|
||||
self.checkBox_7.setText(_fromUtf8(""))
|
||||
self.checkBox_7.setObjectName(_fromUtf8("checkBox_7"))
|
||||
self.gridLayout.addWidget(self.checkBox_7, 10, 3, 1, 1)
|
||||
self.checkBox_8 = QtGui.QCheckBox(Form)
|
||||
self.checkBox_8.setText(_fromUtf8(""))
|
||||
self.checkBox_8.setObjectName(_fromUtf8("checkBox_8"))
|
||||
self.gridLayout.addWidget(self.checkBox_8, 11, 3, 1, 1)
|
||||
self.checkBox_9 = QtGui.QCheckBox(Form)
|
||||
self.checkBox_9.setText(_fromUtf8(""))
|
||||
self.checkBox_9.setObjectName(_fromUtf8("checkBox_9"))
|
||||
self.gridLayout.addWidget(self.checkBox_9, 12, 3, 1, 1)
|
||||
self.checkBox_10 = QtGui.QCheckBox(Form)
|
||||
self.checkBox_10.setText(_fromUtf8(""))
|
||||
self.checkBox_10.setObjectName(_fromUtf8("checkBox_10"))
|
||||
self.gridLayout.addWidget(self.checkBox_10, 13, 3, 1, 1)
|
||||
self.label_23 = QtGui.QLabel(Form)
|
||||
self.label_23.setObjectName(_fromUtf8("label_23"))
|
||||
self.gridLayout.addWidget(self.label_23, 1, 3, 1, 1)
|
||||
self.comboBox_2 = QtGui.QComboBox(Form)
|
||||
self.comboBox_2.setObjectName(_fromUtf8("comboBox_2"))
|
||||
self.gridLayout.addWidget(self.comboBox_2, 1, 1, 1, 1)
|
||||
self.comboBox = QtGui.QComboBox(Form)
|
||||
self.comboBox.setObjectName(_fromUtf8("comboBox"))
|
||||
self.comboBox.addItem(_fromUtf8(""))
|
||||
self.comboBox.addItem(_fromUtf8(""))
|
||||
self.comboBox.addItem(_fromUtf8(""))
|
||||
self.comboBox.addItem(_fromUtf8(""))
|
||||
self.comboBox.addItem(_fromUtf8(""))
|
||||
self.gridLayout.addWidget(self.comboBox, 0, 1, 1, 1)
|
||||
self.removeButton = QtGui.QPushButton(Form)
|
||||
self.removeButton.setObjectName(_fromUtf8("removeButton"))
|
||||
self.gridLayout.addWidget(self.removeButton, 0, 2, 1, 1)
|
||||
self.configButton = QtGui.QPushButton(Form)
|
||||
self.configButton.setObjectName(_fromUtf8("configButton"))
|
||||
self.gridLayout.addWidget(self.configButton, 1, 2, 1, 1)
|
||||
|
||||
self.retranslateUi(Form)
|
||||
QtCore.QMetaObject.connectSlotsByName(Form)
|
||||
|
||||
def retranslateUi(self, Form):
|
||||
Form.setWindowTitle(_translate("Form", "Form", None))
|
||||
self.label_422.setText(_translate("Form", "β", None))
|
||||
self.label_10.setText(_translate("Form", "TextLabel", None))
|
||||
self.label_111.setText(_translate("Form", "Δε", None))
|
||||
self.label_4.setText(_translate("Form", "TextLabel", None))
|
||||
self.label_5.setText(_translate("Form", "TextLabel", None))
|
||||
self.label_522.setText(_translate("Form", "λ", None))
|
||||
self.label_112.setText(_translate("Form", "s", None))
|
||||
self.label_9.setText(_translate("Form", "TextLabel", None))
|
||||
self.label_6.setText(_translate("Form", "TextLabel", None))
|
||||
self.label_type.setText(_translate("Form", "Type", None))
|
||||
self.label_huh.setText(_translate("Form", "N/A", None))
|
||||
self.label_2.setText(_translate("Form", "TextLabel", None))
|
||||
self.label_102.setText(_translate("Form", "g", None))
|
||||
self.label_222.setText(_translate("Form", "<html><head/><body><p>τ<span style=\" vertical-align:sub;\">α</span></p></body></html>", None))
|
||||
self.label_322.setText(_translate("Form", "α", None))
|
||||
self.label_8.setText(_translate("Form", "TextLabel", None))
|
||||
self.label_1.setText(_translate("Form", "TextLabel", None))
|
||||
self.label_3.setText(_translate("Form", "TextLabel", None))
|
||||
self.label_82.setText(_translate("Form", "b", None))
|
||||
self.label_622.setText(_translate("Form", "<html><head/><body><p>τ<span style=\" vertical-align:sub;\">β</span></p></body></html>", None))
|
||||
self.label_7.setText(_translate("Form", "TextLabel", None))
|
||||
self.label_72.setText(_translate("Form", "a", None))
|
||||
self.label_23.setText(_translate("Form", "Fix", None))
|
||||
self.comboBox.setItemText(0, _translate("Form", "GG", None))
|
||||
self.comboBox.setItemText(1, _translate("Form", "GGe", None))
|
||||
self.comboBox.setItemText(2, _translate("Form", "Gb", None))
|
||||
self.comboBox.setItemText(3, _translate("Form", "GG + b", None))
|
||||
self.comboBox.setItemText(4, _translate("Form", "GGe + b", None))
|
||||
self.removeButton.setText(_translate("Form", "Remove", None))
|
||||
self.configButton.setText(_translate("Form", "Configure", None))
|
||||
|
479
src/ui/YAFFparameters.ui
Normal file
@ -0,0 +1,479 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Form</class>
|
||||
<widget class="QWidget" name="Form">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>300</width>
|
||||
<height>322</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<item row="3" column="3">
|
||||
<widget class="QCheckBox" name="checkBox_2">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3">
|
||||
<widget class="QCheckBox" name="checkBox_1">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QLabel" name="label_422">
|
||||
<property name="text">
|
||||
<string>β</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="13" column="2">
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_1"/>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_4">
|
||||
<property name="singleStep">
|
||||
<double>0.050000000000000</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_111">
|
||||
<property name="text">
|
||||
<string>Δε</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="2">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="1">
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_6"/>
|
||||
</item>
|
||||
<item row="8" column="2">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<widget class="QLabel" name="label_522">
|
||||
<property name="text">
|
||||
<string>λ</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="0">
|
||||
<widget class="QLabel" name="label_112">
|
||||
<property name="text">
|
||||
<string>s</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="2">
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="2">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_type">
|
||||
<property name="text">
|
||||
<string>Type</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_3">
|
||||
<property name="singleStep">
|
||||
<double>0.050000000000000</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_huh">
|
||||
<property name="text">
|
||||
<string>N/A</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="13" column="0">
|
||||
<widget class="QLabel" name="label_102">
|
||||
<property name="text">
|
||||
<string>g</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_222">
|
||||
<property name="text">
|
||||
<string><html><head/><body><p>τ<span style=" vertical-align:sub;">α</span></p></body></html></string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_322">
|
||||
<property name="text">
|
||||
<string>α</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="1">
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_9">
|
||||
<property name="minimum">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="2">
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QLabel" name="label_1">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="2">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="0">
|
||||
<widget class="QLabel" name="label_82">
|
||||
<property name="text">
|
||||
<string>b</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="0">
|
||||
<widget class="QLabel" name="label_622">
|
||||
<property name="text">
|
||||
<string><html><head/><body><p>τ<span style=" vertical-align:sub;">β</span></p></body></html></string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="1">
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_7">
|
||||
<property name="singleStep">
|
||||
<double>0.050000000000000</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="2">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0">
|
||||
<widget class="QLabel" name="label_72">
|
||||
<property name="text">
|
||||
<string>a</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="1">
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_8">
|
||||
<property name="singleStep">
|
||||
<double>0.050000000000000</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="13" column="1">
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_10">
|
||||
<property name="maximum">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>0.050000000000000</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="1">
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_5">
|
||||
<property name="singleStep">
|
||||
<double>0.050000000000000</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>0.800000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_2"/>
|
||||
</item>
|
||||
<item row="7" column="3">
|
||||
<widget class="QCheckBox" name="checkBox_4">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="3">
|
||||
<widget class="QCheckBox" name="checkBox_3">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="3">
|
||||
<widget class="QCheckBox" name="checkBox_5">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="3">
|
||||
<widget class="QCheckBox" name="checkBox_6">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="3">
|
||||
<widget class="QCheckBox" name="checkBox_7">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="3">
|
||||
<widget class="QCheckBox" name="checkBox_8">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="3">
|
||||
<widget class="QCheckBox" name="checkBox_9">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="13" column="3">
|
||||
<widget class="QCheckBox" name="checkBox_10">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QLabel" name="label_23">
|
||||
<property name="text">
|
||||
<string>Fix</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="comboBox_2"/>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="comboBox">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>GG</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>GGe</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Gb</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>GG + b</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>GGe + b</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QPushButton" name="removeButton">
|
||||
<property name="text">
|
||||
<string>Remove</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QPushButton" name="configButton">
|
||||
<property name="text">
|
||||
<string>Configure</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
0
src/ui/__init__.py
Normal file
1
src/ui/icons/add_cond.qrc
Normal file
@ -0,0 +1 @@
|
||||
<RCC/>
|
3
src/ui/icons/add_cond.svg
Normal file
@ -0,0 +1,3 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xl="http://www.w3.org/1999/xlink" version="1.1" viewBox="102 191 152 150" width="152pt" height="150pt"><metadata xmlns:dc="http://purl.org/dc/elements/1.1/"><dc:date>2013-03-01 13:11Z</dc:date><!-- Produced by OmniGraffle Professional 4.1.2 --></metadata><defs></defs><g stroke="none" stroke-opacity="1" stroke-dasharray="none" fill="none" fill-opacity="1"><title>Arbeitsfläche 1</title><g><title>Ebene 1</title><path d="M 178.41034 197.98326 L 227.43484 197.98326 C 236.27141 197.98326 243.43484 205.1467 243.43484 213.98326 L 243.43484 309.98425 C 243.43484 318.8208 236.27141 325.98425 227.43484 325.98425 L 129.38583 325.98425 C 120.54928 325.98425 113.385834 318.8208 113.385834 309.98425 L 113.385834 213.98326 C 113.385834 205.1467 120.54928 197.98326 129.38583 197.98326 Z" fill="White"/><path d="M 178.41034 197.98326 L 227.43484 197.98326 C 236.27141 197.98326 243.43484 205.1467 243.43484 213.98326 L 243.43484 309.98425 C 243.43484 318.8208 236.27141 325.98425 227.43484 325.98425 L 129.38583 325.98425 C 120.54928 325.98425 113.385834 318.8208 113.385834 309.98425 L 113.385834 213.98326 C 113.385834 205.1467 120.54928 197.98326 129.38583 197.98326 Z" stroke="Black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><line x1="135.89085" y1="226.32942" x2="220.92984" y2="297.19556" stroke="Black" stroke-linecap="round" stroke-linejoin="round" stroke-width="9"/><path d="M 192.58383 226.33257 L 206.7599 226.33257 L 206.7599 212.1565 L 220.92747 212.1565 L 220.92747 226.33257 L 235.10355 226.33257 L 235.10355 240.50014 L 220.92747 240.50014 L 220.92747 254.67621 L 206.7599 254.67621 L 206.7599 240.50014 L 192.58383 240.50014 Z" fill="#fdca00"/><path d="M 192.58383 226.33257 L 206.7599 226.33257 L 206.7599 212.1565 L 220.92747 212.1565 L 220.92747 226.33257 L 235.10355 226.33257 L 235.10355 240.50014 L 220.92747 240.50014 L 220.92747 254.67621 L 206.7599 254.67621 L 206.7599 240.50014 L 192.58383 240.50014 Z" stroke="Black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/></g></g></svg>
|
After Width: | Height: | Size: 2.2 KiB |
BIN
src/ui/icons/add_eps_infty.png
Normal file
After Width: | Height: | Size: 17 KiB |
3
src/ui/icons/add_eps_infty.svg
Normal file
@ -0,0 +1,3 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xl="http://www.w3.org/1999/xlink" version="1.1" viewBox="312 362 153 150" width="153pt" height="150pt"><metadata xmlns:dc="http://purl.org/dc/elements/1.1/"><dc:date>2014-03-20 13:32Z</dc:date><!-- Produced by OmniGraffle Professional 4.1.2 --></metadata><defs></defs><g stroke="none" stroke-opacity="1" stroke-dasharray="none" fill="none" fill-opacity="1"><title>Arbeitsfläche 1</title><rect fill="White" width="561.31995" height="808.31995"/><g><title>Ebene 1</title><path d="M 388.5188 368.50403 L 437.5433 368.50403 C 446.37985 368.50403 453.5433 375.66748 453.5433 384.50403 L 453.5433 480.505 C 453.5433 489.34155 446.37985 496.505 437.5433 496.505 L 339.4943 496.505 C 330.65775 496.505 323.4943 489.34155 323.4943 480.505 L 323.4943 384.50403 C 323.4943 375.66748 330.65775 368.50403 339.4943 368.50403 Z" fill="White"/><path d="M 388.5188 368.50403 L 437.5433 368.50403 C 446.37985 368.50403 453.5433 375.66748 453.5433 384.50403 L 453.5433 480.505 C 453.5433 489.34155 446.37985 496.505 437.5433 496.505 L 339.4943 496.505 C 330.65775 496.505 323.4943 489.34155 323.4943 480.505 L 323.4943 384.50403 C 323.4943 375.66748 330.65775 368.50403 339.4943 368.50403 Z" stroke="Black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><line x1="438.04422" y1="469.15857" x2="341.66626" y2="469.3151" stroke="Black" stroke-linecap="round" stroke-linejoin="round" stroke-width="9"/><path d="M 402.6923 396.8531 L 416.86838 396.8531 L 416.86838 382.677 L 431.03592 382.677 L 431.03592 396.8531 L 445.212 396.8531 L 445.212 411.02063 L 431.03592 411.02063 L 431.03592 425.19672 L 416.86838 425.19672 L 416.86838 411.02063 L 402.6923 411.02063 Z" fill="#fdca00"/><path d="M 402.6923 396.8531 L 416.86838 396.8531 L 416.86838 382.677 L 431.03592 382.677 L 431.03592 396.8531 L 445.212 396.8531 L 445.212 411.02063 L 431.03592 411.02063 L 431.03592 425.19672 L 416.86838 425.19672 L 416.86838 411.02063 L 402.6923 411.02063 Z" stroke="Black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><rect x="345.66754" y="405.88412" width="82.20343" height="49.7547" id="path"/><clipPath id="clip_path"><use xl:href="#path"/></clipPath><g clip-path="url(#clip_path)"><image xl:href="image5.pdf" width="38" height="23" transform="translate(345.16754 405.38412) scale(2.1632487)"/></g></g></g></svg>
|
After Width: | Height: | Size: 2.4 KiB |
1
src/ui/icons/add_peak.qrc
Normal file
@ -0,0 +1 @@
|
||||
<RCC/>
|
3
src/ui/icons/add_peak.svg
Normal file
@ -0,0 +1,3 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xl="http://www.w3.org/1999/xlink" version="1.1" viewBox="102 36 152 150" width="152pt" height="150pt"><metadata xmlns:dc="http://purl.org/dc/elements/1.1/"><dc:date>2013-03-01 13:11Z</dc:date><!-- Produced by OmniGraffle Professional 4.1.2 --></metadata><defs></defs><g stroke="none" stroke-opacity="1" stroke-dasharray="none" fill="none" fill-opacity="1"><title>Arbeitsfläche 1</title><g><title>Ebene 1</title><path d="M 178.41046 42.519676 L 227.43509 42.519676 C 236.27165 42.519676 243.43509 49.68312 243.43509 58.519676 L 243.43509 154.520935 C 243.43509 163.3575 236.27165 170.52094 227.43509 170.52094 L 129.38583 170.52094 C 120.54928 170.52094 113.385834 163.3575 113.385834 154.520935 L 113.385834 58.519676 C 113.385834 49.68312 120.54928 42.519676 129.38583 42.519676 Z" fill="White"/><path d="M 178.41046 42.519676 L 227.43509 42.519676 C 236.27165 42.519676 243.43509 49.68312 243.43509 58.519676 L 243.43509 154.520935 C 243.43509 163.3575 236.27165 170.52094 227.43509 170.52094 L 129.38583 170.52094 C 120.54928 170.52094 113.385834 163.3575 113.385834 154.520935 L 113.385834 58.519676 C 113.385834 49.68312 120.54928 42.519676 129.38583 42.519676 Z" stroke="Black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><path d="M 135.89075 141.73227 C 150.06256 122.83652 164.23862 85.03935 178.41043 85.03935 C 192.58224 85.03935 206.7583 122.83652 220.9301 141.73227" stroke="Black" stroke-linecap="round" stroke-linejoin="round" stroke-width="9"/><path d="M 192.58359 70.868958 L 206.75966 70.868958 L 206.75966 56.692894 L 220.92723 56.692894 L 220.92723 70.868958 L 235.1033 70.868958 L 235.1033 85.03653 L 220.92723 85.03653 L 220.92723 99.212593 L 206.75966 99.212593 L 206.75966 85.03653 L 192.58359 85.03653 Z" fill="#fdca00"/><path d="M 192.58359 70.868958 L 206.75966 70.868958 L 206.75966 56.692894 L 220.92723 56.692894 L 220.92723 70.868958 L 235.1033 70.868958 L 235.1033 85.03653 L 220.92723 85.03653 L 220.92723 99.212593 L 206.75966 99.212593 L 206.75966 85.03653 L 192.58359 85.03653 Z" stroke="Black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/></g></g></svg>
|
After Width: | Height: | Size: 2.2 KiB |
BIN
src/ui/icons/add_yaff.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
src/ui/icons/append_save_fit.png
Normal file
After Width: | Height: | Size: 18 KiB |
3
src/ui/icons/append_save_fit.svg
Normal file
@ -0,0 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xl="http://www.w3.org/1999/xlink" version="1.1" viewBox="104 676 143 141" width="143pt" height="141pt" xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata> Produced by OmniGraffle 6.1.1 <dc:date>2015-01-09 11:14:36 +0000</dc:date></metadata><defs><filter id="Shadow" filterUnits="userSpaceOnUse"><feGaussianBlur in="SourceAlpha" result="blur" stdDeviation="1.308"/><feOffset in="blur" result="offset" dx="0" dy="2"/><feFlood flood-color="black" flood-opacity=".5" result="flood"/><feComposite in="flood" in2="offset" operator="in" result="color"/><feMerge><feMergeNode in="color"/><feMergeNode in="SourceGraphic"/></feMerge></filter><font-face font-family="Verdana" font-size="44" panose-1="2 11 8 4 3 5 4 4 2 4" units-per-em="1000" underline-position="-67.871094" underline-thickness="103.027344" slope="0" x-height="548.33984" cap-height="727.0508" ascent="1005.3711" descent="-209.96094" font-weight="bold"><font-face-src><font-face-name name="Verdana-Bold"/></font-face-src></font-face></defs><g stroke="none" stroke-opacity="1" stroke-dasharray="none" fill="none" fill-opacity="1"><title>Arbeitsfläche 1</title><g><title>Ebene 1</title><g filter="url(#Shadow)"><path d="M 126.89588 680.31496 L 224.94488 680.31496 C 233.78144 680.31496 240.94488 687.4784 240.94488 696.31496 L 240.94488 792.31597 C 240.94488 801.1525 233.78144 808.31597 224.94488 808.31597 L 126.89588 808.31597 C 118.059324 808.31597 110.89588 801.1525 110.89588 792.31597 L 110.89588 696.31496 C 110.89588 687.4784 118.059324 680.31496 126.89588 680.31496 Z" fill="white"/><path d="M 126.89588 680.31496 L 224.94488 680.31496 C 233.78144 680.31496 240.94488 687.4784 240.94488 696.31496 L 240.94488 792.31597 C 240.94488 801.1525 233.78144 808.31597 224.94488 808.31597 L 126.89588 808.31597 C 118.059324 808.31597 110.89588 801.1525 110.89588 792.31597 L 110.89588 696.31496 C 110.89588 687.4784 118.059324 680.31496 126.89588 680.31496 Z" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/></g><text transform="translate(116.42088 739.70097)" fill="black"><tspan font-family="Verdana" font-size="44" font-weight="bold" x=".26757812" y="44" textLength="118.464844">Save</tspan></text><path d="M 184.25197 708.66424 L 198.42804 708.66424 L 198.42804 694.48817 L 212.5956 694.48817 L 212.5956 708.66424 L 226.77167 708.66424 L 226.77167 722.8318 L 212.5956 722.8318 L 212.5956 737.00787 L 198.42804 737.00787 L 198.42804 722.8318 L 184.25197 722.8318 Z" fill="#fdca00"/><path d="M 184.25197 708.66424 L 198.42804 708.66424 L 198.42804 694.48817 L 212.5956 694.48817 L 212.5956 708.66424 L 226.77167 708.66424 L 226.77167 722.8318 L 212.5956 722.8318 L 212.5956 737.00787 L 198.42804 737.00787 L 198.42804 722.8318 L 184.25197 722.8318 Z" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/></g></g></svg>
|
After Width: | Height: | Size: 3.0 KiB |
BIN
src/ui/icons/border-1d-left-icon.png
Normal file
After Width: | Height: | Size: 320 B |
BIN
src/ui/icons/border-1d-right-icon.png
Normal file
After Width: | Height: | Size: 304 B |
BIN
src/ui/icons/fit_limits.png
Normal file
After Width: | Height: | Size: 22 KiB |
1
src/ui/icons/fit_limits.qrc
Normal file
@ -0,0 +1 @@
|
||||
<RCC/>
|
3
src/ui/icons/fit_limits.svg
Normal file
@ -0,0 +1,3 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xl="http://www.w3.org/1999/xlink" version="1.1" viewBox="320 184 152 150" width="152pt" height="150pt"><metadata xmlns:dc="http://purl.org/dc/elements/1.1/"><dc:date>2013-03-01 13:15Z</dc:date><!-- Produced by OmniGraffle Professional 4.1.2 --></metadata><defs><filter id="Shadow" filterUnits="userSpaceOnUse"><feGaussianBlur in="SourceAlpha" result="blur" stdDeviation="3.488"/><feOffset in="blur" result="offset" dx="0" dy="4"/><feFlood flood-color="Black" flood-opacity=".75" result="flood"/><feComposite in="flood" in2="offset" operator="in"/></filter></defs><g stroke="none" stroke-opacity="1" stroke-dasharray="none" fill="none" fill-opacity="1"><title>Arbeitsfläche 1</title><g><title>Ebene 1</title><g><use xl:href="#id23_Graphic" filter="url(#Shadow)"/></g><g id="id23_Graphic"><path d="M 396.35043 191.11728 L 445.37494 191.11728 C 454.2115 191.11728 461.37494 198.28072 461.37494 207.11728 L 461.37494 303.11829 C 461.37494 311.95483 454.2115 319.11829 445.37494 319.11829 L 347.32593 319.11829 C 338.48938 319.11829 331.32593 311.95483 331.32593 303.11829 L 331.32593 207.11728 C 331.32593 198.28072 338.48938 191.11728 347.32593 191.11728 Z" stroke="Black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/></g></g></g></svg>
|
After Width: | Height: | Size: 1.4 KiB |
12
src/ui/icons/images.qrc
Normal file
@ -0,0 +1,12 @@
|
||||
<RCC>
|
||||
<qresource prefix="icons">
|
||||
<file>add_cond.svg</file>
|
||||
<file>append_save_fit.png</file>
|
||||
<file>add_yaff.png</file>
|
||||
<file>add_eps_infty.png</file>
|
||||
<file>qds_fit_abort.png</file>
|
||||
<file>add_peak.svg</file>
|
||||
<file>fit_limits.png</file>
|
||||
<file>save_fit.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
BIN
src/ui/icons/qds_fit_abort.png
Normal file
After Width: | Height: | Size: 9.1 KiB |
BIN
src/ui/icons/qds_icons.graffle
Normal file
3
src/ui/icons/qds_icons.svg
Normal file
@ -0,0 +1,3 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xl="http://www.w3.org/1999/xlink" version="1.1" viewBox="102 36 152 150" width="152pt" height="150pt"><metadata xmlns:dc="http://purl.org/dc/elements/1.1/"><dc:date>2013-03-01 13:07Z</dc:date><!-- Produced by OmniGraffle Professional 4.1.2 --></metadata><defs></defs><g stroke="none" stroke-opacity="1" stroke-dasharray="none" fill="none" fill-opacity="1"><title>Arbeitsfläche 1</title><g><title>Ebene 1</title><path d="M 178.41046 42.519676 L 227.43509 42.519676 C 236.27165 42.519676 243.43509 49.68312 243.43509 58.519676 L 243.43509 154.520935 C 243.43509 163.3575 236.27165 170.52094 227.43509 170.52094 L 129.38583 170.52094 C 120.54928 170.52094 113.385834 163.3575 113.385834 154.520935 L 113.385834 58.519676 C 113.385834 49.68312 120.54928 42.519676 129.38583 42.519676 Z" fill="White"/><path d="M 178.41046 42.519676 L 227.43509 42.519676 C 236.27165 42.519676 243.43509 49.68312 243.43509 58.519676 L 243.43509 154.520935 C 243.43509 163.3575 236.27165 170.52094 227.43509 170.52094 L 129.38583 170.52094 C 120.54928 170.52094 113.385834 163.3575 113.385834 154.520935 L 113.385834 58.519676 C 113.385834 49.68312 120.54928 42.519676 129.38583 42.519676 Z" stroke="Black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><path d="M 135.89075 141.73227 C 150.06256 122.83652 164.23862 85.03935 178.41043 85.03935 C 192.58224 85.03935 206.7583 122.83652 220.9301 141.73227" stroke="Black" stroke-linecap="round" stroke-linejoin="round" stroke-width="9"/><path d="M 192.58359 70.868958 L 206.75966 70.868958 L 206.75966 56.692894 L 220.92723 56.692894 L 220.92723 70.868958 L 235.1033 70.868958 L 235.1033 85.03653 L 220.92723 85.03653 L 220.92723 99.212593 L 206.75966 99.212593 L 206.75966 85.03653 L 192.58359 85.03653 Z" fill="#fdca00"/><path d="M 192.58359 70.868958 L 206.75966 70.868958 L 206.75966 56.692894 L 220.92723 56.692894 L 220.92723 70.868958 L 235.1033 70.868958 L 235.1033 85.03653 L 220.92723 85.03653 L 220.92723 99.212593 L 206.75966 99.212593 L 206.75966 85.03653 L 192.58359 85.03653 Z" stroke="Black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/></g></g></svg>
|
After Width: | Height: | Size: 2.2 KiB |
BIN
src/ui/icons/save_fit.png
Normal file
After Width: | Height: | Size: 18 KiB |
1
src/ui/icons/save_fit.qrc
Normal file
@ -0,0 +1 @@
|
||||
<RCC/>
|
6
src/ui/icons/save_fit.svg
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xl="http://www.w3.org/1999/xlink" version="1.1" viewBox="84 362 152 150" width="152pt" height="150pt"><metadata xmlns:dc="http://purl.org/dc/elements/1.1/"><dc:date>2013-03-13 14:15Z</dc:date><!-- Produced by OmniGraffle Professional 4.1.2 --></metadata><defs><font-face font-size="44pt" units-per-em="1000" underline-position="-67.871094" underline-thickness="103.027344" slope="0" x-height="556.81818" cap-height="738.63635" ascent="1005.37103" descent="-209.96094" font-weight="bold"><!--{
|
||||
NSFontNameAttribute = "Verdana-Bold";
|
||||
NSFontSizeAttribute = 44;
|
||||
}--><font-face-src><font-face-name name="Verdana-Bold"/></font-face-src></font-face></defs><g stroke="none" stroke-opacity="1" stroke-dasharray="none" fill="none" fill-opacity="1"><title>Arbeitsfläche 1</title><rect fill="White" width="571" height="822"/><g><title>Ebene 1</title><path d="M 159.88599 368.50403 L 208.91049 368.50403 C 217.74706 368.50403 224.91049 375.66748 224.91049 384.50403 L 224.91049 480.505 C 224.91049 489.34155 217.74706 496.505 208.91049 496.505 L 110.861504 496.505 C 102.02495 496.505 94.861504 489.34155 94.861504 480.505 L 94.861496 384.50403 C 94.861496 375.66748 102.02494 368.50403 110.861496 368.50403 Z" fill="White"/><path d="M 159.88599 368.50403 L 208.91049 368.50403 C 217.74706 368.50403 224.91049 375.66748 224.91049 384.50403 L 224.91049 480.505 C 224.91049 489.34155 217.74706 496.505 208.91049 496.505 L 110.861504 496.505 C 102.02495 496.505 94.861504 489.34155 94.861504 480.505 L 94.861496 384.50403 C 94.861496 375.66748 102.02494 368.50403 110.861496 368.50403 Z" stroke="Black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><path d="M 174.05899 396.8531 L 188.23506 396.8531 L 188.23506 382.677 L 202.40263 382.677 L 202.40263 396.8531 L 216.5787 396.8531 L 216.5787 411.02063 L 202.40263 411.02063 L 202.40263 425.19672 L 188.23506 425.19672 L 188.23506 411.02063 L 174.05899 411.02063 Z" fill="#fdca00"/><path d="M 174.05899 396.8531 L 188.23506 396.8531 L 188.23506 382.677 L 202.40263 382.677 L 202.40263 396.8531 L 216.5787 396.8531 L 216.5787 411.02063 L 202.40263 411.02063 L 202.40263 425.19672 L 188.23506 425.19672 L 188.23506 411.02063 L 174.05899 411.02063 Z" stroke="Black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(118.386 427.89001)" fill="Black"><tspan font-size="44pt" font-weight="bold" x=".18554688" y="44" textLength="82.628906">FIT</tspan></text></g></g></svg>
|
After Width: | Height: | Size: 2.6 KiB |