uvex_transients.surveys.utils.download_schedule_from_url#

uvex_transients.surveys.utils.download_schedule_from_url(url: str, path: str | Path, overwrite: bool = False, timeout: float | None = None, show_progress: bool = True) → Path[source]#

Download a remote schedule file to a local path.

A thin wrapper around download_file() that saves the result to an explicit, permanent location rather than leaving it in astropy’s own (evictable) cache – for a durable local copy you can reload later (e.g. via QTable.read or, once paired with an instrument_fov, from_disk()) without depending on the remote URL still being reachable. If you just want a QTable and don’t care where the bytes end up, get_schedule() avoids this step entirely.

Parameters:
  • url (str) – Direct HTTP/HTTPS URL to the schedule file.

  • path (str or Path) – Local destination path. Parent directories are created as needed.

  • overwrite (bool) – Whether to overwrite an existing file at path.

  • timeout (float, optional) – Timeout in seconds for the network request, or None (the default) to use config["surveys.download_timeout"] – itself None (astropy’s own default) out of the box.

  • show_progress (bool) – Whether to show a progress bar while downloading.

Returns:

path, for convenience chaining.

Return type:

pathlib.Path

Raises:

FileExistsError – If path already exists and overwrite is False.