4.8. hedit¶
Edits the header of the given FITS file.
- Fits.hedit(keys, values=None, comments=None, delete=False, value_is_key=False) Self¶
Edits the header of the given FITS file.
Parameters
keysstrorList[str]Keys to be altered.
valuesOptional[Union[str, int, float, bool, List[Union[str, int, float, bool]]]], optionalValues to be added. This will be ignored if delete is
True.commentsOptional[Union[str, List[str]]], optionalComments to be added. This will be ignored if delete is
True.deletebool, optionalIf
True, deletes the key from the header.value_is_keybool, optionalIf
True, adds the value of the key given in values. This will be ignored if delete isTrue.
Returns
FitsThe same Fits object.
4.8.1. Example:¶
from myraflib import Fits
fits = Fits.sample()
fits.hedit("MYRAF", "value")