Attachment 'frealign_to_sparx.py'

Download

   1 #!/usr/bin/env python
   2 
   3 from EMAN2 import *
   4 from sparx import *
   5 
   6 p = read_text_row("niko_params.txt",-1)
   7 n = len(p)
   8 
   9 
  10 Cs = 2.0
  11 voltage = 200.0
  12 amp_contrast = 7
  13 bfactor = 0.0
  14 pixel = 1.163
  15 
  16 for i in xrange(n):
  17 	a = get_im("tmv_stack.hdf",i)
  18 	#a *= (-1)
  19 	#                 phi,     theta,     psi,       -tx,        -ty
  20 	set_params_proj(a, [p[i][3], p[i][2], p[i][1], -p[i][4],  -p[i][5]])
  21 	a.set_attr_dict({'active':1, 'ctf_applied':0})
  22 
  23 	set_ctf(a, [(p[i][8]+p[i][9])/20000.0, Cs, voltage, pixel, bfactor, amp_contrast, (p[i][8]-p[i][9])/20000.0, 45.0-p[i][10]])
  24 	a.write_image("bdb:tmv_stack",i)
  25 	if i%10 == 0:  print i

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2013-08-06 20:37:28, 0.6 KB) [[attachment:frealign_to_sparx.py]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.