You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For MRC files that are not collected by FEI software, an error will result when using hs.load() to read them. The issue is related to a change in NumPy which occurred several years ago. The bug was fixed for cases where the MRC file contains an FEI-style header, but the case for other MRC files was ignored.
The issue is that the value std_header['NEXT'] is a NumPy array, whereas the code expects it to be an integer.
Describe the bug
For MRC files that are not collected by FEI software, an error will result when using hs.load() to read them. The issue is related to a change in NumPy which occurred several years ago. The bug was fixed for cases where the MRC file contains an FEI-style header, but the case for other MRC files was ignored.
The issue is that the value
std_header['NEXT']
is a NumPy array, whereas the code expects it to be an integer.To Reproduce
A test non-FEI MRC file can be found here:
https://drive.google.com/file/d/1zv1gaa3YYe8Sg5kbaUsPx3qV5yfcFsyX/view?usp=sharing
It is a short tilt series consisting of 9 images which are 512x512 pixels each with 'int16' data type which was generated using SerialEM.
If Hyperspy is used to import the MRC file, it will fail.
To fix
All that needs to be done is to change line 155 of mrc.py by adding a [0] after the call to the std_header dictionary. Currently, the line reads:
It should read:
The text was updated successfully, but these errors were encountered: