insert_info_in_header

sofia_redux.scan.utilities.utils.insert_info_in_header(header, header_info, refkey='HISTORY', after=False, delete_special=False)[source]

Insert header information into a header at a given location.

Parameters:
headerfits.Header

The header for which to insert header_info.

header_infofits.Header or dict or list or tuple or set.

The header information to insert. Will be normalized using to_header_cards().

refkeystr, optional

The key in header marking the insertion location.

afterbool, optional

If True, insert header_info after refkey. Otherwise, insert before refkey.

delete_specialbool, optional

If True, allow deletion of previous HISTORY and COMMENT entries containing the same value.

Returns:
None