docs: def searchTriples(expnums,ccd):
      """Given a list of exposure numbers, find all the KBOs in that set of exposures"""
      import MOPfits,os 
      import MOPdbaccess
      
      if len(expnums)!=3:
          return(-1)
  
  
      
  
  
      mysql=MOPdbaccess.connect('bucket','cfhls','MYSQL')
      bucket=mysql.cursor()
      ### Some program Constants
  
      proc_file = open("proc-these-files","w")
      proc_file.write("# Files to be planted and searched\n")
      proc_file.write("#            image fwhm plant\n")
      
      import string
      import os.path
      filenames=[]
      import pyfits
      for expnum in expnums:
          bucket.execute("SELECT obs_iq_refccd FROM exposure WHERE expnum=%s" , (expnum, ) )
          row=bucket.fetchone()
          fwhm=row[0]
          if not fwhm > 0:
              fwhm=1.0
  
          if int(ccd)<18:
              cutout="[-*,-*]"
          else:
              cutout=None
          filename=MOPfits.adGet(str(expnum)+"p",extno=int(ccd),cutout=cutout)
          print filename
          if not os.access(filename,os.R_OK):
              return(-3)
          filename=os.path.splitext(filename)
          filenames.append(filename[0])
          proc_file.write("%s %f %s \n" % ( filename[0], fwhm/0.183, "no"))
  
      proc_file.flush()
      proc_file.close()
      
      command="find.pl -p '' -d ./ "
      sys.stderr.write(command)
      try:
          os.system(command)
      except:
          sys.stderr.write("Failed while running find")
      
  
      file_extens=[
          "cands.comb",
          "measure3.cands.astrom",
          "measure3.WARNING",
          "measure3.astrom.scatter"]
      
      if os.access("find.OK",os.R_OK):
          os.system("touch /home/cadc/kavelaar/results/05AQ06B/"+filenames[0]+".OK")
      else:
          os.system("touch /home/cadc/kavelaar/results/05AQ06B/"+filenames[0]+".FAILED")
          
          ### look for the cand.comb file and store in the DB
      import shutil
      for ext in file_extens:
          if os.access(filenames[0]+"."+ext,os.R_OK):
              shutil.copy(filenames[0]+"."+ext,"/home/cadc/kavelaar/results/05AQ06B")
      astrom=filenames[0]+".measure3.cands.astrom"
      print astrom
      cmd = "mpc_gen.pl -c "+astrom
      print os.access(astrom,os.R_OK)
      if os.access(astrom,os.R_OK):
          print cmd
          os.system(cmd)
          os.system("mpcIngest.pl *.MPC")
  	os.system("cp *.MPC /home/cadc/kavelaar/results/05AQ06B")
  	return(1)
      return(0)