Beispiel #1
0
	def buttonCalculateTime_clicked(self):
		results = []
		dirString = self.timeFields[0].text() + '/'
		for indx, x in enumerate(self.timeSeriesFileNames):
			tmp = {}
			tmp['TIME'] = float(indx) / float(self.timeFields[3].text())
			if self.checkSingleBlank.isChecked():
				tmp['PLQE'] = PLQE.calcSinglePLQE(dirString+x["ON"], dirString+x["OFF"], x["BLANK"])
			else:
				tmp['PLQE'] = PLQE.calcSinglePLQE(dirString+x["ON"], dirString+x["OFF"], dirString+x["BLANK"])
			results.append(tmp)
			self.progressBarTime.setValue(indx+1)

		print("Time (s):\tPLQY: ")
		times = []
		plqes = []
		for res in results:
			print(str(res['TIME']) + '\t' + str(res['PLQE']) + " %")
			times.append(res['TIME'])
			plqes.append(res['PLQE'])

		fig = pl.figure(figsize=(6,2))
		fig.patch.set_alpha(0.0)

		pl.xlabel("t (s)")
		pl.ylabel("PLQE")
		pl.scatter(times,plqes,s=5)
		pl.show()

		self.labelParsedTime.setText("No Parsed Samples.")
		self.buttonsTimeSeries[3].setEnabled(0)
Beispiel #2
0
	def buttonCalculatePowerSeries_clicked(self):
		result = []
		dirString = self.powerFields[0].text() + "/"
		for indx, power in enumerate(self.powerSeries):
			plqe = 0.0
			if self.checkSingleBlank.isChecked():
				plqe = PLQE.calcSinglePLQE(dirString+power["ON"], dirString+power["OFF"], power["BLANK"])
			else:
				plqe = PLQE.calcSinglePLQE(dirString+power["ON"], dirString+power["OFF"], dirString+power["BLANK"])
			result.append([self.stringSeries[indx],plqe])
			self.progressBar.setValue(indx+1)

		print("Power:\tPLQY: ")
		power = []
		plqe = []
		for res in result:
			print(str(res[0]) + '\t' + str(res[1]) + " %")
			power.append(res[0])
			plqe.append(res[1])

		fig = pl.figure(figsize=(6,2))
		fig.patch.set_alpha(0.0)

		pl.xlabel("Power (mW)")
		pl.ylabel("PLQE")
		pl.scatter(power,plqe)
		pl.show()

		self.labelParsed.setText("No Parsed Samples.")
		self.buttonsPowerSeries[3].setEnabled(0)
Beispiel #3
0
	def buttonCalculateSingle_clicked(self):
		if (self.validateFiles):
			ret = PLQE.calcSinglePLQE(self.fileFields[0].text(),self.fileFields[1].text(),self.fileFields[2].text())
			print(ret)
			self.resultPLQE.setText(str(ret) + " %")