[3dem] Way to read raw pixel size from .eer?

Huw Jenkins h.t.jenkins at me.com
Fri Jul 21 06:02:26 PDT 2023



> On 21 Jul 2023, at 13:54, Takanori Nakane <tnakane.protein at osaka-u.ac.jp> wrote:
> 
> Hi,
> 
> EER files contain some metadata in TFS-specific
> extended TIFF tags (e.g. IFD 65001).
> You have to write a script to read it

It's XML in that tag - but is fairly easy to access in Python with tifffile:

from tifffile import TiffFile
from xml.etree import cElementTree as ET

def dump_header(eer_file):
  with TiffFile(eer_file) as f:
    et =  ET.XML(f.eer_metadata)
    for e in et:
      if len(e.attrib) == 2:
        print(f"     {e.attrib['name']} {e.text} {e.attrib['unit']}")
      else:
        print(f"     {e.attrib['name']} {e.text}")


> I don't know if EER contains the pixel size at the sample.

The EER files I've seen had very little useful metadata, certainly much less than the MRC files written by EPU. 


Huw 


More information about the 3dem mailing list