702
Comment:
|
2033
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
= Quickly make a projection = |
|
Line 5: | Line 7: |
# get a test model | |
Line 6: | Line 9: |
proj = a.project("standard",Transform()) # this makes a projection along the z axis t = Transform({"type":"eman","alt":15} proj2 = a.project("standard",t) # now the projection is off axis |
# alternatively load yours from disk a = EMData("mymodel.mrc") # make a projection along the z axis proj = a.project("standard",Transform()) # Another way of making a projection.. t = Transform({"type":"eman","alt":15}) proj2 = a.project("standard",t) |
Line 11: | Line 18: |
= Generating projections in an asymmetric unit = EMAN2 has the concept of a[[http://blake.bcm.edu/eman2/doxygen_html/classEMAN_1_1Symmetry3D.html| Symmetry3D]] object and an[[http://blake.bcm.edu/eman2/doxygen_html/classEMAN_1_1OrientationGenerator.html| Orientation Generation ]] object. These two objections can be used interchangeably for generating orientations in an asymmetric unit. Using the Symmetry3D is the most common way of generating projections (the first method, below). == Use the Symmetry3D object == First get a list of Transform objects {{{#!python sym = Symmetries.get("c3") # works for all symmetries, e.g. "tet", "d8" etc orients = sym.gen_orientations("eman",{"delta":3}) }}} Then iterate through the list of tranforms (''orients'') and make the projections {{{#!python a = test_image_3d(1) data = [a.project("standard",t) for t in orients] display(data) }}} Note the EMAN2 is sophisticated enough to exclude or include the mirror portion of the asymmetric unit (by default it is off). To turn it on use syntax like this: {{{#!python orients = sym.gen_orientations("eman",{"delta":3,"inc_mirror":True}) # include mirror portion of asymmetric unit }}} |
Quickly make a projection
To make a projection you must have your 3D model loaded into python, and you must be able to define your projection direction as a Transform object. See Using the EMAN2 Transform class and the Transform turorial page for more information on the Transform object. Also, for more information on Euler angles see the Sparx wiki page.
1 # get a test model
2 a = test_image_3d(1)
3 # alternatively load yours from disk
4 a = EMData("mymodel.mrc")
5 # make a projection along the z axis
6 proj = a.project("standard",Transform())
7 # Another way of making a projection..
8 t = Transform({"type":"eman","alt":15})
9 proj2 = a.project("standard",t)
10 display([proj,proj2])
Generating projections in an asymmetric unit
EMAN2 has the concept of aSymmetry3D object and anOrientation Generation object. These two objections can be used interchangeably for generating orientations in an asymmetric unit. Using the Symmetry3D is the most common way of generating projections (the first method, below).
Use the Symmetry3D object
First get a list of Transform objects
Then iterate through the list of tranforms (orients) and make the projections
Note the EMAN2 is sophisticated enough to exclude or include the mirror portion of the asymmetric unit (by default it is off). To turn it on use syntax like this:
1 orients = sym.gen_orientations("eman",{"delta":3,"inc_mirror":True}) # include mirror portion of asymmetric unit