New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot allocate memory #299
Cannot allocate memory #299
Conversation
Example traceback:
|
Solution is here: astropy/astropy#1380 (comment) |
This has led to a new error:
|
The change broke the tests because the tests are using direct file modification, which isn't supported. Shouldn't be too hard to fix. |
@@ -44,7 +44,7 @@ def is_fits(input, **kwargs): | |||
return False | |||
|
|||
|
|||
def read_data_fits(input, hdu=None, **kwargs): | |||
def read_data_fits(input, hdu=None, mode='denywrite', **kwargs): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't mode passed through kwargs
from SpectralCube.read
to here already? I regularly use mode='denywrite'
and haven't run into memory issues when dealing with big cubes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. But I think this should be the default, as we don't expect users to be modifying the cube data inplace.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok. Agreed.
Trying to load a cube, I've encountered the following error:
error: [Errno 12] Cannot allocate memory
Unfortunately, this defeats the purpose of spectral-cube entirely. Any ideas for workarounds? In principle, we might be able to write up an interface that can load only part of the cube, but I don't know how to do that with the FITS io system.