Beispiel #1
0
    def update_cmp(self):
        cmpopt = parsemodopt(self.simcmp)

        progress = QtGui.QProgressDialog("Computing similarities", "Abort", 0,
                                         len(self.proj_data), None)
        progress.show()
        ptcl = self.ptcl_data[self.current_particle]
        for i, p in enumerate(self.proj_data):
            ali = p.copy()
            ali.transform(p["ptcl.align2d"])
            try:
                p["cmp"] = -ptcl.cmp(cmpopt[0], ali, cmpopt[1])
            except:
                print(traceback.print_exc())
                QtGui.QMessageBox.warning(
                    None, "Error",
                    "Invalid similarity metric string, or other comparison error"
                )
                progress.close()
                return
            progress.setValue(i)
            QtGui.qApp.processEvents()

        progress.close()
        self.set_emdata_list_as_data(self.proj_data, "cmp")
        #		self.regen_dl(True)
        EM3DSymModel.render(self)
Beispiel #2
0
	def render(self):
		if self.inspector == None: self.get_inspector()
		if self.projections == None:
			try:self.init_vitals()
			except: return
			#except:
			#	self.get_inspector()
			#	print "failed to initialize vital information"
			#	return

		EM3DSymModel.render(self)
Beispiel #3
0
	def render(self):
		if self.inspector == None: self.get_inspector()
			
		EM3DSymModel.render(self)