to_header_cards

sofia_redux.scan.utilities.utils.to_header_cards(header_info)[source]

Convert header-like information to a list of cards.

Standardizes header type information into a list of cards suitable for passing into insert_into_header(). COMMENT and HISTORY keys will automatically set the associated comment to None.

Parameters:
header_infofits.Header or dict or list or tuple or set or None
Returns:
cardslist (tuple)

A list of cards where each element is (key, value, comment).