Donut Exporter Class

class astrodonut.donut_exporter.DonutExporter(source)[source]

Bases: object

A utility class to export a Donut or DonutList object to a FITS file.

This class accepts either a single Donut or a DonutList and handles the formatting and writing of the image data to a FITS file.

save_to_fits(filename, overwrite=True)[source]

Save the image data to a FITS file.

Parameters:
  • filename (str) – Path to the output FITS file.

  • overwrite (bool, optional) – Whether to overwrite an existing file with the same name, by default True.

Returns:

  • None

  • Side Effects

  • ————

  • Writes a FITS file to the specified location.

  • Prints

  • ——

  • A confirmation message if the file is saved successfully.