e2proc2d.py - populating header of mrc

433 views
Skip to first unread message

Mike Strauss

unread,
Jul 17, 2014, 12:14:12 PM7/17/14
to em...@googlegroups.com

Hi,

when I generate an mrc stack from an hdf stack, the header of the mrc is not properly populated with min, max, man, std information.  Is this on purpose?  I'm having a host of display problems with the image that doesn't have this information.  My workaround involves using the alterheader command from IMOD.  is there and EMAN2 way of fixing this?

I'm running:
EMAN 2.1 beta3 (CVS 2014/07/16 17:01:06)
Your EMAN2 is running on: Mac OS 10.9.3 x86_64
Your Python version is:  2.7.5

mike

Stephen Murray

unread,
Jul 17, 2014, 12:40:14 PM7/17/14
to em...@googlegroups.com
Mike,

Which command did you use?


--
--
----------------------------------------------------------------------------------------------
You received this message because you are subscribed to the Google
Groups "EMAN2" group.
To post to this group, send email to em...@googlegroups.com
To unsubscribe from this group, send email to eman2+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/eman2

---
You received this message because you are subscribed to the Google Groups "EMAN2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eman2+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Stephen Murray
PhD Candidate - Ludtke Lab
Baylor College of Medicine
Houston TX 77030

Mike Strauss

unread,
Jul 17, 2014, 12:44:42 PM7/17/14
to em...@googlegroups.com
Hi Stephen,
I used:
e2proc2d.py --twod2threed --mult 1. in_img.hdf out_img.mrc

mike


Stephen Murray

unread,
Jul 17, 2014, 12:48:27 PM7/17/14
to em...@googlegroups.com
Mike,

That looks correct (I'll have to dig into whats going on) but we also recently implemented the ability to write a file as a .mrcs (mrc stack). Its still being fully tested (we've yet to find a situation when it doesnt work) so I would suggest trying:

e2proc2d.py --mult 1 in_img.hdf out_img.mrcs

and see if that fixes your issue.



--
--
----------------------------------------------------------------------------------------------
You received this message because you are subscribed to the Google
Groups "EMAN2" group.
To post to this group, send email to em...@googlegroups.com
To unsubscribe from this group, send email to eman2+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/eman2

---
You received this message because you are subscribed to the Google Groups "EMAN2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eman2+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mike Strauss

unread,
Jul 17, 2014, 12:54:11 PM7/17/14
to em...@googlegroups.com
no difference, as far as I can tell.



You received this message because you are subscribed to a topic in the Google Groups "EMAN2" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/eman2/E8hatPvExhE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to eman2+un...@googlegroups.com.

Stephen Murray

unread,
Jul 17, 2014, 1:07:35 PM7/17/14
to em...@googlegroups.com
Is the problem that it is not being populated with any header information or that each image in the stack appears to have the same header info as all the rest?

Mike Strauss

unread,
Jul 17, 2014, 1:31:29 PM7/17/14
to em...@googlegroups.com
I'm not sure I understand the question.  Each image in the stack has a mean and std, but the mrc header, as I understand it, only has global statistics.

your question got me thinking.  The stack I used had a blank image as the last entry (leftover from a masking operation).  I double checked with a different stack, and it seems as though e2proc2d populates the header information for the whole mrc stack with info from by the hdf header for the last image in the input stack.

does that make sense?

Steven Ludtke

unread,
Jul 17, 2014, 2:08:10 PM7/17/14
to em...@googlegroups.com
Hi Mike. Still out of town.  Yes, that is probably true. MRC files are not designed to store stacks of images. There is only one header for the entire file. The idea to store many individual images packed into a 3-D volume was a hack I think David Agard first initiated many many years ago. There are many problems still with this approach, despite the fact that it's become widespread. If you have only one header, should that represent information from the first image? the last image?  the entire stack treated as a volume?  There is no single answer to this question because there still is no "official" way to store stacks like this. For this reason, EMAN doesn't make use of most of the header parameters itself (they can't be trusted), unless they are things like A/pix, which are the same for all images in the stack (presumably). It does try to preserve the contents of the header for other program's use, and to generate reasonable values, but in the absence of a formal specification...  There is also the issue that, due to memory concerns, EMAN works hard to NOT keep entire 3-D stacks in memory at once (these may be 10-20 GB in some cases), meaning the statistics on the entire stack aren't readily computed unless you read through all of the data in the file (very very time consuming). 

Anyway, yes EMAN probably populates the header with values from the last single image written to the file at the moment.  There is a group of developers (myself included) trying to formalize the MRC specification for stacks, but it is not yet done.

Mike Strauss

unread,
Jul 17, 2014, 2:16:58 PM7/17/14
to em...@googlegroups.com
Hi Steven, 
thanks for interrupting your travels to comment.  This makes sense.  Recalculating the statistics for the whole stack did take a while, and I can see how you would want to avoid that.

mike

Reply all
Reply to author
Forward
0 new messages