[Chimera-users] writing mrc files

Eran Shacham eshacham at burnham.org
Fri Apr 21 12:40:17 PDT 2006


Hey there,

I am trying to write an mrc file using the write_mrc2000_grid_data 
module. My function is below. My array of data is a 
<scitbx_array_family_flex_ext.double object at 0x58b9502c>.
Which is a basically a matrix with dimensions: (243, 243, 243).
When trying to write an mrc file using this array I get the following error:
*************************
File "/home/eshacham/cctbx/mrc_functions.py", line 20, in write_mrc
    write_mrc2000_grid_data(g, path)
  File "CHIMERA/share/VolumeData/mrc/writemrc.py", line 44, in 
write_mrc2000_grid_data
  File "CHIMERA/share/VolumeData/arraygrid.py", line 48, in submatrix
ValueError: need more than 1 value to unpack

Code used
***********************
def write_mrc(data):
    print data
    origin = (1.54, 2.45, 3.45)     # XYZ coordinates of array index (0,0,0)
    step = (.25, .25, .25)          # Spacing between grid points

    import Numeric
    a = Numeric.array(data, Numeric.Float32)
    arrays = [a]
    import VolumeData
    g = VolumeData.Array_Grid_Data(arrays, origin, step)
    path = '/home/eshacham/structures/result.mrc'
    from VolumeData.mrc import write_mrc2000_grid_data
    write_mrc2000_grid_data(g, path)

I am assuming that it has to do with my array dimensions.
Any help would be greatly appreciated.

Cheers,
Eran.



More information about the Chimera-users mailing list