bundles / astropy 7.0.1 / astropy / io / fits / header / Header / extend
function
astropy.io.fits.header:Header.extend
source: /astropy/io/fits/header.py :1179
Signature
def extend ( self , cards , strip = True , unique = False , update = False , update_first = False , useblanks = True , bottom = False , end = False ) Summary
Appends multiple keyword+value cards to the end of the header, similar to list.extend.
Parameters
cards: iterableAn iterable of (keyword, value, [comment]) tuples; see
Header.append.strip: bool, optionalRemove any keywords that have meaning only to specific types of HDUs, so that only more general keywords are added from extension Header or Card list (default:
True).unique: bool, optionalIf
True, ensures that no duplicate keywords are appended; keywords already in this header are simply discarded. The exception is commentary keywords (COMMENT, HISTORY, etc.): they are only treated as duplicates if their values match.update: bool, optionalIf
True, update the current header with the values and comments from duplicate keywords in the input header. This supersedes theuniqueargument. Commentary keywords are treated the same as ifunique=True.update_first: bool, optionalIf the first keyword in the header is 'SIMPLE', and the first keyword in the input header is 'XTENSION', the 'SIMPLE' keyword is replaced by the 'XTENSION' keyword. Likewise if the first keyword in the header is 'XTENSION' and the first keyword in the input header is 'SIMPLE', the 'XTENSION' keyword is replaced by the 'SIMPLE' keyword. This behavior is otherwise dumb as to whether or not the resulting header is a valid primary or extension header. This is mostly provided to support backwards compatibility with the old
Header.fromTxtFilemethod, and only applies ifupdate=True.useblanks, bottom, end: bool, optionalThese arguments are passed to
Header.appendwhile appending new cards to the header.
Aliases
-
astropy.io.fits.Header.extend