Open ignacioreyes opened 2 years ago
Describe the bug Using astropy.io.fits in another project I notice that you have to close the files. https://github.com/alercebroker/alerce_client/blob/3ab5864646d18130649282abf0ce8e367360e09d/alerce/stamps.py#L121 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
Describe the bug Using astropy.io.fits in another project I notice that you have to close the files. https://github.com/alercebroker/alerce_client/blob/3ab5864646d18130649282abf0ce8e367360e09d/alerce/stamps.py#L121 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