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

keysstr or List[str]

Keys to be altered.

valuesOptional[Union[str, int, float, bool, List[Union[str, int, float, bool]]]], optional

Values to be added. This will be ignored if delete is True.

commentsOptional[Union[str, List[str]]], optional

Comments to be added. This will be ignored if delete is True.

deletebool, optional

If True, deletes the key from the header.

value_is_keybool, optional

If True, adds the value of the key given in values. This will be ignored if delete is True.

Returns

Fits

The same Fits object.


4.8.1. Example:

from myraflib import Fits

fits = Fits.sample()
fits.hedit("MYRAF", "value")