Loading a large .mrc file(1.56GB) in Python

sorry for such a simple question, I am new to analyze images using Python…
I’ve tried to use Python mrcfile module ‘Memory-mapped files’ to load .mrc file, but it still get error: ‘WindowsError: [Error 8] Not enough memory resources are available to process this command’. I am wondering whether there is a way to load slice by slice instead of loading all of them at once.
Thank you!

I just realized that I installed 32-bit Python instead of 64-bit…but I am still want to know whether there exists a way to load very large .mrc file slice by slice in Python. Thank you!

So you tried this line of code and it returns the error right ?
mrc = mrcfile.mmap('Path/tmp.mrc', mode='r+')

You use the last version of the pqckqge (1.1.2)?

I think the best would be to either open a GitHub issue or send a mail to the authors of the package (bottom of the main page of the GitHub repo)

1 Like