def __init__(self, name='Template', parent=None): """ **Constructor** Keyword Arguments: - name {[type]} -- [description] (default: {'Template'}) - parent {[type]} -- [description] (default: {None}) """ # IMPORT THEORIES # Import theories specific to the Application e.g.: # from TheoryTemplate import TheoryA super().__init__(name, parent, nplot_max=1) # VIEWS # set the views that can be selected in the view combobox self.views['y(x)'] = View(name='y(x)', description='y as a function of x', x_label='x', y_label='y(x)', x_units='-', y_units='-', log_x=False, log_y=False, view_proc=self.viewyx, n=1, snames=['y(x)']) # set multiviews # default view order in multiplot views, set nplots=1 for single view self.nplots = 1 self.multiviews = [] for i in range(self.nplot_max): # set views in the same order as declared above self.multiviews.append(list(self.views.values())[i]) self.multiplots.reorg_fig(self.nplots) # FILES # set the type of files that ApplicationTemplate can open ftype = TXTColumnFile(name='content of files', extension='txt', description='description of the file type', col_names=['col1', 'col2'], basic_file_parameters=['param1', 'param2'], col_units=['units_col1', 'units_col2']) self.filetypes[ ftype.extension] = ftype #add each the file type to dictionary # THEORIES # add the theories related to ApplicationTemplate to the dictionary, e.g.: # self.theories[TheoryA.thname] = TheoryA # self.theories[TheoryB.thname] = TheoryB self.add_common_theories() # Add basic theories to the application #set the current view self.set_views()
def __init__(self, name="MWD", parent=None): """ **Constructor** Keyword Arguments: - name {[type]} -- [description] (default: {"MWD"}) - parent {[type]} -- [description] (default: {None}) """ from TheoryDiscrMWD import TheoryDiscrMWD from TheoryGEX import TheoryGEX from TheoryLogNormal import TheoryLogNormal super().__init__(name, parent, nplot_max=3) # VIEWS self.views["log-lin"] = View(name="log-lin", description="MWD lin W vs log M", x_label="M", y_label="dW/dlogM", x_units="g/mol", y_units="-", log_x=True, log_y=False, view_proc=self.view_WM, n=1, snames=["W"]) self.views["log-log"] = View(name="log-log", description="MWD log W vs log M", x_label="log(M)", y_label="log(dW/dlogM)", x_units="g/mol", y_units="-", log_x=False, log_y=False, view_proc=self.view_logWM, n=1, snames=["log(W)"]) self.views["lin-lin"] = View(name="lin-lin", description="MWD lin W vs lin M", x_label="M", y_label="dW/dlogM", x_units="g/mol", y_units="-", log_x=False, log_y=False, view_proc=self.view_WM, n=1, snames=["W"]) #set multiviews self.nplots = 1 self.multiviews = [] for i in range(self.nplot_max): # set views in the same order as declared above self.multiviews.append(list(self.views.values())[i]) self.multiplots.reorg_fig(self.nplots) # FILES ftype = TXTColumnFile("GPC Files", "gpc", "Molecular Weight Distribution", ['M', 'W(logM)'], ['Mn', 'Mw', 'PDI'], ["g/mol", '-']) #ftype=TXTColumnFile("GPC Files", "gpc", "Molecular Weight Distribution", ['M','W(logM)'], [], ['kDa', '-']) self.filetypes[ftype.extension] = ftype ftype = TXTColumnFile("React Files", "reac", "Relaxation modulus", ['M', 'W(logM)', 'g', 'br/1000C'], ['Mn', 'Mw', 'PDI'], ["g/mol", '-']) self.filetypes[ftype.extension] = ftype # THEORIES self.theories[TheoryDiscrMWD.thname] = TheoryDiscrMWD self.theories[TheoryGEX.thname] = TheoryGEX self.theories[TheoryLogNormal.thname] = TheoryLogNormal self.add_common_theories() #set the current view self.set_views()
def __init__(self, name="Gt", parent=None): """ **Constructor** Keyword Arguments: - name {[type]} -- [description] (default: {"Gt"}) - parent {[type]} -- [description] (default: {None}) """ from TheoryMaxwellModes import TheoryMaxwellModesTime from TheoryRouse import TheoryRouseTime from TheoryDTDStars import TheoryDTDStarsTime super().__init__(name, parent) # time range for view conversion to frequency domain self.tmin_view = -np.inf self.tmax_view = np.inf # VIEWS self.views["log(G(t))"] = View(name="log(G(t))", description="log Relaxation modulus", x_label="log(t)", y_label="log(G)", x_units="s", y_units="Pa", log_x=False, log_y=False, view_proc=self.viewLogGt, n=1, snames=["log(G)"]) self.views["i-Rheo G',G''"] = View( name="i-Rheo G',G''", description="G', G'' from i-Rheo transformation of G(t)", x_label="$\omega$", y_label="G',G''", x_units="rad/s", y_units="Pa", log_x=True, log_y=True, view_proc=self.viewiRheo, n=2, snames=["G'", "G''"]) self.views["i-Rheo-Over G',G''"] = View( name="i-Rheo-Over G',G''", description= "G', G'' from i-Rheo transformation of G(t) with Oversampling", x_label="$\omega$", y_label="G',G''", x_units="rad/s", y_units="Pa", log_x=True, log_y=True, view_proc=self.viewiRheoOver, n=2, snames=["G'", "G''"]) self.views["Schwarzl G',G''"] = View( name="Schwarzl G',G''", description="G', G'' from Schwarzl transformation of G(t)", x_label="$\omega$", y_label="G',G''", x_units="rad/s", y_units="Pa", log_x=True, log_y=True, view_proc=self.viewSchwarzl_Gt, n=2, snames=["G'", "G''"]) self.views["G(t)"] = View(name="G(t)", description="Relaxation modulus", x_label="t", y_label="G", x_units="s", y_units="Pa", log_x=True, log_y=True, view_proc=self.viewGt, n=1, snames=["G"]) self.OVER = 100 # initial oversampling self.MIN_OVER = 1 # min oversampling self.MAX_OVER = 10000 # max oversampling #set multiviews self.multiviews = [ self.views["log(G(t))"], self.views["i-Rheo G',G''"] ] #default view order in multiplot views, set only one item for single view self.nplots = len(self.multiviews) #set multiviews self.nplots = 2 self.multiviews = [] for i in range(self.nplot_max): # set views in the same order as declared above self.multiviews.append(list(self.views.values())[i]) self.multiplots.reorg_fig(self.nplots) # FILES ftype = TXTColumnFile("G(t) files", "gt", "Relaxation modulus", ['t', 'Gt'], ['Mw', 'gamma'], ['s', 'Pa']) self.filetypes[ftype.extension] = ftype # THEORIES self.theories[TheoryMaxwellModesTime.thname] = TheoryMaxwellModesTime self.theories[TheoryRouseTime.thname] = TheoryRouseTime self.theories[TheoryDTDStarsTime.thname] = TheoryDTDStarsTime self.add_common_theories() #set the current view self.set_views()
def __init__(self, name="Creep", parent=None): """ **Constructor** Keyword Arguments: - name {[type]} -- [description] (default: {"Creep"}) - parent {[type]} -- [description] (default: {None}) """ from TheoryRetardationModes import TheoryRetardationModesTime super().__init__(name, parent) # time range for view conversion to frequency domain self.eta = 10000 self.tmin_view = -np.inf self.tmax_view = np.inf # VIEWS self.views["log(gamma(t))"] = View(name="log(gamma(t))", description="log strain", x_label="log(t)", y_label="log($\gamma$)", x_units="s", y_units="-", log_x=False, log_y=False, view_proc=self.viewLogStraint, n=1, snames=["log(gamma)"]) self.views["gamma(t)"] = View(name="gamma(t)", description="strain", x_label="t", y_label="$\gamma$", x_units="s", y_units="-", log_x=True, log_y=True, view_proc=self.viewStraint, n=1, snames=["gamma"]) self.views["log(J(t))"] = View(name="log(J(t))", description="creep compliance", x_label="log(t)", y_label="log(J)", x_units="s", y_units="$\mathrm{Pa}^{-1}$", log_x=False, log_y=False, view_proc=self.viewLogJt, n=1, snames=["log(J)"]) self.views["J(t)"] = View(name="J(t)", description="creep compliance", x_label="t", y_label="J", x_units="s", y_units="$\mathrm{Pa}^{-1}$", log_x=True, log_y=True, view_proc=self.viewJt, n=1, snames=["J"]) self.views["t/J(t)"] = View(name="t/J(t)", description="t/creep compliance", x_label="t", y_label="t/J", x_units="s", y_units="Pa.s", log_x=True, log_y=True, view_proc=self.viewt_Jt, n=1, snames=["t/J"]) self.views["i-Rheo G',G''"] = View( name="i-Rheo G',G''", description="G', G'' from i-Rheo transformation of J(t)", x_label="$\omega$", y_label="G',G''", x_units="rad/s", y_units="Pa", log_x=True, log_y=True, view_proc=self.viewiRheo, n=2, snames=["G'", "G''"]) self.views["i-Rheo-Over G',G''"] = View( name="i-Rheo-Over G',G''", description= "G', G'' from i-Rheo transformation of J(t) with Oversampling", x_label="$\omega$", y_label="G',G''", x_units="rad/s", y_units="Pa", log_x=True, log_y=True, view_proc=self.viewiRheoOver, n=2, snames=["G'", "G''"]) self.OVER = 100 # initial oversampling self.MIN_OVER = 1 # min oversampling self.MAX_OVER = 10000 # max oversampling #set multiviews self.nplots = 1 self.multiviews = [] for i in range(self.nplot_max): # set views in the same order as declared above self.multiviews.append(list(self.views.values())[i]) self.multiplots.reorg_fig(self.nplots) # FILES ftype = TXTColumnFile("Creep files", "creep", "Creep files", ['t', 'strain'], ['stress', 'Mw', 'T'], ['s', '-', 'Pa', 'C']) self.filetypes[ftype.extension] = ftype # THEORIES self.theories[ TheoryRetardationModesTime.thname] = TheoryRetardationModesTime self.add_common_theories() #set the current view self.set_views()
def __init__(self, name="SANS", parent=None): """ **Constructor** Keyword Arguments: - name {[type]} -- [description] (default: {"SANS"}) - parent {[type]} -- [description] (default: {None}) """ from TheoryDebye import TheoryDebye super().__init__(name, parent) # VIEWS self.views["log(I(q))"] = View( name="log(I(q))", description="log Intensity", x_label="log(q)", y_label="log(I)", x_units="$\mathrm{\AA}^{-1}$", y_units="-", log_x=False, log_y=False, view_proc=self.viewLogSANS, n=1, snames=["log(I)"]) self.views["I(q)"] = View( name="I(q)", description="Intensity", x_label="q", y_label="I", x_units="$\mathrm{\AA}^{-1}$", y_units="-", log_x=False, log_y=False, view_proc=self.viewSANS, n=1, snames=["I"]) self.views["Zimm"] = View( name="Zimm", description="Zimm plot (1/I(q) vs q^2)", x_label="$\mathrm{q}^2$", y_label="1/I", x_units="$\mathrm{\AA}^{-2}$", y_units="-", log_x=False, log_y=False, view_proc=self.viewZimm, n=1, snames=["1/I"]) self.views["Kratky"] = View( name="Kratky", description="Kratky plot (q^2*I(q) vs q)", x_label="q", y_label="$\mathrm{q}^2\cdot \mathrm{I}$", x_units="$\mathrm{\AA}^{-1}$", y_units="$\mathrm{\AA}^{-2}$", log_x=False, log_y=False, view_proc=self.viewKratky, n=1, snames=["q2*I"]) #set multiviews self.nplots = 1 self.multiviews = [] for i in range(self.nplot_max): # set views in the same order as declared above self.multiviews.append(list(self.views.values())[i]) self.multiplots.reorg_fig(self.nplots) # FILES ftype = TXTColumnFile("SANS files", "sans", "SANS files", ['q', 'I(q)'], ['Mw', 'Phi'], ['1/A', '-']) self.filetypes[ftype.extension] = ftype # THEORIES self.theories[ TheoryDebye.thname] = TheoryDebye self.add_common_theories() #set the current view self.set_views()
def __init__(self, name='LAOS', parent=None, nplots=1, ncols=2): """ **Constructor** Keyword Arguments: - name {[type]} -- [description] (default: {'LAOS'}) - parent {[type]} -- [description] (default: {None}) """ # IMPORT THEORIES # Import theories specific to the Application e.g.: # from TheoryLAOS import TheoryA super().__init__(name, parent, nplot_max=1) # VIEWS # set the views that can be selected in the view combobox self.views['sigma(gamma)'] = View( name='sigma(gamma)', description='Stress as a function of strain', x_label='$\gamma(t)$', y_label='$\sigma(t)$', x_units='-', y_units='Pa', log_x=False, log_y=False, view_proc=self.view_sigmagamma, n=1, snames=['$\sigma(t)$']) # self.views['sigma(gdot)'] = View( # name='sigma(gdot)', # description='Stress as a function of shear rate', # x_label='$\dot\gamma(t)$', # y_label='$\sigma(t)$', # x_units='s$^{-1}$', # y_units='Pa', # log_x=False, # log_y=False, # view_proc=self.view_sigmagdot, # n=1, # snames=['$\sigma(t)$']) #set multiviews #default view order in multiplot views, set only one item for single view #if more than one item, modify the 'nplots' in the super().__init__ call self.nplots = 1 self.multiviews = [] for i in range(self.nplot_max): # set views in the same order as declared above self.multiviews.append(list(self.views.values())[i]) self.multiplots.reorg_fig(self.nplots) # FILES # set the type of files that ApplicationLAOS can open ftype = TXTColumnFile(name='content of files', extension='laos', description='file containing laos data', col_names=['gamma', 'sigma', 'time'], basic_file_parameters=['omega', 'gamma'], col_units=['-', 'Pa']) self.filetypes[ ftype.extension] = ftype #add each the file type to dictionary # THEORIES # add the theories related to ApplicationLAOS to the dictionary, e.g.: # self.theories[TheoryA.thname] = TheoryA # self.theories[TheoryB.thname] = TheoryB self.add_common_theories() # Add basic theories to the application #set the current view self.set_views()
def __init__(self, name="LVE", parent=None): """ **Constructor** Keyword Arguments: - name {[type]} -- [description] (default: {"LVE"}) - parent {[type]} -- [description] (default: {None}) """ from TheoryMaxwellModes import TheoryMaxwellModesFrequency from TheoryLikhtmanMcLeish2002 import TheoryLikhtmanMcLeish2002 from TheoryTTS import TheoryWLFShift from TheoryCarreauYasuda import TheoryCarreauYasuda from TheoryRouse import TheoryRouseFrequency from TheoryDTDStars import TheoryDTDStarsFreq from TheoryBobLVE import TheoryBobLVE from TheoryRDPLVE import TheoryRDPLVE super().__init__(name, parent) # VIEWS self.views["log(G',G''(w))"] = View( name="log(G',G''(w))", description="log Storage,Loss moduli", x_label="log($\omega$)", y_label="log(G'($\omega$),G''($\omega$))", x_units="rad/s", y_units="Pa", log_x=False, log_y=False, view_proc=self.viewLogG1G2, n=2, snames=["log(G'(w))", "log(G''(w))"]) self.views["G',G''(w)"] = View("G',G''(w)", "Storage,Loss moduli", "$\omega$", "G'($\omega$),G''($\omega$)", "rad/s", "Pa", True, True, self.viewG1G2, 2, ["G'(w)", "G''(w)"]) self.views["etastar"] = View("etastar", "Complex Viscosity", "$\omega$", "$|\eta^*(\omega)|$", "rad/s", "Pa.s", True, True, self.viewEtaStar, 1, ["eta*(w)"]) self.views["logetastar"] = View("logetastar", "log Complex Viscosity", "log($\omega$)", "log$|\eta^*(\omega)|$", "rad/s", "Pa.s", False, False, self.viewLogEtaStar, 1, ["log(eta*(w))"]) self.views["delta"] = View("delta", "delta", "$\omega$", "$\delta(\omega)$", "rad/s", "-", True, True, self.viewDelta, 1, ["delta(w)"]) self.views["tan(delta)"] = View("tan(delta)", "tan(delta)", "$\omega$", "tan($\delta$)", "rad/s", "-", True, True, self.viewTanDelta, 1, ["tan(delta((w))"]) self.views["log(tan(delta))"] = View( "log(tan(delta))", "log(tan(delta))", "log($\omega$)", "log(tan($\delta$))", "rad/s", "-", False, False, self.viewLogTanDelta, 1, ["log(tan(delta((w)))"]) self.views["log(G*)"] = View("log(G*)", "log(G*(omega))", "log($\omega$)", "log(G*($\omega$))", "rad/s", "Pa", False, False, self.viewLogGstar, 1, ["log(G*)"]) self.views["log(tan(delta),G*)"] = View( "log(tan(delta),G*)", "log(tan($\delta$))", "log(G*)", "log(tan($\delta$))", "Pa", "-", False, False, self.viewLogtandeltaGstar, 1, ["log(tan($\delta))"]) self.views["delta(G*)"] = View("delta(G*)", "$\delta$)", "log(G*)", "$\delta$)", "Pa", "deg", False, False, self.viewdeltatanGstar, 1, ["delta"]) self.views["J',J''(w)"] = View("J',J''(w)", "J moduli", "$\omega$", "J'($\omega$),J''($\omega$)", "rad/s", "$Pa^{-1}$", True, True, self.viewJ1J2, 2, ["J'(w)", "J''(w)"]) self.views["Cole-Cole"] = View("Cole-Cole", "Cole-Cole plot", "$\eta'$", "$\eta''$", "Pa.s", "Pa.s", False, False, self.viewColeCole, 1, ["$eta'$"]) self.views["log(G')"] = View(name="log(G')", description="log Storage modulus", x_label="log($\omega$)", y_label="log(G'($\omega$))", x_units="rad/s", y_units="Pa", log_x=False, log_y=False, view_proc=self.viewLogG1, n=1, snames=["log(G'(w))"]) self.views["G'"] = View("G'", "Storage modulus", "$\omega$", "G'($\omega$)", "rad/s", "Pa", True, True, self.viewG1, 1, ["G'(w)"]) self.views["log(G'')"] = View(name="log(G'')", description="log Loss modulus", x_label="log($\omega$)", y_label="log(G'($\omega$))", x_units="rad/s", y_units="Pa", log_x=False, log_y=False, view_proc=self.viewLogG2, n=1, snames=["log(G''(w))"]) self.views["G''"] = View("G''", "Loss modulus", "$\omega$", "G''($\omega$)", "rad/s", "Pa", True, True, self.viewG2, 1, ["G''(w)"]) self.views["log(G',G''(w),tan(delta))"] = View( name="log(G',G''(w),tan(delta))", description="log Storage,Loss moduli, tan(delta)", x_label="log($\omega$)", y_label="log(G'($\omega$),G''($\omega$),tan($\delta$))", x_units="rad/s", y_units="Pa,-", log_x=False, log_y=False, view_proc=self.viewLogG1G2tandelta, n=3, snames=["log(G'(w))", "log(G''(w)),log(tan(delta))"]) #set multiviews self.nplots = 1 self.multiviews = [] for i in range(self.nplot_max): # set views in the same order as declared above self.multiviews.append(list(self.views.values())[i]) self.multiplots.reorg_fig(self.nplots) # FILES ftype = TXTColumnFile("LVE files", "tts", "LVE files", ['w', 'G\'', 'G\'\''], ['Mw', 'T'], ['rad/s', 'Pa', 'Pa']) self.filetypes[ftype.extension] = ftype self.filetypes['osc'] = TXTColumnFile( "OSC files", "osc", "Small-angle oscillatory masurements from the Rheometer", ['w', 'G\'', 'G\'\''], ['Mw', 'T'], ['rad/s', 'Pa', 'Pa']) self.filetypes['xlsx'] = ExcelFile("Excel File", "xlsx", "ExcelFIle", ['w', 'G\'', 'G\'\''], [], ['rad/s', 'Pa', 'Pa']) # THEORIES self.theories[ TheoryMaxwellModesFrequency.thname] = TheoryMaxwellModesFrequency self.theories[ TheoryLikhtmanMcLeish2002.thname] = TheoryLikhtmanMcLeish2002 self.theories[TheoryCarreauYasuda.thname] = TheoryCarreauYasuda #self.theories[TheoryWLFShift.thname]=TheoryWLFShift self.theories[TheoryRouseFrequency.thname] = TheoryRouseFrequency self.theories[TheoryDTDStarsFreq.thname] = TheoryDTDStarsFreq self.theories[TheoryBobLVE.thname] = TheoryBobLVE self.theories[TheoryRDPLVE.thname] = TheoryRDPLVE self.add_common_theories() #set the current view self.set_views()
def __init__(self, name="Crystal", parent=None): """ **Constructor** Keyword Arguments: - name {[type]} -- [description] (default: {"LVE"}) - parent {[type]} -- [description] (default: {None}) """ #from TheoryRoliePoly import TheoryRoliePoly #from TheoryUCM import TheoryUCM #from TheoryGiesekus import TheoryGiesekus #from TheoryPomPom import TheoryPomPom from TheoryRolieDoublePoly import TheoryRolieDoublePoly #from TheoryBobNLVE import TheoryBobNLVE #from TheoryPETS import TheoryPETS #from TheorySCCR import TheorySCCR # from TheorySCCROLD import TheorySCCROLD super().__init__(name, parent) # VIEWS self.views["log(eta(t))"] = View( name="log(eta(t))", description="log transient viscosity", x_label="log(t)", y_label="log($\eta^+$)", x_units="s", y_units="Pa$\cdot$s", log_x=False, log_y=False, view_proc=self.viewLogeta, n=1, snames=["log(eta)"]) self.views["Ndot(t)"] = View( name="Ndot(t)", description="Nucleation rate", x_label="t", y_label="$\dot{N}$", x_units="s", y_units="s$^{-1}$m$^{-3}$", log_x=False, log_y=False, view_proc=self.viewNdot, n=1, snames=["Ndot"]) self.views["phiX(t)"] = View( name="phiX(t)", description="Crystal fraction", x_label="t", y_label="$\phi_X$", x_units="s", y_units="-", log_x=False, log_y=False, view_proc=self.viewphiX, n=1, snames=["phiX"]) self.views["N(t)"] = View( name="N(t)", description="Nucleation density", x_label="t", y_label="N", x_units="s", y_units="m$^{-3}$", log_x=False, log_y=False, view_proc=self.viewNt, n=1, snames=["N"]) self.views["eta(t)"] = View( name="eta(t)", description="transient viscosity", x_label="t", y_label="$\eta^+$", x_units="s", y_units="Pa$\cdot$s", log_x=True, log_y=True, view_proc=self.vieweta, n=1, snames=["eta"]) self.views["log(sigma(gamma))"] = View( name="log(sigma(gamma))", description="log transient shear stress vs gamma", x_label="log($\gamma$)", y_label="log($\sigma^+$)", x_units="-", y_units="Pa", log_x=False, log_y=False, view_proc=self.viewLogSigmaGamma, n=1, snames=["log(sigma)"]) self.views["sigma(gamma)"] = View( name="sigma(gamma)", description="transient shear stress vs gamma", x_label="$\gamma$", y_label="$\sigma^+$", x_units="-", y_units="Pa", log_x=False, log_y=False, view_proc=self.viewSigmaGamma, n=1, snames=["sigma"]) self.views["log(sigma(t))"] = View( name="log(sigma(t))", description="log transient shear stress vs time", x_label="log(t)", y_label="log($\sigma^+$)", x_units="s", y_units="Pa", log_x=False, log_y=False, view_proc=self.viewLogSigmaTime, n=1, snames=["log(sigma)"]) self.views["sigma(t)"] = View( name="sigma(t)", description="transient shear stress vs time", x_label="t", y_label="$\sigma^+$", x_units="s", y_units="Pa", log_x=False, log_y=False, view_proc=self.viewSigmaTime, n=1, snames=["sigma"]) self.views["Flow Curve"] = View( name="Flow Curve", description="Steady state stress vs flow rate", x_label="Flow rate", y_label="$\sigma$", x_units="s$^{-1}$", y_units="Pa", log_x=True, log_y=True, view_proc=self.view_flowcurve, n=1, snames=["sigma"], with_thline=False, filled=True) #set multiviews self.nplots = 2 self.multiviews = [] for i in range(self.nplot_max): # set views in the same order as declared above self.multiviews.append(list(self.views.values())[i]) self.multiplots.reorg_fig(self.nplots) # FILES ftype = TXTColumnFile("Start-up of shear flow with crystallisation", "shearxs", "Shear crystallisation files", ['t', 'sigma_xy', 'Ndot', 'phi_X', 'N'], ['gdot', 'T','tstop'], ['s', 'Pa$\cdot$s', 's$^{-1}$m$^{-3}$', '-', 'm$^{-3}$']) self.filetypes[ftype.extension] = ftype ftype = TXTColumnFile("Elongation flow with crystallisation", "uextxs", "Elongation crystallisation files", ['t', 'N1', 'Ndot', 'phi_X', 'N'], ['gdot', 'T','tstop'], ['s', 'Pa$\cdot$s', 's$^{-1}$m$^{-3}$', '-', 'm$^{-3}$']) self.filetypes[ftype.extension] = ftype ftype = TXTColumnFile("Start-up of shear flow", "shear", "Shear flow files", ['t', 'sigma_xy'], ['gdot', 'T'], ['s', 'Pa$\cdot$s']) self.filetypes[ftype.extension] = ftype ftype = TXTColumnFile("Elongation flow", "uext", "Elongation flow files", ['t', 'N1'], ['gdot', 'T'], ['s', 'Pa$\cdot$s']) self.filetypes[ftype.extension] = ftype # THEORIES #self.theories[TheoryRoliePoly.thname] = TheoryRoliePoly #self.theories[TheoryUCM.thname] = TheoryUCM #self.theories[TheoryGiesekus.thname] = TheoryGiesekus #self.theories[TheoryPomPom.thname] = TheoryPomPom self.theories[TheoryRolieDoublePoly.thname] = TheoryRolieDoublePoly #self.theories[TheoryBobNLVE.thname] = TheoryBobNLVE #self.theories[TheoryPETS.thname] = TheoryPETS #self.theories[TheorySCCR.thname] = TheorySCCR # self.theories[TheorySCCROLD.thname] = TheorySCCROLD self.add_common_theories() #set the current view self.set_views()
def __init__(self, name="TTSF", parent=None): """ **Constructor** Keyword Arguments: - name {[type]} -- [description] (default: {"TTSFactors"}) - parent {[type]} -- [description] (default: {None}) """ from TheoryWLF import TheoryWLF from TheoryArrhenius import TheoryArrhenius #from TheoryArrhenius import TheoryArrhenius super().__init__(name, parent) # VIEWS self.views["log(aT)"] = View(name="log(aT)", description="log Horizontal shift factor", x_label="T", y_label="$\log(a_T)$", x_units="°C", y_units="-", log_x=False, log_y=False, view_proc=self.viewLogaT, n=1, snames=["log(aT)"]) self.views["aT"] = View(name="aT", description="Horizontal shift factor", x_label="T", y_label="$a_T$", x_units="°C", y_units="-", log_x=False, log_y=True, view_proc=self.viewaT, n=1, snames=["aT"]) self.views["log(bT)"] = View(name="log(bT)", description="log Vertical shift factor", x_label="T", y_label="$\log(b_T)$", x_units="°C", y_units="-", log_x=False, log_y=False, view_proc=self.viewLogbT, n=1, snames=["log(bT)"]) self.views["bT"] = View(name="bT", description="Vertical shift factor", x_label="T", y_label="$b_T$", x_units="°C", y_units="-", log_x=False, log_y=True, view_proc=self.viewbT, n=1, snames=["bT"]) self.views["log(aT, bT)"] = View( name="log(aT, bT)", description="log Horizontal and Vertical shift factors", x_label="T", y_label="$\log(a_T, b_T)$", x_units="°C", y_units="-", log_x=False, log_y=False, view_proc=self.viewLogaTbT, n=2, snames=["log(aT)", "log(bT)"]) self.views["log(aT) vs 1/T"] = View( name="log(aT) vs 1/T", description="log Horizontal shift factors vs 1/T", x_label="1/T", y_label="$\log(a_T)$", x_units="K$^{-1}$", y_units="-", log_x=False, log_y=False, view_proc=self.viewLogaT_invT, n=1, snames=["log(aT)"]) #set multiviews self.nplots = 1 self.multiviews = [] for i in range(self.nplot_max): # set views in the same order as declared above self.multiviews.append(list(self.views.values())[i]) self.multiplots.reorg_fig(self.nplots) # FILES ftype = TXTColumnFile("TTS factors", "ttsf", "TTS shift factors", ['T', 'aT', 'bT'], ['Mw'], ['°C', '-', '-']) self.filetypes[ftype.extension] = ftype # THEORIES self.theories[TheoryWLF.thname] = TheoryWLF self.theories[TheoryArrhenius.thname] = TheoryArrhenius #self.theories[TheoryWLFShiftTest.thname] = TheoryWLFShiftTest self.add_common_theories() #set the current view self.set_views()
def __init__(self, name='React', parent=None, **kwargs): """ **Constructor** Keyword Arguments: - name {[type]} -- [description] (default: {'React'}) - parent {[type]} -- [description] (default: {None}) """ from TheoryLDPEBatch import TheoryTobitaBatch from TheoryTobitaCSTR import TheoryTobitaCSTR from TheoryMultiMetCSTR import TheoryMultiMetCSTR from TheoryReactMix import TheoryReactMix from TheoryCreatePolyconf import TheoryCreatePolyconf from TheoryDieneCSTR import TheoryDieneCSTR super().__init__(name, parent) # VIEWS # set the views that can be selected in the view combobox self.views["w(M)"] = View(name="w(M)", description="Molecular weight distribution", x_label="M", y_label="w", x_units="g/mol", y_units="-", log_x=True, log_y=False, view_proc=self.view_wM, n=1, snames=["w"]) self.views["g(M)"] = View(name="g(M)", description="g(M)", x_label="M", y_label="g(M)", x_units="g/mol", y_units="-", log_x=True, log_y=False, view_proc=self.view_gM, n=1, snames=["g(M)"]) self.views['br/1000C'] = View(name="br/1000C", description="br/1000C(M)", x_label="M", y_label="br/1000C", x_units="g/mol", y_units="-", log_x=True, log_y=False, view_proc=self.view_br_1000C, n=1, snames=["br/1000C"]) self.views["log(w(M))"] = View( name="log(w(M))", description="Molecular weight distribution", x_label="M", y_label="log(w)", x_units="g/mol", y_units="-", log_x=True, log_y=False, view_proc=self.view_logwM, n=1, snames=["log(w)"]) self.views["log(g(M))"] = View(name="log(g(M))", description="log(g(M))", x_label="M", y_label="log(g)", x_units="g/mol", y_units="-", log_x=True, log_y=False, view_proc=self.view_loggM, n=1, snames=["log(g)"]) self.views['p(mass br) log-lin'] = View( name="p(mass br) log-lin", description= "Prob. dist. of mass segement b/w branch pt log-lin scale", x_label="M segment", y_label="p(M segment)", x_units="g/mol", y_units="-", log_x=True, log_y=False, view_proc=self.thview_proba_mass_br, n=1, snames=["p(M segment)"], with_thline=False) self.views['p(br/molecule) log-lin'] = View( name="p(br/molecule) log-lin", description= "Prob. dist. of num. branch pt per molecule log-lin scale", x_label="Num. br/molecule", y_label="p(br/molecule)", x_units="-", y_units="-", log_x=True, log_y=False, view_proc=self.thview_proba_num_br, n=1, snames=["p(M segment)"], with_thline=False) self.views['p(br/molecule) lin-lin'] = View( name="p(br/molecule) lin-lin", description= "Prob. dist. of num. branch pt per molecule lin-lin scale", x_label="Num. br/molecule", y_label="p(br/molecule)", x_units="-", y_units="-", log_x=False, log_y=False, view_proc=self.thview_proba_num_br, n=1, snames=["p(M segment)"], with_thline=False) #### extra views for P&S: self.views['<senio(prio)> log-log'] = View( name="<senio(prio)> log-log", description="Average seniority vs priority log-log scale", x_label="Priority", y_label="Average Seniority", x_units="-", y_units="-", log_x=True, log_y=True, view_proc=self.thview_avsenio_v_prio, n=3, snames=["av_senio"], with_thline=False) self.views['<senio(prio)> lin-log'] = View( name="<senio(prio)> lin-log", description="Average seniority vs priority lin-log scale", x_label="Priority", y_label="Average Seniority", x_units="-", y_units="-", log_x=False, log_y=True, view_proc=self.thview_avsenio_v_prio, n=3, snames=["av_senio"], with_thline=False) self.views['<senio(prio)> lin-lin'] = View( name="<senio(prio)> lin-lin", description="Average seniority vs priority lin-lin scale", x_label="Priority", y_label="Average Seniority", x_units="-", y_units="-", log_x=False, log_y=False, view_proc=self.thview_avsenio_v_prio, n=3, snames=["av_senio"], with_thline=False) ##### self.views['<prio(senio)> log-log'] = View( name="<prio(senio)> log-log", description="Average priority vs seniority log-log scale", x_label="Seniority", y_label="Average Priority", x_units="-", y_units="-", log_x=True, log_y=True, view_proc=self.thview_avprio_v_senio, n=3, snames=["av_prio"], with_thline=False) self.views['<prio(senio)> lin-log'] = View( name="<prio(senio)> lin-log", description="Average priority vs seniority lin-log scale", x_label="Seniority", y_label="Average Priority", x_units="-", y_units="-", log_x=False, log_y=True, view_proc=self.thview_avprio_v_senio, n=3, snames=["av_prio"], with_thline=False) self.views['<prio(senio)> lin-lin'] = View( name="<prio(senio)> lin-lin", description="Average priority vs seniority lin-lin scale", x_label="Seniority", y_label="Average Priority", x_units="-", y_units="-", log_x=False, log_y=False, view_proc=self.thview_avprio_v_senio, n=3, snames=["av_prio"], with_thline=False) ##### self.views['p(senio) log-log'] = View( name="p(senio) log-log", description="seniority prob. dist. log-log", x_label="Seniority", y_label="Probability", x_units="-", y_units="-", log_x=True, log_y=True, view_proc=self.thview_proba_senio, n=1, snames=["proba_senio"], with_thline=False) self.views['p(senio) lin-log'] = View( name="p(senio) lin-log", description="seniority prob. dist. lin-log scale", x_label="Seniority", y_label="Probability", x_units="-", y_units="-", log_x=False, log_y=True, view_proc=self.thview_proba_senio, n=1, snames=["proba_senio"], with_thline=False) ##### self.views['p(prio) log-log'] = View( name="p(prio) log-log", description="Priority prob. dist. log-log scale", x_label="Priority", y_label="Probability", x_units="-", y_units="-", log_x=True, log_y=True, view_proc=self.thview_proba_prio, n=1, snames=["proba_prio"], with_thline=False) self.views['p(prio) lin-log'] = View( name="p(prio) lin-log", description="Priority prob. dist. lin-log scale", x_label="Priority", y_label="Probability", x_units="-", y_units="-", log_x=False, log_y=True, view_proc=self.thview_proba_prio, n=1, snames=["proba_prio"], with_thline=False) #### self.views['<mass br(senio)> log-log'] = View( name="<mass br(senio)> log-log", description= "Average mol. mass b/w branch pt vs seniority log-log scale", x_label="Seniority", y_label="Av. strand length", x_units="-", y_units="g/mol", log_x=True, log_y=True, view_proc=self.thview_avarmlen_v_senio, n=1, snames=["av_strand_length"], with_thline=False) self.views['<mass br(senio)> lin-lin'] = View( name="<mass br(senio)> lin-lin", description= "Average mol. mass b/w branch pt vs seniority lin-lin scale", x_label="Seniority", y_label="Av. strand length", x_units="-", y_units="g/mol", log_x=False, log_y=False, view_proc=self.thview_avarmlen_v_senio, n=1, snames=["av_strand_length"], with_thline=False) #### self.views['<mass br(prio)> log-log'] = View( name="<mass br(prio)> log-log", description= "Average mol. mass b/w branch pt vs priority log-log scale", x_label="Priority", y_label="Av. strand length", x_units="-", y_units="g/mol", log_x=True, log_y=True, view_proc=self.thview_avarmlen_v_prio, n=1, snames=["av_strand_length"], with_thline=False) self.views['<mass br(prio)> lin-lin'] = View( name="<mass br(prio)> lin-lin", description= "Average mol. mass b/w branch pt vs priority lin-lin scale", x_label="Priority", y_label="Av. strand length", x_units="-", y_units="g/mol", log_x=False, log_y=False, view_proc=self.thview_avarmlen_v_prio, n=1, snames=["av_strand_length"], with_thline=False) self.extra_view_names = [ '<senio(prio)> log-log', '<senio(prio)> lin-log', '<senio(prio)> lin-lin', '<prio(senio)> log-log', '<prio(senio)> lin-log', '<prio(senio)> lin-lin', 'p(senio) log-log', 'p(senio) lin-log', 'p(prio) log-log', 'p(prio) lin-log', '<mass br(senio)> log-log', '<mass br(senio)> lin-lin', '<mass br(prio)> log-log', '<mass br(prio)> lin-lin' ] #set multiviews self.nplots = 3 self.multiviews = [] for i in range(self.nplot_max): # set views in the same order as declared above self.multiviews.append(list(self.views.values())[i]) self.multiplots.reorg_fig(self.nplots) # FILES # set the type of files that ApplicationReact can open ftype = TXTColumnFile(name='React files', extension='reac', description='Reatc file', col_names=['M', 'w(M)', 'g', 'br/1000C'], basic_file_parameters=[], col_units=['g/mol', '-', '-', '-']) self.filetypes[ ftype.extension] = ftype #add each the file type to dictionary # THEORIES # add the theories related to ApplicationReact to the dictionary, e.g.: self.theories[TheoryTobitaBatch.thname] = TheoryTobitaBatch self.theories[TheoryTobitaCSTR.thname] = TheoryTobitaCSTR self.theories[TheoryMultiMetCSTR.thname] = TheoryMultiMetCSTR self.theories[TheoryReactMix.thname] = TheoryReactMix self.theories[TheoryCreatePolyconf.thname] = TheoryCreatePolyconf self.theories[TheoryDieneCSTR.thname] = TheoryDieneCSTR self.add_common_theories() #set the current view self.set_views() for _ in self.extra_view_names: self.viewComboBox.removeItem(self.viewComboBox.count() - 1)
def __init__(self, name="Dielectric", parent=None): """ **Constructor** Keyword Arguments: - name {[type]} -- [description] (default: {"Dielectric"}) - parent {[type]} -- [description] (default: {None}) """ from TheoryDebyeModes import TheoryDebyeModesFrequency from TheoryHavriliakNegamiModes import TheoryHavriliakNegamiModesFrequency from TheoryKWWModes import TheoryKWWModesFrequency super().__init__(name, parent) # VIEWS self.views["log(e',e''(w))"] = View( name="log(e',e''(w))", description="log Relative permittivity, Dielectric Loss", x_label="log($\omega$)", y_label="log($\epsilon',\epsilon''$)", x_units="rad/s", y_units="-", log_x=False, log_y=False, view_proc=self.viewLogE1E2, n=2, snames=["log(e')", "log(e'')"]) self.views["semilog(e',e''(w))"] = View( name="semilog(e',e''(w))", description="semilog Relative permittivity, Dielectric Loss", x_label="log($\omega$)", y_label="$\epsilon',\epsilon''$", x_units="rad/s", y_units="-", log_x=False, log_y=False, view_proc=self.viewSemiLogE1E2, n=2, snames=["e'(w)", "e''(w)"]) self.views["e',e''(w)"] = View( "e',e''(w)", "Relative permittivity, Dielectric Loss", "$\omega$", "$\epsilon',\epsilon''$", "rad/s", "-", True, True, self.viewE1E2, 2, ["e'(w)", "e''(w)"]) self.views["log(e')"] = View(name="log(e')", description="log Relative Permittivity", x_label="log($\omega$)", y_label="log($\epsilon'$)", x_units="rad/s", y_units="-", log_x=False, log_y=False, view_proc=self.viewLogE1, n=1, snames=["log(e')"]) self.views["semilog(e')"] = View( name="semilog(e')", description="log Relative Permittivity", x_label="log($\omega$)", y_label="$\epsilon'$", x_units="rad/s", y_units="-", log_x=False, log_y=False, view_proc=self.viewSemiLogE1, n=1, snames=["e'"]) self.views["e'"] = View("e'", "Relative Permittivity", "$\omega$", "$\epsilon'$", "rad/s", "-", True, True, self.viewE1, 1, ["e'"]) self.views["log(e'')"] = View(name="log(e'')", description="log Dielectric Loss", x_label="log($\omega$)", y_label="log($\epsilon''$)", x_units="rad/s", y_units="-", log_x=False, log_y=False, view_proc=self.viewLogE2, n=1, snames=["log(e'')"]) self.views["semilog(e'')"] = View( name="semilog(e'')", description="semilog Dielectric Loss", x_label="log($\omega$)", y_label="$\epsilon''$", x_units="rad/s", y_units="-", log_x=False, log_y=False, view_proc=self.viewSemiLogE2, n=1, snames=["e''"]) self.views["e''"] = View("e''", "Dielectric Loss", "$\omega$", "$\epsilon''$", "rad/s", "-", True, True, self.viewE2, 1, ["e''"]) self.views["Cole-Cole"] = View("Cole-Cole", "Cole-Cole plot", "$\epsilon'$", "$\epsilon''$", "-", "-", False, False, self.viewColeCole, 1, ["e''"]) #set multiviews self.nplots = 1 self.multiviews = [] for i in range(self.nplot_max): # set views in the same order as declared above self.multiviews.append(list(self.views.values())[i]) self.multiplots.reorg_fig(self.nplots) # FILES ftype = TXTColumnFile("Dielectric Spectroscopy files", "dls", "Dielectric Spectroscopy files", ['w', 'e\'', 'e\'\''], ['Mw', 'T'], ['rad/s', '-', '-']) self.filetypes[ftype.extension] = ftype # THEORIES self.theories[ TheoryDebyeModesFrequency.thname] = TheoryDebyeModesFrequency self.theories[TheoryHavriliakNegamiModesFrequency. thname] = TheoryHavriliakNegamiModesFrequency self.theories[TheoryKWWModesFrequency.thname] = TheoryKWWModesFrequency self.add_common_theories() #set the current view self.set_views()