Esempio n. 1
0
	def callback_edit(self, widget, data=None):
		if type(widget)==gtk.Entry:
			a=undo_list_class()
			a.add([self.file_name, data, inp_get_token_value(self.file_name, data),widget])
			inp_update_token_value(self.file_name, data, widget.get_text(),1)
		else:
			inp_update_token_value(self.file_name, data, widget.get_active_text(),1)

		my_help_class.help_set_help(["save.png","<big><b>Saved to disk</b></big>\n"])
Esempio n. 2
0
	def callback_examine(self, widget, data=None):
		my_help_class.help_set_help(["plot_time.png",_("<big><b>Examine the results in time domain</b></big>\n After you have run a simulation in time domain, if is often nice to be able to step through the simulation and look at the results.  This is what this window does.  Use the slider bar to move through the simulation.  When you are simulating a JV curve, the slider sill step through voltage points rather than time points.")])
		mycmp=cmp_class()
		ret=mycmp.init()
		if ret==False:
			md = gtk.MessageDialog(None, gtk.DIALOG_DESTROY_WITH_PARENT, gtk.MESSAGE_WARNING,  gtk.BUTTONS_CLOSE, _("Re-run the simulation with 'dump all slices' set to one to use this tool."))
        		md.run()
        		md.destroy()
			return
Esempio n. 3
0
	def callback_edit_experiment_window(self, widget, data=None):

		if self.experiment_window==None:
			self.experiment_window=experiment()
			self.experiment_window.init()

		my_help_class.help_set_help(["time.png",_("<big><b>The time mesh editor</b></big>\n To do time domain simulations one must define how voltage the light vary as a function of time.  This can be done in this window.  Also use this window to define the simulation length and time step.")])
		if self.experiment_window.get_property("visible")==True:
			self.experiment_window.hide_all()
		else:
			self.experiment_window.show_all()
Esempio n. 4
0
	def callback_optics_sim(self, widget, data=None):
		my_help_class.help_set_help(["optics.png",_("<big><b>The optical simulation window</b></big>\nUse this window to perform optical simulations.  Click on the play button to run a simulation."),"play.png",_("Click on the play button to run an optical simulation.  The results will be displayed in the tabs to the right.")])

		if self.optics_window==False:
			self.optics_window=class_optical()
			self.optics_window.init()

		if self.optics_window.get_property("visible")==True:
			self.optics_window.hide()
		else:
			self.optics_window.show()
Esempio n. 5
0
	def callback_fxexperiment_window(self, widget, data=None):

		if self.fxexperiment_window==None:
			self.fxexperiment_window=fxexperiment()
			self.fxexperiment_window.init()

		my_help_class.help_set_help(["spectrum.png",_("<big><b>Frequency domain mesh editor</b></big>\n Some times it is useful to do frequency domain simulations such as when simulating impedance spectroscopy.  This window will allow you to choose which frequencies will be simulated.")])
		if self.fxexperiment_window.get_property("visible")==True:
			self.fxexperiment_window.hide_all()
		else:
			self.fxexperiment_window.show_all()
Esempio n. 6
0
	def callback_scan(self, widget, data=None):
		my_help_class.help_set_help(["scan.png",_("<big><b>The scan window</b></big>\n Very often it is useful to be able to systematically very a device parameter such as mobility or density of trap states.  This window allows you to do just that."),"add.png",_("Use the plus icon to add a new scan line to the list.")])
		self.tb_run_scan.set_sensitive(True)

		if self.scan_window==None:
			self.scan_window=scan_class(gtk.WINDOW_TOPLEVEL)
			self.scan_window.init(self.my_server)


		if self.scan_window.get_property("visible")==True:
			self.scan_window.hide()
		else:
			self.scan_window.show()
Esempio n. 7
0
	def add_line(self,data):
		my_help_class.help_set_help(["forward.png",_("<big><b>The scan window</b></big>\n Now using the drop down menu in the prameter to change 'column', select the device parameter you wish to vary, an example may be dos0/Electron Mobility. Now enter the values you would like it to scan oveer in the  'Values', an example could be '1e-3 1e-4 1e-5 1e-6'.  And hit the double arrorw to run the simulation.")])
		selection = self.treeview.get_selection()
		model, pathlist = selection.get_selected_rows()

		if len(pathlist)!=0:
			path = pathlist[0][0]
			#path = model.get_path(iter)[0]
			self.liststore_combobox.insert(path+1,data)
		else:
			self.liststore_combobox.append(data)
		self.save_combo()
		self.rebuild_liststore_op_type()
Esempio n. 8
0
 def gui_sim_stop(self):
     text = self.check_warnings()
     self.progress_window.stop()
     self.statusicon.set_from_stock(gtk.STOCK_YES)
     self.extern_gui_sim_stop("Finished simulation")
     my_help_class.help_set_help(
         ["plot.png", _("<big><b>Simulation finished!</b></big>\nClick on the plot icon to plot the results")]
     )
     print text
     if len(text) != 0:
         message = gtk.MessageDialog(type=gtk.MESSAGE_ERROR, buttons=gtk.BUTTONS_OK)
         message.set_markup(text)
         message.run()
         message.destroy()
Esempio n. 9
0
	def on_selection_changed(self, widget):
		selected=self.icon_view.get_selected_items()
		if len(selected)!=0:
			icon_pos=selected[0][0]
			icon_name=self.store[icon_pos][0]
			icon_type=self.store[icon_pos][COL_IS_DIRECTORY]
			full_path=os.path.join(self.dir,icon_name)
			if icon_type=="dat":
				state=plot_state()
				get_plot_file_info(state,full_path)
				summary="<big><b>"+self.store[icon_pos][0]+"</b></big>\n"+_("\ntitle: ")+state.title+_("\nx axis: ")+state.x_label+" ("+latex_to_pygtk_subscript(state.x_units)+_(")\ny axis: ")+state.y_label+" ("+latex_to_pygtk_subscript(state.y_units)+_(")\n\n<big><b>Double click to open</b></big>")
				my_help_class.help_set_help(["dat_file.png",summary])

			if icon_name.endswith("equilibrium"):
				state=plot_state()
				get_plot_file_info(state,full_path)
				summary="<big><b>equilibrium</b></big>\n"+_("\nThis contains the simulation output at 0V in the dark.")
				my_help_class.help_set_help(["dir_file.png",summary])
Esempio n. 10
0
	def callback_plot_select(self, widget, data=None):
		my_help_class.help_set_help(["dat_file.png",_("<big>Select a file to plot</big>\nSingle clicking shows you the content of the file")])

		dialog=opvdm_open()
		dialog.show_inp_files=False
		dialog.show_directories=False

		dialog.init(os.getcwd())
		response=dialog.run()

		if response == True:
			full_file_name=dialog.get_filename()
			#self.plot_open.set_sensitive(True)

			plot_gen([dialog.get_filename()],[],"auto")

			self.plotted_graphs.refresh()
			self.plot_after_run_file=dialog.get_filename()
		elif response == gtk.RESPONSE_CANCEL:
		    print _("Closed, no files selected")
		dialog.destroy()
Esempio n. 11
0
	def help(self):
		my_help_class.help_set_help(["tab.png","<big><b>Density of States</b></big>\nThis tab contains the electrical model parameters, such as mobility, tail slope energy, and band gap."])
	def help(self):
		my_help_class.help_set_help(["icon.png",_("<big><b>Welcome to gpvdm</b></big>\n The window will provide you with information about new versions and bugs in gpvdm.")])
Esempio n. 13
0
 def help(self):
     my_help_class.help_set_help([
         "icon.png",
         _("<big><b>Welcome to gpvdm</b></big>\n The window will provide you with information about new versions and bugs in gpvdm."
           )
     ])
Esempio n. 14
0
	def help(self):
		my_help_class.help_set_help(["device.png",_("<big><b>The device structure tab</b></big>\n Use this tab to change the structure of the device, the layer thicknesses and to perform optical simulations.  You can also browse the materials data base and  edit the electrical mesh.")])
Esempio n. 15
0
	def help(self):
		my_help_class.help_set_help(["command.png","<big><b>The terminal window</b></big>\nThe model will run in this window.  You can also use it to enter bash commands."])
Esempio n. 16
0
	def help(self):
		my_help_class.help_set_help(["tab.png","<big><b>Luminescence</b></big>\nIf you set 'Turn on luminescence' to true, the simulation will assume recombination is a raditave process and intergrate it to produce Voltage-Light intensity curves (lv.dat).  Each number in the tab tells the model how efficient each recombination mechanism is at producing photons."])
Esempio n. 17
0
	def change_dir_and_refresh_interface(self,new_dir):
		print "rod",os.getcwd(),new_dir
 		scan_items_clear()
		os.chdir(new_dir)
		calculate_paths()
		epitaxy_load()
		self.config.load(os.getcwd())
		print "rod",os.getcwd(),new_dir
		self.status_bar.push(self.context_id, os.getcwd())
		#self.plot_open.set_sensitive(False)

		self.notebook.set_item_factory(self.item_factory)
		if self.notebook.load()==True:
			self.sim_mode.update()
			self.ti_light.connect('refresh', self.notebook.main_tab.update)
			self.play.set_sensitive(True)
			self.stop.set_sensitive(True)
			self.examine.set_sensitive(True)
			self.param_scan.set_sensitive(True)
			self.plot_select.set_sensitive(True)
			self.undo.set_sensitive(True)
			#self.save_sim.set_sensitive(True)
			self.experiment_window_button.set_sensitive(True)
			my_help_class.help_set_help(["play.png",_("<big><b>Now run the simulation</b></big>\n Click on the play icon to start a simulation.")])

			my_item=self.item_factory.get_item(_("/File/Import data"))
			if my_item!=None:
				my_item.set_sensitive(True)
			my_item=self.item_factory.get_item(_("/File/Export data"))
			if my_item!=None:
				my_item.set_sensitive(True)
			my_item=self.item_factory.get_item(_("/File/Import data"))
			if my_item!=None:
				my_item.set_sensitive(True)
			my_item=self.item_factory.get_item(_("/File/Import from library"))
			if my_item!=None:
				my_item.set_sensitive(True)
			my_item=self.item_factory.get_item(_("/Simulate/Run"))
			if my_item!=None:
				my_item.set_sensitive(True)
			my_item=self.item_factory.get_item(_("/Simulate/Parameter scan"))
			if my_item!=None:
				my_item.set_sensitive(True)

		else:
			self.play.set_sensitive(False)
			self.stop.set_sensitive(False)
			self.examine.set_sensitive(False)
			self.param_scan.set_sensitive(False)
			self.plot_select.set_sensitive(False)
			self.undo.set_sensitive(False)
			#self.save_sim.set_sensitive(False)
			self.experiment_window_button.set_sensitive(False)
			my_help_class.help_set_help(["icon.png",_("<big><b>Hi!</b></big>\n I'm the on-line help system :).  If you find any bugs please report them to [email protected]."),"new.png",_("Click on the new icon to make a new simulation directory.")])

			my_item=self.item_factory.get_item(_("/File/Import data"))
			if my_item!=None:
				my_item.set_sensitive(False)
			my_item=self.item_factory.get_item(_("/File/Export data"))
			if my_item!=None:
				my_item.set_sensitive(False)
			my_item=self.item_factory.get_item(_("/File/Import data"))
			if my_item!=None:
				my_item.set_sensitive(False)
			my_item=self.item_factory.get_item(_("/File/Import from library"))
			if my_item!=None:
				my_item.set_sensitive(False)
			my_item=self.item_factory.get_item(_("/Simulate/Run"))
			if my_item!=None:
				my_item.set_sensitive(False)
			my_item=self.item_factory.get_item(_("/Simulate/Parameter scan"))
			if my_item!=None:
				my_item.set_sensitive(False)

		if self.notebook.terminal!=None:
			self.my_server.set_terminal(self.notebook.terminal)
		self.notebook.show()

		self.plotted_graphs.init(os.getcwd(),self.callback_last_menu_click)

		set_active_name(self.light, inp_get_token_value("light.inp", "#Psun"))

		scan_item_add("sim.inp","#simmode","sim mode",1)
		scan_item_add("light.inp","#Psun","light intensity",1)


		if self.scan_window!=None:
			del self.scan_window
			self.scan_window=None

		if self.experiment_window!=None:
			del self.experiment_window
			self.experiment_window=None

		if self.fxexperiment_window!=None:
			del self.fxexperiment_window
			self.fxexperiment_window=None


		if self.qe_window!=None:
			del self.qe_window
			self.qe_window=None