def templatePick(self, diam=256, thresh=0.5, maxthresh=0.8, maxsize=0.05, lowpass=25, bin=4, rangelist="0,360,15x"):
		runnum = apParticle.getNumSelectionRunsFromSession(self.sessionname)
		tmplname = "tmplrun%d-%s"%(runnum+1, self.timestamp)

		templateids = self.getMostRecentTemplates(3)
		
		script = os.path.join(self.appiondir, "bin", "templateCorrelator.py ")
		params = (" --runname=%s --projectid=%d --session=%s --diam=%d --thresh=%.2f --maxthresh=%.2f --invert --no-wait --planereg --maxsize=%.2f --lowpass=%d --bin=%d --thread-findem "
			%(tmplname, self.params['projectid'], self.sessionname, diam, thresh, maxthresh, maxsize, lowpass, bin))

		# TODO: what should these lists be set to?
		tmplliststr = " --template-list="
		rangeliststr = " --range-list="
		for templateid in templateids:
			tmplliststr += "%d,"%(templateid)
			#rangeliststr += "%d,%d,%dx"%(0,360,15)
			rangeliststr += rangelist
		params += tmplliststr[:-1]
		params += rangeliststr[:-1]
		
		# Add appion flags 
		params += self.appionFlags

		self.runCommand(script+" "+params)
		return tmplname
    def templatePick(self):
        runnum = apParticle.getNumSelectionRunsFromSession(self.sessionname)
        tmplname = "tmplrun%d-%s" % (runnum + 1, self.timestamp)

        templateids = self.getMostRecentTemplates(3)

        script = os.path.join(self.appiondir, "bin", "templateCorrelator.py ")
        params = (
            " --runname=%s --projectid=%d --session=%s --diam=%d --thresh=%.2f --maxthresh=%.2f --invert --no-wait --planereg --maxsize=%.2f --lowpass=%d --bin=%d --thread-findem "
            % (tmplname, self.params["projectid"], self.sessionname, 256, 0.5, 0.8, 0.05, 25, 4)
        )

        tmplliststr = " --template-list="
        rangeliststr = " --range-list="
        for templateid in templateids:
            tmplliststr += "%d," % (templateid)
            rangeliststr += "%d,%d,%dx" % (0, 360, 15)
        params += tmplliststr[:-1]
        params += rangeliststr[:-1]
        if self.params["commit"] is True:
            params += " --commit "
        else:
            params += " --no-commit "
        self.runCommand(script + " " + params)
        return tmplname
	def dogPicker(self):
		runnum = apParticle.getNumSelectionRunsFromSession(self.sessionname)
		dogname = "dogrun%d-%s"%(runnum+1, self.timestamp)

		script = os.path.join(self.appiondir, "bin", "dogPicker.py ")
		params = (" --runname=%s --projectid=%d --session=%s --diam=%d --thresh=%.2f --maxthresh=%.2f --invert --no-wait --planereg --maxsize=%.2f --numslices=%d --sizerange=%d  --bin=%d "
			%(dogname, self.params['projectid'], self.sessionname, 150, 0.42, 0.8, 0.5, 3, 50, 4))
		if self.params['commit'] is True:
			params += " --commit "
		else:
			params += " --no-commit "
		self.runCommand(script+" "+params)
		return dogname
        def dogPicker(self):
                runnum = apParticle.getNumSelectionRunsFromSession(self.sessionname)
                dogname = "dogrun%d-%s"%(runnum+1, self.timestamp)

                script = os.path.join(self.appiondir, "bin", "dogPicker.py ")
                params = (" --runname=%s --projectid=%d --session=%s --diam=%d --thresh=%.2f --maxthresh=%.2f --invert --no-wait --planereg --maxsize=%.2f --numslices=%d --sizerange=%d  --bin=%d "
                        %(dogname, self.params['projectid'], self.sessionname, 150, 0.42, 0.8, 0.5, 3, 50, 4))
                if self.params['commit'] is True:
                        params += " --commit "
                else:
                        params += " --no-commit "
                self.runCommand(script+" "+params)
                return dogname
	def dogPicker(self, diam=150, thresh=0.42, maxthresh=0.8, peaktype='centerofmass', median=2, lowpass=15, highpass=0, maxsize=0.5, numslices=3, pixlimit=4.0, sizerange=50, bin=4 ):
		runnum = apParticle.getNumSelectionRunsFromSession(self.sessionname)
		dogname = "dogrun%d-%s"%(runnum+1, self.timestamp)

		# Build the command
		script = os.path.join(self.appiondir, "bin", "dogPicker.py ")
		params = (" --runname=%s --projectid=%d --session=%s --diam=%d --thresh=%.2f --maxthresh=%.2f --invert --no-wait --peaktype=%s --median=%d --lowpass=%d --highpass=%d --planereg --maxsize=%.2f --numslices=%d --pixlimit=%.2f --sizerange=%d  --bin=%d"
			%(dogname, self.params['projectid'], self.sessionname, diam, thresh, maxthresh, peaktype, median, lowpass, highpass, maxsize, numslices, pixlimit, sizerange, bin ))
		
		# Add appion flags 
		params += self.appionFlags
		
		# Run the command
		self.runCommand(script+" "+params)
		return dogname
	def templatePick(self):
		runnum = apParticle.getNumSelectionRunsFromSession(self.sessionname)
		tmplname = "tmplrun%d-%s"%(runnum+1, self.timestamp)

		templateids = self.getMostRecentTemplates(3)
		
		script = os.path.join(self.appiondir, "bin", "templateCorrelator.py ")
		params = (" --runname=%s --projectid=%d --session=%s --diam=%d --thresh=%.2f --maxthresh=%.2f --invert --no-wait --planereg --maxsize=%.2f --lowpass=%d --bin=%d --thread-findem "
			%(tmplname, self.params['projectid'], self.sessionname, 256, 0.5, 0.8, 0.05, 25, 4))

		tmplliststr = " --template-list="
		rangeliststr = " --range-list="
		for templateid in templateids:
			tmplliststr += "%d,"%(templateid)
			rangeliststr += "%d,%d,%dx"%(0,360,15)
		params += tmplliststr[:-1]
		params += rangeliststr[:-1]
		if self.params['commit'] is True:
			params += " --commit "
		else:
			params += " --no-commit "
		self.runCommand(script+" "+params)
		return tmplname