astropy 5.0

NotesParametersBackRef
printdiff(inputa, inputb, *args, **kwargs)

Notes

The primary use for the printdiff function is to allow quick print out of a FITS difference report and will write to sys.stdout . To save the diff report to a file please use FITSDiff directly.

Parameters

inputa : str, `HDUList` object, or ``HDU`` object

The filename of a FITS file, HDUList , or HDU object to compare to inputb .

inputb : str, `HDUList` object, or ``HDU`` object

The filename of a FITS file, HDUList , or HDU object to compare to inputa .

ext, extname, extver :

Additional positional arguments are for extension specification if your inputs are string filenames (will not work if inputa and inputb are HDU objects or HDUList objects). They are flexible and are best illustrated by examples. In addition to using these arguments positionally you can directly call the keyword parameters ext , extname .

By extension number:

printdiff('inA.fits', 'inB.fits', 0)      # the primary HDU
printdiff('inA.fits', 'inB.fits', 2)      # the second extension
printdiff('inA.fits', 'inB.fits', ext=2)  # the second extension

By name, i.e., EXTNAME value (if unique). EXTNAME values are not case sensitive:

printdiff('inA.fits', 'inB.fits', 'sci') printdiff('inA.fits', 'inB.fits', extname='sci') # equivalent

By combination of EXTNAME and EXTVER as separate arguments or as a tuple:

printdiff('inA.fits', 'inB.fits', 'sci', 2)    # EXTNAME='SCI'
                                               # & EXTVER=2
printdiff('inA.fits', 'inB.fits', extname='sci', extver=2)
                                               # equivalent
printdiff('inA.fits', 'inB.fits', ('sci', 2))  # equivalent

Ambiguous or conflicting specifications will raise an exception:

printdiff('inA.fits', 'inB.fits',
          ext=('sci', 1), extname='err', extver=2)
kwargs :

Any additional keyword arguments to be passed to FITSDiff .

Compare two parts of a FITS file, including entire FITS files, FITS HDUList objects and FITS HDU objects.

Examples

See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

astropy.io.fits.convenience.printdiff

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/convenience.py#808
type: <class 'function'>
Commit: