uvex_transients.surveys.base.SurveySchedule.from_disk#
- classmethod SurveySchedule.from_disk(path: str | Path, fov_path: str | Path, table_format: str | None = None, **kwargs) SurveySchedule[source]#
Read a schedule table and its companion instrument FOV back from disk.
The inverse of
to_disk()(when it was called with afov_path). The reconstructedfovis always a ~regions.Regions collection – even if the originalinstrument_fovpassed to the constructor was a single, bare ~regions.SkyRegion – since a DS9 region file doesn’t distinguish “one region” from “a one-member collection”. Every SurveySchedule method treats the two forms identically, so this is transparent to callers.- Parameters:
path (
strorPath) – Path to the schedule table, as written byto_disk().fov_path (
strorPath) – Path to the instrument FOV region file, as written byto_disk().table_format (
str, optional) – Passed through toread(); if None, the format is inferred frompath’s suffix.**kwargs – Forwarded to the constructor.
- Returns:
The reconstructed schedule.
- Return type:
- Raises:
FileNotFoundError – If
pathorfov_pathdoes not exist.ScheduleValidationError – If the table read from
pathfails schema validation.