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 callself.table.write(...)directly: without it, a file can fail to read back withValueError: unsupported class for construct ...if a masked column’s value picked up an ndarray subclass along the way (e.g. through repeatedvstack()) that isn’t one astropy’s ECSV reader knows how to reconstruct.from_disk()always requires a companionfov_pathto reconstructfov, so passfov_pathhere too if you intend to round-trip viafrom_disk()– otherwisefovis not persisted at all.- Parameters:
path (
strorPath) – Destination path for the schedule table.fov_path (
strorPath, optional) – Destination path forfov. If None (the default), the FOV is not written.table_format (
str, optional) – Passed through towrite(); if None, the format is inferred frompath’s suffix.overwrite (
bool) – Whether to overwrite an existing file atpathandfov_path.