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 a fov_path). The reconstructed fov is always a ~regions.Regions collection – even if the original instrument_fov passed 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 (str or Path) – Path to the schedule table, as written by to_disk().

  • fov_path (str or Path) – Path to the instrument FOV region file, as written by to_disk().

  • table_format (str, optional) – Passed through to read(); if None, the format is inferred from path’s suffix.

  • **kwargs – Forwarded to the constructor.

Returns:

The reconstructed schedule.

Return type:

SurveySchedule

Raises:
  • FileNotFoundError – If path or fov_path does not exist.

  • ScheduleValidationError – If the table read from path fails schema validation.