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, withcache=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 fordownload_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 inconfig["schedules.schedule_urls"]. Mutually exclusive withurl. If neithernamenorurlis given, falls back toconfig["schedules.default_schedule"].url (
str, optional) – Direct HTTP/HTTPS URL to the schedule file. Mutually exclusive withname.cache (
bool) – Whether to cache the downloaded file locally (seedownload_file()) rather than re-fetching it on every call.**kwargs – Forwarded to
read(), e.g.formatto override auto-detection.
- Returns:
The fetched schedule table. This is just the table: pass it, along with an
instrument_fov, toSurveyScheduleto get a validated schedule.- Return type:
- Raises:
ValueError – If both
nameandurlare given, ornameis not a known registry entry.