You are not allowed to use this action.

Clear message

   1 #!/bin/env python
   2 
   3 from EMAN2  import *
   4 from sparx  import *
   5 from random import random, seed
   6 
   7 vol = EMData()
   8 vol.read_image("R70S_small.spi")
   9 nx = vol.get_xsize()
  10 
  11 delta_theta = 5
  12 angles = even_angles(delta_theta,0.0,90.0,0.0,359.9,"S")
  13 nangles = len(angles)
  14 #print "Number of projections=", nangles
  15 
  16 volft,kb = prep_vol(vol)
  17 
  18 seed(1000)
  19 
  20 stack_data = "data.hdf"
  21 
  22 for i in xrange(nangles):
  23         dphi = 4.0*(random()-0.5)
  24         dtheta = 4.0*(random()-0.5)
  25         dpsi = 4.0*(random()-0.5)       
  26         ds2x = 4.0*(random()-0.5)
  27         ds2y = 4.0*(random()-0.5)
  28         phi = angles[i][0]+dphi
  29         theta = angles[i][1]+dtheta
  30         psi = angles[i][2]+dpsi
  31         s2x = ds2x
  32         s2y = ds2y      
  33 
  34         proj = prgs(volft, kb, [phi, theta, psi, s2x, s2y])
  35         proj.set_attr_dict({'alpha':0.0, 'sx':0.0, 'sy':0.0, 'mirror':0})           
  36         #proj.set_attr_dict({'phi':0.0, 'theta':0.0, 'psi':0.0, 's2x':0.0, 's2y':0.0})  
  37         proj.write_image(stack_data, i)