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 like diff_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 the diff_pixels
attribute 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_total
and diff_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.
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.
The following pages refer to to this document either explicitly or contain code examples using this.
astropy.io.fits.diff.TableDataDiff
astropy.io.fits.diff.HDUDiff
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