Exemple #1
0
    def mmotion(self):
        print "Minimizing micromotion. Initially MMamp:", self.MMAmp()
        print "Remember that integration time should be 'long'"
        Topmid = self.TopmidRead()
        Comp = self.CompRead()
        # 		Topmid=3.6
        # 		Comp=3.4
        print "Initial values: Topmid=%f, Comp=%f" % (Topmid, Comp)
        # Variation parameters:
        # 		nsteps=50 # number of steps for each dimension
        # 		stepsize=0.001 # volts
        # 		stepdelay=0.5 # seconds
        acc = 1e-3
        delta = acc * 10
        pi = sp.array([[Topmid, Comp], [Topmid + delta, Comp + delta], [Topmid - delta, Comp - delta]])

        F = self.VSetAndProbe
        F(pi[0])
        # Run downhill algorithm (for one RF setting):
        # Let's assume RF=14.32 MHz
        pf = downhill.amoeba(F, pi, acc)
        print "Final values: Topmid=%f, Comp=%f" % (Topmid, Comp)
        print "Micromotion amplitude:", self.MMAmp()
Exemple #2
0
	def mmotion(self):
		print "Minimizing micromotion. Initially MMamp:",self.MMAmp()
		print "Remember that integration time should be 'long'"
		Topmid=self.TopmidRead()
		Comp=self.CompRead()
#		Topmid=3.6
#		Comp=3.4
		print "Initial values: Topmid=%f, Comp=%f"%(Topmid,Comp)
		# Variation parameters:
#		nsteps=50 # number of steps for each dimension
#		stepsize=0.001 # volts
#		stepdelay=0.5 # seconds	
		acc=1e-3
		delta=acc*10
		pi=sp.array([[Topmid,Comp],[Topmid+delta,Comp+delta],[Topmid-delta,Comp-delta]])
		
		F=self.VSetAndProbe
		F(pi[0])
		# Run downhill algorithm (for one RF setting):
		# Let's assume RF=14.32 MHz
		pf=downhill.amoeba(F,pi,acc)
		print "Final values: Topmid=%f, Comp=%f"%(Topmid,Comp)
		print "Micromotion amplitude:",self.MMAmp()
Exemple #3
0
                Backquarter=self.BackquarterRead()
		print "Initial values: Topmid=%.4f, Comp=%.4f, Backquarter=%.4f"%(Topmid,Comp,Backquarter)
		# Variation parameters:
		acc=self.acc #1e-4
		delta=self.delta #acc*30
		pi=sp.array([[Topmid,Comp,Backquarter],[Topmid-delta,Comp-delta,Backquarter-delta],[Topmid+delta,Comp+delta,Backquarter+delta],[Topmid+delta,Comp-delta,Backquarter]])
		
                try:
                        F=self.VSetAndProbe
#                        F(pi[0])
                except Exception,e:
                    print "Exception:",e
                    raise e
#    Run downhill alogrithm to find minimum in space of comp, top mid and back quarter
		try:
                    pf=downhill.amoeba(F,pi,acc)
                except Exception,e:
                    print time.strftime("%H:%M:%S"),"Exception occured in downhill amoeba:",e
                    raise e
		self.MMAmp_f=float(self.ReadIonPMTALL()[4])
		if None==pf:
                    improvement=-1
                    print "pf is not available!"
                else:
        		improvement=self.MMAmp_f-self.MMAmp_i
		print "Micromotion amplitude:",self.MMAmp_f, "Initially:",self.MMAmp_i
		print "Delta MMAmplitude:",improvement,improvement/abs(self.MMAmp_i)*100.,"in percent"
		
		self.InttimeSet(self.inttime_i)
		self.Magic(0)
                self.SetDDS_FREQ1(self.ReadParameter('F_BlueHi'))