bundles / astropy latest / astropy / io / fits / diff / ImageDataDiff
class
astropy.io.fits.diff:ImageDataDiff
source: /astropy/io/fits/diff.py :979
Signature
class ImageDataDiff ( a , b , numdiffs = 10 , rtol = 0.0 , atol = 0.0 ) Members
Summary
Diff two image data arrays (really any array from a PRIMARY HDU or an IMAGE extension HDU, though the data unit is assumed to be "pixels").
Extended Summary
ImageDataDiff objects have the following diff attributes:
diff_dimensions: If the two arrays contain either a different number of dimensions or different sizes in any dimension, this contains a 2-tuple of the shapes of each array. Currently no further comparison is performed on images that don't have the exact same dimensions.diff_pixels: If the two images contain any different pixels, this contains a list of 2-tuples of the array index where the difference was found, and another 2-tuple containing the different values. For example, if the pixel at (0, 0) contains different values this would look like[(0, 0), (1.1, 2.2)]where 1.1 and 2.2 are the values of that pixel in each array. This array only contains up to
self.numdiffsdifferences, for storage efficiency.diff_total: The total number of different pixels found between the arrays. Althoughdiff_pixelsdoes not necessarily contain all the different pixel values, this can be used to get a count of the total number of differences found.diff_ratio: Contains the ratio ofdiff_totalto the total number of pixels in the arrays.
Aliases
-
astropy.io.fits.ImageDataDiff