Skip to content

Cache files downloaded by download_weekly_pointing_file #69

Open

Description

@dstansby

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

Activity

  1. wtbarnes commented on Apr 5, 2024

    @wtbarnes
    Member

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions