Skip to content
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

[Bug] open_fits might require a "with" statement #18

Open
ignacioreyes opened this issue Mar 15, 2022 · 0 comments
Open

[Bug] open_fits might require a "with" statement #18

ignacioreyes opened this issue Mar 15, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@ignacioreyes
Copy link
Member

ignacioreyes commented Mar 15, 2022

Describe the bug
Using astropy.io.fits in another project I notice that you have to close the files.

tmp_hdulist = fits_open(

might need refactoring, basically using "fits_open" with the "with" statement and memmap=False to have automatic file closing and avoiding the limit on open files.
Doc. reference: https://docs.astropy.org/en/stable/io/fits/index.html#opening-a-fits-file

@ignacioreyes ignacioreyes added the bug Something isn't working label Mar 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant