bundles / astropy 7.0.1 / astropy / io / fits / diff / HeaderDiff
class
astropy.io.fits.diff:HeaderDiff
source: /astropy/io/fits/diff.py :657
Signature
class HeaderDiff ( a , b , ignore_keywords = [] , ignore_comments = [] , rtol = 0.0 , atol = 0.0 , ignore_blanks = True , ignore_blank_cards = True ) Members
Summary
Diff two Header objects.
Extended Summary
HeaderDiff objects have the following diff attributes:
diff_keyword_count: If the two headers contain a different number of keywords, this contains a 2-tuple of the keyword count for each header.diff_keywords: If either header contains one or more keywords that don't appear at all in the other header, this contains a 2-tuple consisting of a list of the keywords only appearing in header a, and a list of the keywords only appearing in header b.diff_duplicate_keywords: If a keyword appears in both headers at least once, but contains a different number of duplicates (for example, a different number of HISTORY cards in each header), an item is added to this dict with the keyword as the key, and a 2-tuple of the different counts of that keyword as the value. For example{'HISTORY': (20, 19)}means that header a contains 20 HISTORY cards, while header b contains only 19 HISTORY cards.
diff_keyword_values: If any of the common keyword between the two headers have different values, they appear in this dict. It has a structure similar todiff_duplicate_keywords, with the keyword as the key, and a 2-tuple of the different values as the value. For example{'NAXIS': (2, 3)}means that the NAXIS keyword has a value of 2 in header a, and a value of 3 in header b. This excludes any keywords matched by the
ignore_keywordslist.diff_keyword_comments: Likediff_keyword_values, but contains differences between keyword comments.
HeaderDiff objects also have a common_keywords attribute that lists all keywords that appear in both headers.
Aliases
-
astropy.io.fits.HeaderDiff