Skip to content

Commit

Permalink
Open mrc files with other header errors
Browse files Browse the repository at this point in the history
  • Loading branch information
constantinpape committed Sep 4, 2023
1 parent 64a2bf5 commit 0bb78e7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion elf/io/mrc_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ def __init__(self, path, mode="r"):
except ValueError as e:

# check if error comes from old version of SerialEM used for acquisition
if "Unrecognised machine stamp: 0x44 0x00 0x00 0x00" in str(e):
if (
"Unrecognised machine stamp: 0x44 0x00 0x00 0x00" in str(e) or
"Unrecognised machine stamp: 0x00 0x00 0x00 0x00" in str(e)
):
try:
self._f = mrcfile.mmap(self.path, self.mode, permissive="True")
except ValueError:
Expand Down

0 comments on commit 0bb78e7

Please sign in to comment.