uvex_transients.surveys.base.SurveySchedule.to_disk#

SurveySchedule.to_disk(path: str | Path, fov_path: str | Path | None = None, table_format: str | None = None, overwrite: bool = False) → None[source]#

Write the schedule table – and, optionally, the instrument FOV – to disk.

See _sanitized_table() for why this doesn’t just call self.table.write(...) directly: without it, a file can fail to read back with ValueError: unsupported class for construct ... if a masked column’s value picked up an ndarray subclass along the way (e.g. through repeated vstack()) that isn’t one astropy’s ECSV reader knows how to reconstruct.

from_disk() always requires a companion fov_path to reconstruct fov, so pass fov_path here too if you intend to round-trip via from_disk() – otherwise fov is not persisted at all.

Parameters:
  • path (str or Path) – Destination path for the schedule table.

  • fov_path (str or Path, optional) – Destination path for fov. If None (the default), the FOV is not written.

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

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