uvex_transients.surveys.utils.get_schedule#

uvex_transients.surveys.utils.get_schedule(name: str | None = None, url: str | None = None, cache: bool = True, **kwargs: Any) → QTable[source]#

Fetch a survey schedule table by registry name, explicit URL, or the configured default.

Reads directly from the remote source via read(), which transparently downloads – and, with cache=True, locally caches – an HTTP(S) URL for every format a schedule table might use (ECSV, FITS, …), so no separate download step is needed just to get a working table. Reach for download_schedule_from_url() instead when you want a durable local copy at a path of your own choosing, rather than astropy’s own evictable cache.

Parameters:
  • name (str, optional) – Short identifier for a pre-configured schedule, looked up in config["schedules.schedule_urls"]. Mutually exclusive with url. If neither name nor url is given, falls back to config["schedules.default_schedule"].

  • url (str, optional) – Direct HTTP/HTTPS URL to the schedule file. Mutually exclusive with name.

  • cache (bool) – Whether to cache the downloaded file locally (see download_file()) rather than re-fetching it on every call.

  • **kwargs – Forwarded to read(), e.g. format to override auto-detection.

Returns:

The fetched schedule table. This is just the table: pass it, along with an instrument_fov, to SurveySchedule to get a validated schedule.

Return type:

QTable

Raises:

ValueError – If both name and url are given, or name is not a known registry entry.