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 to diff_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_keywords
list.
diff_keyword_comments
: Like diff_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.
Diff two Header
objects.
The following pages refer to to this document either explicitly or contain code examples using this.
astropy.io.fits.diff._BaseDiff.__init__
astropy.io.fits.diff.HeaderDiff
astropy.io.fits.diff.HDUDiff
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them