4.5. save_as¶
Saves the Fits file to the specified output path.
- Fits.save_as(output, override=False) Self¶
Saves the
Fitsfile to the specified output path.Parameters
outputstrNew path to save the file.
overridebool, optional, default=FalseIf
True, will overwrite theoutputpath if a file already exists.
Returns
FitsA new
Fitsobject representing the saved FITS file.
Raises
FileExistsErrorIf the file already exists and
overrideisFalse.
4.5.1. Example:¶
from myraflib import Fits
fits = Fits.sample()
data = fits.save_as("NEW/FILE/PATH")