merge_headers¶
-
astro_metadata_translator.merge_headers(headers, mode='overwrite')¶ Merge multiple headers into a single dict.
Given a list of dict-like data headers, combine them following the specified mode.
Parameters: - headers :
listofdict(ordict-like) Collection of headers to combine.
PropertyListis supported.- mode :
str Scheme to use when a header has the same key as another header but different value. Options are:
'overwrite': Value in later header overwrites earlier value.'drop': Entire key is dropped.'first': Retain first value encountered.'append': Convert value to list with a value for each header (Noneif the key was not present). If the value is identical in multiple headers but key is missing in some, then the single identical header is stored.
Returns: - headers :