This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Editing Cryo-Em Density Map

Hi all,

I have a fraction of a density map in MRC file, which I need to use in a program accepting only cubic maps. The problem is that my map is not cubic, it's dimensions are roughly 22x23x23(x,y,z). Theoretically I can add one "X dimension" since it would be filled with zeros because of lack of density information. I am using for this purpose CSB Toolbox (LINK), where map is represented by a three dimensional numpy array. What I do can be described by this code:

import numpy as np
old_array = np.zeros((22,23,23), dtype=float32)  #representation of an map parsed from file
to_add = np.zeros((1,23,23), dtype=float32)
new_map = np.append(old_array, to_add, axis=0)

In theory everything should work since I am getting shape of a new map as 23,23,23, however map is stretched and does not represent the original shape. I was also adjusting origin and spacing, but that doesn't work.

Do you have any idea of an program, which could do sth like that? Or maybe I am screwing something with Python code?

Thanks in advance!

map python

0 answers

No answers yet.

Log in to answer this question.