Comments (9)
The joy of open source dependencies :D
from blik.
Hi! This seems to be unrelated to #130. The issue is deeper (with mrcfile
):
ValueError: Unrecognised machine stamp: 0x44 0x20 0x20 0x20
Something seems to be off with the header of your mrc
file, which is not recognized by mrcfile. Can you try to manually open the file by doing this in ipython?:
with mrcfile.open('/path/to/file.mrc', 'r', header_only=True) as mrc:
print(mrc.header)
If this fails again, try:
with mrcfile.open('/path/to/file.mrc', 'r', header_only=True, permissive=True) as mrc:
print(mrc.header)
I didn't add any machinery to allow permissive=True
for now; if that solves it, maybe I should consider setting it to True
by default.
from blik.
It fails without permissive=True
, but loads with it:
/home/joran.deschamps/miniconda3/envs/blik/lib/python3.9/site-packages/mrcfile/mrcinterpreter.py:219:
RuntimeWarning: Unrecognised machine stamp: 0x44 0x20 0x20 0x20
warnings.warn(str(err), RuntimeWarning)
(1024, 1024, 512, 2, 0, 0, 0, 1024, 1024, 512, (1024., 1024., 512.), (90., 90., 90.), 1, 2, 3, -995.9688, 480.2282,
-2.2351742e-07, 0, 0, b'\x00\x00\x00\x00\x00\x00\x00\x00', b'', 0, b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00
\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00
\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00
\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', (0., 0., 0.), b'MAP ', [68, 32, 32, 32], -1., 0,
[b'', b'', b'', b'', b'', b'', b'', b'', b'', b''])
from blik.
Yeah, this happens if the header is a bit messed up for some reason. Corrupted file, or maybe it was written by a software that wasn't very careful about writing correct information in the header. If you want a quick fix, you can edit the code in naaf
for the mrc reader function and add the permissive=True
argument to the mrcfile.mmap
call. I will try to release a half update to naaf and blik to fix both this issue and the other you raised.
from blik.
Thanks a lot! I will let you be the judge of whether to keep this issue open!
FYI the file was saved using imod, and there is no issue opening it there.
from blik.
You might want to bring this issue up to the mrcfile
repo then, since this can only be solved there.
In my experience, imod
is super resilient to broken headers, but because of this it might be less careful in writing correct ones :P
from blik.
@jdeschamps I just released v0.3.2
as an intermediate version before napari 0.4.17. Feel free to try it out and let me know if things work :)
from blik.
@jdeschamps update: v0.3.3 is actually fixed, sorry :P
from blik.
Awesome thanks, I'll let you know if anything arises!
from blik.
Related Issues (20)
- Use dask HOT 5
- failed reading of star file HOT 1
- Images HOT 3
- Dependency issues HOT 2
- saving files should add extension if needed
- saving star file does not save pixel size correctly HOT 1
- issue with star file reading? HOT 7
- reducing coordinate opacity makes black dots on the image layer HOT 12
- Generating the same particle twice overrides the existing layer but with broken orientations HOT 2
- Minor issue: expected MRC file extension HOT 1
- Suggestion: show tomograms in the same orientation as IMOD HOT 3
- out of slice fading of point and orientation layer HOT 2
- colouring points by data attribute HOT 4
- install error using Napari GUI HOT 7
- gaussian filter has no "Run" button HOT 2
- I can't open a simple star HOT 1
- Update tutorial
- Import times are SLOW HOT 3
- Documentation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blik.