Mrc.initHdrArrayFrom() and Mrc.makeHdrArray() can be used to make
"standalone" Mrc headers.
The Mrc method "def data_withMrc(self):" """use this to get
'spiffed up' array"""
is the one I use to get the "Mrc header object" stuck into an existing ndarray.
Maybe I should also extract this to be a global function rather then
"only" a class method.
The Mrc2 class is similar to Mrc class, but it does not use memory
mapping but direct reading and writing of data sections. This is good
for very large datasets (on 32 bit systems) or for creating Mrc files
section by section. (There are probably some byte-swapping problems
left; PPC <-> Intel CPUs )
-Sebastian
On Wed, Nov 12, 2008 at 12:54 AM, Lin Shao <sh...@msg.ucsf.edu> wrote:
> Hi Seb,
>
> Maybe you've done this: is there a way to construct an MRC object in
> memory without a file to memmap to? I'm thinking of something like a
> numpy array but also with a header and extended header structure. My
> understanding of current Mrc class is that it needs a file to map to.
> Correct me if I'm wrong. BTW, what's Mrc2?
>
> -lin
>