5.9. hedit¶
Edits the header of the given files.
- FitsArray.hedit(self, keys: str | List[str], values: str | int | float | bool | List[str | int | float | bool] | None = None, comments: str | List[str] | None = None, delete: bool = False, value_is_key: bool = False) Self¶
Edits the header of the given files.
Parameters
keysUnion[str, List[str]]Keys to be altered.
valuesOptional[Union[str, int, float, bool, List[Union[str, int, float, bool]]], optionalValues to be added or set. This will be ignored if
deleteisTrue.commentsOptional[Union[str, List[str]]], optionalComments to be added. This will be ignored if
deleteisTrue.deletebool, optionalIf set to
True, deletes the key from the header.value_is_keybool, optionalIf set to
True, adds the value of the key given invalues. This will be ignored ifdeleteisTrue.
Returns
FitsArrayThe same
FitsArrayobject after editing the headers.
5.9.1. Example:¶
from myraflib import FitsArray
fa = FitsArray.sample()
fa.hedit("MYRAF", "value")