diff --git a/nanohubtools/_version.py b/nanohubtools/_version.py index 19eeb6d..fae8edd 100644 --- a/nanohubtools/_version.py +++ b/nanohubtools/_version.py @@ -24,6 +24,6 @@ # Daniel Mejia (denphi), Purdue University (denphi@denphi.com) -version_info = (0, 1, 9) +version_info = (0, 1, 10) __version__ = ".".join(map(str, version_info)) diff --git a/nanohubtools/pntoy.py b/nanohubtools/pntoy.py index 91a96eb..2fe0710 100644 --- a/nanohubtools/pntoy.py +++ b/nanohubtools/pntoy.py @@ -38,6 +38,7 @@ def __init__(self, credentials, **kwargs): self.parameters_additional = [ ] parameters = self.parameters_structure + self.parameters_materials + self.parameters_ambient + self.parameters_additional + kwargs.setdefault('title', 'P-N junction') Rappturetool.__init__(self, credentials, "pntoy", parameters, extract_method="id", **kwargs) diff --git a/nanohubtools/qdottools.py b/nanohubtools/qdottools.py index 3117573..a8cb93f 100644 --- a/nanohubtools/qdottools.py +++ b/nanohubtools/qdottools.py @@ -61,6 +61,9 @@ def __init__(self, credentials, parameters, **kwargs): self.tool = "qdot" Rappturetool.__init__(self, credentials, self.tool, parameters, **kwargs) + def displayExperiment(self, experiment, disable=[]): + Rappturetool.displayExperiment(self, experiment, disable+["sequences"]) + class SimpleQuantumDot (Qdotexplorer): def __init__(self, credentials, **kwargs): self.parameters_structure = [ @@ -90,6 +93,7 @@ def __init__(self, credentials, **kwargs): 'npts' ] parameters = self.parameters_structure + self.parameters_optical + kwargs.setdefault('title', 'Simple Quantum-dot lab') Qdotexplorer.__init__(self, credentials, parameters, extract_method="id", **kwargs) @@ -196,6 +200,7 @@ def __init__(self, credentials, **kwargs): 'structchoice' ] parameters = self.parameters_structure + self.parameters_optical + self.parameters_layer + self.parameters_additional + kwargs.setdefault('title', 'Stacked Quantumdot lab') Qdotexplorer.__init__(self, credentials, parameters, extract_method="id", **kwargs) self.options[self.parameters_additional[0]] = ui.String(name='Quantum Dot Structure', value='Multi-Layer Quantum Dot', description='Quantum Dot Structure') @@ -275,4 +280,6 @@ def displayOptions(self): sqdottab.set_title(2, "Layers") sqdottab.set_title(1, "Structure") - self.options_cont.children = [sqdottab] \ No newline at end of file + self.options_cont.children = [sqdottab] + + \ No newline at end of file diff --git a/nanohubtools/rappturetool.py b/nanohubtools/rappturetool.py index 81da497..e813f11 100644 --- a/nanohubtools/rappturetool.py +++ b/nanohubtools/rappturetool.py @@ -169,7 +169,7 @@ def loadExperiment(self, session_id): self.displayExperiment(experiment) - def displayExperiment(self, experiment): + def displayExperiment(self, experiment, disable=[]): params_b = [] @@ -229,20 +229,10 @@ def displayExperiment(self, experiment): if g.text in groups: groups[g.text].append(el) else: - groups[g.text] = [el] - - - - - - - - - - + groups[g.text] = [el] out_curves.children = oc_children - if len(oc_children) > 0: + if len(oc_children) > 0 and "curves" not in disable: acc_item = acc_item+1 acc_children.append(out_curves) acc_titles.append('Curves') @@ -256,7 +246,7 @@ def displayExperiment(self, experiment): but.on_click(lambda a, b=self, c=g,d=experiment['modal'] : Rappturetool.plotXY(b,c,d)) op_children.append(but) out_plots.children = op_children - if len(op_children) > 0: + if len(op_children) > 0 and "plots" not in disable: acc_item = acc_item+1 acc_children.append(out_plots) acc_titles.append('Plots') @@ -274,7 +264,7 @@ def displayExperiment(self, experiment): but.on_click(lambda a, b=self, c=sequences[i],d=experiment['modal'] : Rappturetool.plotSequence(b,c,d)) os_children.append(but) out_sequences.children = os_children - if len(os_children) > 0: + if len(os_children) > 0 and "sequences" not in disable: acc_item = acc_item+1 acc_children.append(out_sequences) acc_titles.append('Sequences') @@ -291,7 +281,7 @@ def displayExperiment(self, experiment): but.on_click(lambda a, b=self, c=tables[i],d=experiment['modal'] : Rappturetool.plotTable(b,c,d)) ot_children.append(but) out_tables.children = ot_children - if len(ot_children) > 0: + if len(ot_children) > 0 and "tables" not in disable: acc_item = acc_item+1 acc_children.append(out_tables) acc_titles.append('Tables') @@ -314,7 +304,7 @@ def displayExperiment(self, experiment): but.on_click(lambda a, b=self, c=v, d=component, e=experiment['modal'] : Rappturetool.plotVTK(b,c,d,e)) ov_children.append(but) out_volumes.children = ov_children - if len(ov_children) > 0: + if len(ov_children) > 0 and "volumes" not in disable: acc_item = acc_item+1 acc_children.append(out_volumes) acc_titles.append('Volumes') @@ -337,7 +327,7 @@ def displayExperiment(self, experiment): but.on_click(lambda a, b=self, c=el.find('current'),d=experiment['modal'] : Rappturetool.plotLog(b,c,d)) ol_children.append(but) out_logs.children = ol_children - if len(ol_children) > 0: + if len(ol_children) > 0 and "logs" not in disable: acc_item = acc_item+1 acc_children.append(out_logs) acc_titles.append('Logs') @@ -608,7 +598,7 @@ def plotSequence(self, sequence, out, labels=None): if(len(groups)>0): index = self.getText(seq, ["index"]) options.append(index) - tr, lay = self.buiildXYPlotly(groups[list(groups.keys())[0]]) + tr, lay = self.buildXYPlotly(groups[list(groups.keys())[0]]) if len(traces) == 0: layout = lay traces = tr @@ -628,19 +618,22 @@ def plotSequence(self, sequence, out, labels=None): if out == None: - out = Floatview(title=title, mode = 'split-bottom') + out = Floatview(title=label, mode = 'split-bottom') out.clear_output() with out: display(container) return fig def plotXY(self, fields, out, labels=None): - traces, layout = self.buiildXYPlotly(fields, labels) + traces, layout = self.buildXYPlotly(fields, labels) fig = FigureWidget({ 'data': traces, 'layout': layout }) if out == None: + title = "" + for field in (fields): + title = self.getText(field, ["about","group"]) out = Floatview(title=title, mode = 'split-bottom') out.clear_output() but = Button(description="Compare Data", icon='check', disable=False, layout=layout) @@ -650,7 +643,7 @@ def plotXY(self, fields, out, labels=None): display(but) return fig - def buiildXYPlotly(self, fields, labels=None): + def buildXYPlotly(self, fields, labels=None): traces = [] for i, field in enumerate(fields): component = self.getXY(field, 'component') diff --git a/nanohubtools/semi.py b/nanohubtools/semi.py index d057225..1c06af0 100644 --- a/nanohubtools/semi.py +++ b/nanohubtools/semi.py @@ -46,6 +46,7 @@ def __init__(self, credentials, **kwargs): self.parameters_additional = [ ] parameters = self.parameters_structure + self.parameters_materials + self.parameters_ambient + self.parameters_additional + kwargs.setdefault('title', 'Drift diffusion lab') Rappturetool.__init__(self, credentials, "semi", parameters, extract_method="id", **kwargs)