bundles / astropy 7.0.1 / astropy / io / fits / convenience / printdiff
function
astropy.io.fits.convenience:printdiff
source: /astropy/io/fits/convenience.py :840
Signature
def printdiff ( inputa , inputb , * args , ** kwargs ) Summary
Compare two parts of a FITS file, including entire FITS files, FITS HDUList objects and FITS HDU objects.
Parameters
inputa: str, `HDUList` object, or ``HDU`` objectThe filename of a FITS file, HDUList, or
HDUobject to compare toinputb.inputb: str, `HDUList` object, or ``HDU`` objectThe filename of a FITS file, HDUList, or
HDUobject to compare toinputa.ext, extname, extverAdditional positional arguments are for HDU specification if your inputs are string filenames (will not work if
inputaandinputbareHDUobjects 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 parametersext,extname.By HDU number
printdiff('inA.fits', 'inB.fits', 0) # the primary HDU printdiff('inA.fits', 'inB.fits', 2) # the second extension HDU printdiff('inA.fits', 'inB.fits', ext=2) # the second extension HDU
By name, i.e.,
EXTNAMEvalue (if unique).EXTNAMEvalues are not case sensitive:printdiff('inA.fits', 'inB.fits', 'sci') printdiff('inA.fits', 'inB.fits', extname='sci') # equivalent
By combination of
EXTNAMEandEXTVERas separate arguments or as a tupleprintdiff('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)
**kwargsAny additional keyword arguments to be passed to FITSDiff.
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.
Aliases
-
astropy.io.fits.printdiff