def update(self): self.notebook.clear() files = epitaxy_get_dos_files() for i in range(0, epitaxy_get_layers()): pl_file = epitaxy_get_pl_file(i) if pl_file.startswith("pl") == True: widget = QWidget() name = _("Luminescence of ") + epitaxy_get_name(i) widget = tab_class(pl_file + ".inp") self.notebook.addTab(widget, name)
def update(self): self.notebook.clear() files = epitaxy_get_dos_files() for i in range(0, epitaxy_get_layers()): dos_layer = epitaxy_get_electrical_layer(i) if dos_layer.startswith("dos") == True: #add_to_widget=True name = "DoS of " + epitaxy_get_name(i) widget = tab_class() widget.init(dos_layer + ".inp", name) self.notebook.addTab(widget, name)
def update(self): self.notebook.clear() files=epitaxy_get_dos_files() for i in range(0,epitaxy_get_layers()): pl_file=epitaxy_get_pl_file(i) if pl_file.startswith("pl")==True: widget = QWidget() name="Luminescence of "+epitaxy_get_name(i) print(pl_file,files) widget=tab_class() widget.init(pl_file+".inp",name) self.notebook.addTab(widget,name)
def update(self): print "DoS update" for child in self.notebook.get_children(): self.notebook.remove(child) files=epitaxy_get_dos_files() for i in range(0,epitaxy_get_layers()): dos_layer=epitaxy_get_electrical_layer(i) if dos_layer!="none": add_to_widget=True tab=tab_class() tab.show() tab.visible=True name="DoS of "+epitaxy_get_name(i) print dos_layer,files tab.init(dos_layer+".inp",name) tab.label_name=name self.notebook.append_page(tab, gtk.Label(name))
def update(self): print "PL update" for child in self.notebook.get_children(): self.notebook.remove(child) files=epitaxy_get_dos_files() for i in range(0,epitaxy_get_layers()): pl_file=epitaxy_get_pl_file(i) if pl_file!="none": add_to_widget=True tab=tab_class() tab.show() tab.visible=True name="Luminescence of "+epitaxy_get_name(i) print pl_file,files tab.init(pl_file+".inp",name) tab.label_name=name self.notebook.append_page(tab, gtk.Label(name))
def draw_graph(self): lines=[] total=10 pos=0 bands=10 #circle1=plt.Circle((10,10),4,color='r') if inp_load_file(lines,"mesh.inp")==True: total=inp_sum_items(lines, "#mesh_layer_points0") if inp_load_file(lines,"dump.inp")==True: pos=int(inp_search_token_value(lines, "#dump_energy_slice_pos")) files=epitaxy_get_dos_files() if len(files)>0: if inp_load_file(lines,files[0])==True: bands=int(inp_search_token_value(lines, "#srh_bands")) n=0 self.fig.clf() self.fig.subplots_adjust(bottom=0.2) self.fig.subplots_adjust(left=0.1) self.ax1 = self.fig.add_subplot(111) #ax2 = ax1.twinx() x_pos=0.0 layer=0 color =['r','g','b','y','o','r','g','b','y','o'] self.ax1.set_ylabel('Energy (eV)') #ax2.set_ylabel('Energy (eV)') self.ax1.set_xlabel('Position (nm)') try: t,Ec_data = loadtxt(os.path.join("equilibrium","Ec.dat"), unpack=True) t=t*1e9 Ec, = self.ax1.plot(t,Ec_data, 'ro-', linewidth=3 ,alpha=0.5) t,Ev_data = loadtxt(os.path.join("equilibrium","Ev.dat"), unpack=True) t=t*1e9 Ev,=self.ax1.plot(t,Ev_data, 'go-', linewidth=3 ,alpha=0.5) if len(files)>0: if self.emesh_editor.mesh_dump_ctl.enable==True: Ec_max=max(Ec_data) Ev_min=min(Ev_data) x_len=t[len(t)-1]-t[0] y_len=Ec_max-Ev_min x_pos=t[0]+(x_len)*(float(pos)/float(total)) x_size=(x_len)/float(total)/4 start=float(Ev_data[pos]) stop=float(Ec_data[pos]) y_pos=start dy=(stop-start)/(bands*2) while y_pos<stop: self.ax1.add_patch(Ellipse((x_pos, y_pos), x_size,x_size*(y_len/x_len), facecolor='red', edgecolor=(0,0.0,0.0), linewidth=0, alpha=1.0)) y_pos=y_pos+dy t,s = loadtxt(os.path.join("equilibrium","Fi.dat"), unpack=True) t=t*1e9 Fi,=self.ax1.plot(t,s, 'bo-', linewidth=3 ,alpha=0.5) if self.show_key==True: self.fig.legend((Ec, Ev, Fi), ('LUMO', 'H**O', 'Fi'), 'upper right') else: self.ax1.legend_ = None #self.fig.canvas.draw() except: print "No mode file\n"