Exemplo n.º 1
0
	def __init__(self,ptclfiles,ns,ptcls,nc,euler,basisn,verbose):
		"""ptclfiles is a list of 2 (even/odd) particle stacks. ns is the number of particles in each of ptcfiles. ptcls is a list of lists containing [eo,ptcl#,Transform]"""
#		sys.stderr=file("task.err","a")
		data={"particles1":["cache",ptclfiles[0],(0,ns[0])],"particles2":["cache",ptclfiles[1],(0,ns[1])]}
		JSTask.__init__(self,"ClassSplit",data,{},"")

		self.options={"particles":ptcls,"classnum":nc,"euler":euler,"basisn":basisn,"verbose":verbose}
Exemplo n.º 2
0
    def __init__(self, volume, sym, comp, xform):
        data = {"volume": volume}
        JSTask.__init__(self, "CmpTilt", data, {}, "")

        self.sym = sym
        self.cmp = comp
        self.xform = xform
Exemplo n.º 3
0
	def __init__(self, image, options, angle, outimage):
	
		data={"image":image}
		
		JSTask.__init__(self,"TomoPreproc2d",data,{},"")

		self.classoptions={"options":options, "angle":angle,"outimage":outimage }
Exemplo n.º 4
0
	def __init__(self,image,options,ptclnum,outname):
	#def __init__(self,options,ptclnum,outname):
		data={"image":image}
		
		JSTask.__init__(self,"Preproc3d",data,{},"")

		self.classoptions={"options":options,"ptclnum":ptclnum,"outname":outname}
Exemplo n.º 5
0
    def __init__(self, volume, sym, comp, xform):
        data = {"volume": volume}
        JSTask.__init__(self, "CmpTilt", data, {}, "")

        self.sym = sym
        self.cmp = comp
        self.xform = xform
Exemplo n.º 6
0
	def __init__(self, image, options, angle, outimage):
	
		data={"image":image}
		
		JSTask.__init__(self,"TomoPreproc2d",data,{},"")

		self.classoptions={"options":options, "angle":angle,"outimage":outimage }
Exemplo n.º 7
0
	def __init__(self,image,options,ptclnum,outname):
	#def __init__(self,options,ptclnum,outname):
		data={"image":image}
		
		JSTask.__init__(self,"Preproc3d",data,{},"")

		self.classoptions={"options":options,"ptclnum":ptclnum,"outname":outname}
Exemplo n.º 8
0
 def __init__(self,
              ptclfile=None,
              ptcln=0,
              orts=[],
              tryid=0,
              strucfac=None,
              niter=5,
              sym="c1",
              mask2=None,
              randorient=False,
              automaskexpand=-1,
              verbose=0):
     data = {
         "images": ["cache", ptclfile, (0, ptcln)],
         "strucfac": strucfac,
         "orts": orts,
         "mask2": mask2
     }
     JSTask.__init__(
         self, "InitMdl", data, {
             "tryid": tryid,
             "iter": niter,
             "sym": sym,
             "randorient": randorient,
             "automaskexpand": automaskexpand,
             "verbose": verbose
         }, "")
Exemplo n.º 9
0
	def __init__(self,ptclfiles,ns,ptcls,nc,euler,mask,usebasis,nbasis,novarimax,verbose):
		"""ptclfiles is a list of 2 (even/odd) particle stacks. ns is the number of particles in each of ptcfiles. ptcls is a list of lists containing [eo,ptcl#,Transform]"""
#		sys.stderr=file("task.err","a")
		data={"particles1":["cache",ptclfiles[0],(0,ns[0])],"particles2":["cache",ptclfiles[1],(0,ns[1])]}
		JSTask.__init__(self,"ClassSplit",data,{},"")

		self.options={"particles":ptcls,"classnum":nc,"euler":euler,"usebasis":usebasis,"novarimax":novarimax,"nbasis":nbasis,"mask":mask,"verbose":verbose}
Exemplo n.º 10
0
    def __init__(self, options, imgfile, imgindx, outf):

        JSTask.__init__(self, "TomoBoxer3d", {}, "")
        self.classoptions = {
            "options": options,
            "imgfile": imgfile,
            "imgindx": imgindx,
            "outf": outf
        }
Exemplo n.º 11
0
	def __init__(self,imagefile,imagenums,usefilt=None,ref=None,niter=1,normproc=("normalize.edgemean",{}),prefilt=0,align=("rotate_translate_flip",{}),
		  aligncmp=("ccc",{}),ralign=None,raligncmp=None,averager=("mean",{}),scmp=("ccc",{}),keep=1.5,keepsig=1,automask=0,saveali=0,setsfref=0,verbose=0,n=0,center="xform.center"):
		if usefilt==None : usefilt=imagefile
		self.center=center
		data={"images":["cache",imagefile,imagenums],"usefilt":["cache",usefilt,imagenums]}
		if ref!=None : data["ref"]=["cache",ref,n]
		JSTask.__init__(self,"ClassAv",data,{},"")

		self.options={"niter":niter, "normproc":normproc, "prefilt":prefilt, "align":align, "aligncmp":aligncmp,
			"ralign":ralign,"raligncmp":raligncmp,"averager":averager,"scmp":scmp,"keep":keep,"keepsig":keepsig,
			"automask":automask,"saveali":saveali,"setsfref":setsfref,"verbose":verbose,"n":n}
Exemplo n.º 12
0
 def __init__(self, options, xsize, ysize, y, projection_operator,
              tiltangles, nimgs):
     JSTask.__init__(self, "TVRecon", '', {}, "")
     self.classoptions = {
         "options": options,
         "xsize": xsize,
         "ysize": ysize,
         "y": y,
         "projection_operator": projection_operator,
         "tiltangles": tiltangles,
         "nimgs": nimgs
     }
Exemplo n.º 13
0
    def __init__(self, command="e2project3d.py", data=None, options=None):
        JSTask.__init__(self, command, data, options)

        # data has these keys:
        # input - which is the name of the threed model - a Task-style cache
        # eulers - a list of Transforms with which to generate projections
        # indices - indices that correspond to the ordering, has to be the same length as eulers. Returned to calling routine - use to write output in order. Not sure about this.

        # options has these keys
        # projector - [string,dict] convention

        self.projections = {}  # key will be index, value will be projection
Exemplo n.º 14
0
    def __init__(self, command="e2project3d.py", data=None, options=None):
        JSTask.__init__(self, command, data, options)

        # data has these keys:
        # input - which is the name of the threed model - a Task-style cache
        # eulers - a list of Transforms with which to generate projections
        # indices - indices that correspond to the ordering, has to be the same length as eulers. Returned to calling routine - use to write output in order. Not sure about this.

        # options has these keys
        # projector - [string,dict] convention

        self.projections = {}  # key will be index, value will be projection
Exemplo n.º 15
0
	def __init__(self,imagefile,imagenums,usefilt=None,ref=None,focused=None,niter=1,normproc=("normalize.edgemean",{}),prefilt=0,align=("rotate_translate_flip",{}),
		  aligncmp=("ccc",{}),ralign=None,raligncmp=None,averager=("mean",{}),scmp=("ccc",{}),keep=1.5,keepsig=1,automask=0,saveali=0,setsfref=0,verbose=0,n=0,center="xform.center"):
		if usefilt==None : usefilt=imagefile
		self.center=center
		data={"images":["cache",imagefile,imagenums],"usefilt":["cache",usefilt,imagenums]}
		if ref!=None : data["ref"]=["cache",ref,n]
		if focused!=None : data["focused"]=["cache",focused,n]
		JSTask.__init__(self,"ClassAv",data,{},"")

		self.options={"niter":niter, "normproc":normproc, "prefilt":prefilt, "align":align, "aligncmp":aligncmp,
			"ralign":ralign,"raligncmp":raligncmp,"averager":averager,"scmp":scmp,"keep":keep,"keepsig":keepsig,
			"automask":automask,"saveali":saveali,"setsfref":setsfref,"verbose":verbose,"n":n}
Exemplo n.º 16
0
    def __init__(self, ptclfiles, ns, ptcls, nc, euler, verbose):
        """ptclfiles is a list of 2 (even/odd) particle stacks. ns is the number of particles in each of ptcfiles. ptcls is a list of lists containing [eo,ptcl#,Transform]"""
        data = {
            "particles1": ["cache", ptclfiles[0], (0, ns[0])],
            "particles2": ["cache", ptclfiles[1], (0, ns[1])]
        }
        JSTask.__init__(self, "ClassSplit", data, {}, "")

        self.options = {
            "particles": ptcls,
            "classnum": nc,
            "euler": euler,
            "verbose": verbose
        }
Exemplo n.º 17
0
	def __init__(self,ptcl,ptid,nodes,align=None,alicmp=("dot",{}),cmp=("dot",{}), ralign=None, alircmp=("dot",{}),cmptmp=None,masktmp=None):
		rt=EMUtil.get_image_count(nodes)
		if cmptmp==None or masktmp==None:
			### Compare to the two children seperately 
			data={"images":["cache",ptcl,ptid], "nodes":["cache",nodes,0,rt]}
			cmpdiff=False
		else:
			### Mask out the difference between the two children
			cn=EMUtil.get_image_count(cmptmp)
			mn=EMUtil.get_image_count(masktmp)
			data={"images":["cache",ptcl,ptid], "nodes":["cache",nodes,0,rt], "cmptmp":["cache",cmptmp,0,cn], "masktmp":["cache",masktmp,0,mn] }
			cmpdiff=True
			
		JSTask.__init__(self,"TreeClassify",data,{},"")
		self.options={"align":align, "alicmp":alicmp, "cmp":cmp, "ralign":ralign, "alircmp":alircmp,"cmpdiff":cmpdiff, "id":ptid}
Exemplo n.º 18
0
	def __init__(self, volume, tilted, imgnum, eulerxform, zrot, distplot, tiltrange, tiltstep, options):
		if options.shrink:
			shrunkvol = volume.process("math.meanshrink",{"n":options.shrink})
			shrunktilted = tilted.process("math.meanshrink",{"n":options.shrink})
			data = {"volume":shrunkvol,"tilted":shrunktilted}
		else:
			data = {"volume":volume,"tilted":tilted}
		JSTask.__init__(self,"CmpTilt",data,options,"")
		
		self.imgnum = imgnum
		self.eulerxform=eulerxform
		self.zrot=zrot
		self.distplot=distplot
		self.tiltrange=tiltrange
		self.tiltstep=tiltstep
Exemplo n.º 19
0
	def __init__(self,ptcl,ptid,nodes,align=None,alicmp=("dot",{}),cmp=("dot",{}), ralign=None, alircmp=("dot",{}),cmptmp=None,masktmp=None):
		rt=EMUtil.get_image_count(nodes)
		if cmptmp==None or masktmp==None:
			### Compare to the two children seperately 
			data={"images":["cache",ptcl,ptid], "nodes":["cache",nodes,0,rt]}
			cmpdiff=False
		else:
			### Mask out the difference between the two children
			cn=EMUtil.get_image_count(cmptmp)
			mn=EMUtil.get_image_count(masktmp)
			data={"images":["cache",ptcl,ptid], "nodes":["cache",nodes,0,rt], "cmptmp":["cache",cmptmp,0,cn], "masktmp":["cache",masktmp,0,mn] }
			cmpdiff=True
			
		JSTask.__init__(self,"TreeClassify",data,{},"")
		self.options={"align":align, "alicmp":alicmp, "cmp":cmp, "ralign":ralign, "alircmp":alircmp,"cmpdiff":cmpdiff, "id":ptid}
Exemplo n.º 20
0
	def __init__(self, volume, tilted, imgnum, eulerxform, zrot, distplot, tiltrange, tiltstep, options):
		if options.shrink:
			shrunkvol = volume.process("math.meanshrink",{"n":options.shrink})
			shrunktilted = tilted.process("math.meanshrink",{"n":options.shrink})
			data = {"volume":shrunkvol,"tilted":shrunktilted}
		else:
			data = {"volume":volume,"tilted":tilted}
		JSTask.__init__(self,"CmpTilt",data,options,"")
		
		self.imgnum = imgnum
		self.eulerxform=eulerxform
		self.zrot=zrot
		self.distplot=distplot
		self.tiltrange=tiltrange
		self.tiltstep=tiltstep
Exemplo n.º 21
0
    def __init__(self, command="e2simmx.py", data=None, options=None):
        JSTask.__init__(self, command, data, options)
        # options should have these keys:
        # align - the main aligner, a list of two strings
        # alligncmp - the main align cmp - a list of two strings
        # ralign - the refine aligner, a list of two string. May be None which turns it off
        # raligncmp - the refinealigncmp - a list of two strings. Needs to specified if ralign is not None
        # cmp - the final cmp - a list of two strings
        # shrink - a shrink value (float), may be None or unspecified - shrink the data prior to computing similarity scores, will adjust to produce a good box size

        # data should have
        # particles - a Task-style cached list of input images
        # references - a Task-style cached list of reference images

        self.sim_data = {}  # this will store the eventual results
Exemplo n.º 22
0
	def __init__(self,command="e2simmx.py",data=None,options=None):
		JSTask.__init__(self,command,data,options)
		# options should have these keys:
		# align - the main aligner, a list of two strings
		# alligncmp - the main align cmp - a list of two strings
		# ralign - the refine aligner, a list of two string. May be None which turns it off
		# raligncmp - the refinealigncmp - a list of two strings. Needs to specified if ralign is not None
		# cmp - the final cmp - a list of two strings
		# shrink - a shrink value (int), may be None or unspecified - shrink the data by an integer amount prior to computing similarity scores


		# data should have
		# particles - a Task-style cached list of input images
		# references - a Task-style cached list of reference images

		self.sim_data = {} # this will store the eventual results
Exemplo n.º 23
0
    def __init__(self, info, ref, options):

        data = {"info": info, "ref": ref}
        JSTask.__init__(self, "SpaClassifyTask", data, {}, "")
        self.options = options
Exemplo n.º 24
0
	def __init__(self, info, ref, options):
		
		data={"info":info, "ref": ref}
		JSTask.__init__(self,"SptTltRefine",data,{},"")
		self.options=options
Exemplo n.º 25
0
    def __init__(self, inp, options):

        data = {"data": inp}
        JSTask.__init__(self, "Sptavg", data, {}, "")
        self.options = options
Exemplo n.º 26
0
	def __init__(self, options, imgfile, imgindx, outf,nfs):
	
		JSTask.__init__(self,"TomoBoxer3d",{},"")
		self.classoptions={"options":options,"imgfile":imgfile,"imgindx":imgindx,"outf":outf,"nfs":nfs}
Exemplo n.º 27
0
	def __init__(self, inp, seed, options):
		
		data={"data":inp,"seed":seed}
		JSTask.__init__(self,"Make3d",data,{},"")
		self.options=options
Exemplo n.º 28
0
    def __init__(self, inp, refs, options):

        data = {"data": inp, "refnames": refs}
        JSTask.__init__(self, "Sptavg", data, {}, "")
        self.options = options
Exemplo n.º 29
0
	def __init__(self,ptclfile=None,ptcln=0,orts=[],tryid=0,strucfac=None,niter=5,sym="c1",mask2=None,randorient=False,verbose=0) :
		data={"images":["cache",ptclfile,(0,ptcln)],"strucfac":strucfac,"orts":orts,"mask2":mask2}
		JSTask.__init__(self,"InitMdl",data,{"tryid":tryid,"iter":niter,"sym":sym,"randorient":randorient,"verbose":verbose},"")
Exemplo n.º 30
0
    def __init__(self, fsp, i, ref, options):

        data = {"fsp": fsp, "i": i, "ref": ref}
        JSTask.__init__(self, "SptAlign", data, {}, "")
        self.options = options
Exemplo n.º 31
0
    def __init__(self, data, options):

        JSTask.__init__(self, "SptAlign", data, {}, "")
        self.options = options
Exemplo n.º 32
0
    def __init__(self, data, options, allxfs, allinfo):

        JSTask.__init__(self, "SptExtract", data, {}, "")
        self.options = options
        self.allxfs = allxfs
        self.allinfo = allinfo
Exemplo n.º 33
0
	def __init__(self, data, options):
		
		JSTask.__init__(self,"SptAlign",data,{},"")
		self.options=options
		if options.mask!=None: raise Exception("--mask not supported in scipy mode")
Exemplo n.º 34
0
    def __init__(self, info, options):

        data = {"info": info}
        JSTask.__init__(self, "SpaAlignTask", data, {}, "")
        self.options = options
Exemplo n.º 35
0
	def __init__(self, inp, ref, options):
		
		data={"data":inp, "ref":ref}
		JSTask.__init__(self,"Weightptcl",data,{},"")
		self.options=options