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

Cache files downloaded by download_weekly_pointing_file #69

Open
dstansby opened this issue Sep 9, 2022 · 1 comment
Open

Cache files downloaded by download_weekly_pointing_file #69

dstansby opened this issue Sep 9, 2022 · 1 comment

Comments

@dstansby
Copy link
Member

dstansby commented Sep 9, 2022

Describe the performance issue

sunkit_instruments.fermi.download_weekly_pointing_file doesn't cache the files it downloads, instead downloading a fresh copy each time it's called. e.g. calling it twice with the same date downloads identical files to different folders:

(sunpy) 🐊 dstansby@Davids-MBP sunkit-instruments % python test.py
/var/folders/m4/v0b71w0s22z34l90psw9j82w0000gn/T/tmp41ub2_7t/lat_spacecraft_weekly_w604_p310_v001.fits
(sunpy) 🐊 dstansby@Davids-MBP sunkit-instruments % python test.py
/var/folders/m4/v0b71w0s22z34l90psw9j82w0000gn/T/tmpklqmgxz9/lat_spacecraft_weekly_w604_p310_v001.fits

It would be good if these files were cached to prevent extra downloads.

To Reproduce

import sunpy

sunpy.map.Map(...)
etc

Proposed fix

No response

@wtbarnes
Copy link
Member

wtbarnes commented Apr 5, 2024

Better yet, we should just be using the data manager (https://docs.sunpy.org/en/stable/how_to/remote_data_manager.html) and deprecate this function entirely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants