bundles / astropy 7.0.1 / astropy / io / fits / diff / TableDataDiff
class
astropy.io.fits.diff:TableDataDiff
source: /astropy/io/fits/diff.py :1234
Signature
class TableDataDiff ( a , b , ignore_fields = [] , numdiffs = 10 , rtol = 0.0 , atol = 0.0 ) Members
Summary
Diff two table data arrays. It doesn't matter whether the data originally came from a binary or ASCII table--the data should be passed in as a recarray.
Extended Summary
TableDataDiff objects have the following diff attributes:
diff_column_count: If the tables being compared have different numbers of columns, this contains a 2-tuple of the column count in each table. Even if the tables have different column counts, an attempt is still made to compare any columns they have in common.diff_columns: If either table contains columns unique to that table, either in name or format, this contains a 2-tuple of lists. The first element is a list of columns (these are full Column objects) that appear only in table a. The second element is a list of tables that appear only in table b. This only lists columns with different column definitions, and has nothing to do with the data in those columns.diff_column_names: This is likediff_columns, but lists only the names of columns unique to either table, rather than the full Column objects.diff_column_attributes: Lists columns that are in both tables but have different secondary attributes, such as TUNIT or TDISP. The format is a list of 2-tuples: The first a tuple of the column name and the attribute, the second a tuple of the different values.diff_values: TableDataDiff compares the data in each table on a column-by-column basis. If any different data is found, it is added to this list. The format of this list is similar to thediff_pixelsattribute on ImageDataDiff objects, though the "index" consists of a (column_name, row) tuple. For example[('TARGET', 0), ('NGC1001', 'NGC1002')]shows that the tables contain different values in the 0-th row of the 'TARGET' column.
diff_totalanddiff_ratio: Same as ImageDataDiff.
TableDataDiff objects also have a common_columns attribute that lists the Column objects for columns that are identical in both tables, and a common_column_names attribute which contains a set of the names of those columns.
Aliases
-
astropy.io.fits.TableDataDiff