def subViewer(self, event): choices={} for i, e in enumerate(self.model.elements): d=e.getElements('Data', depth=1) if d: if e.name().startswith("Checkpoint"): sd=d[0].getHierarchy() del(sd['/']) for k in sd.keys(): choices["%i - %s - %s" % (i, e.name(), k)]=sd[k] if not choices: self.report('No data to display. SubData display requires a checkpoint with complex data currently saved.') return elif len(choices.keys())>1: d=self.askParam([{"Name":"Show Which Data?", "Type":"List", "Value":choices.keys()}]) if not d: return choices=choices[d[0]] else: choices=choices.values()[0] v=Dataviewer(self) v.bindToData(choices) v.SetTitle("DSP: %s" % str(choices)) v.Show(True)
def launchViewer(self, event): dat=self.selectData() if not dat: return dat, name=dat v=Dataviewer(self) v.preferences["Display Nested Data to Depth"]=1 v.graph.legend=True v.bindToData(dat) v.SetTitle("DSP: %s" % name) v.Show(True)