astropy 5.0

Parameters
__init__(self, a, b, ignore_hdus=[], ignore_keywords=[], ignore_comments=[], ignore_fields=[], numdiffs=10, rtol=0.0, atol=0.0, ignore_blanks=True, ignore_blank_cards=True)

Parameters

a : str or `HDUList`

The filename of a FITS file on disk, or an HDUList object.

b : str or `HDUList`

The filename of a FITS file on disk, or an HDUList object to compare to the first file.

ignore_hdus : sequence, optional

HDU names to ignore when comparing two FITS files or HDU lists; the presence of these HDUs and their contents are ignored. Wildcard strings may also be included in the list.

ignore_keywords : sequence, optional

Header keywords to ignore when comparing two headers; the presence of these keywords and their values are ignored. Wildcard strings may also be included in the list.

ignore_comments : sequence, optional

A list of header keywords whose comments should be ignored in the comparison. May contain wildcard strings as with ignore_keywords.

ignore_fields : sequence, optional

The (case-insensitive) names of any table columns to ignore if any table data is to be compared.

numdiffs : int, optional

The number of pixel/table values to output when reporting HDU data differences. Though the count of differences is the same either way, this allows controlling the number of different values that are kept in memory or output. If a negative value is given, then numdiffs is treated as unlimited (default: 10).

rtol : float, optional

The relative difference to allow when comparing two float values either in header values, image arrays, or table columns (default: 0.0). Values which satisfy the expression

$$\left| a - b \right| > \text{atol} + \text{rtol} \cdot \left| b \right|$$

are considered to be different. The underlying function used for comparison is numpy.allclose .

versionadded
atol : float, optional

The allowed absolute difference. See also rtol parameter.

versionadded
ignore_blanks : bool, optional

Ignore extra whitespace at the end of string values either in headers or data. Extra leading whitespace is not ignored (default: True).

ignore_blank_cards : bool, optional

Ignore all cards that are blank, i.e. they only contain whitespace (default: True).

Examples

See :

Local connectivity graph

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


File: /astropy/io/fits/diff.py#208
type: <class 'function'>
Commit: