fitsdiff(1)
π fitsdiff β bestie edition π
ok so this is fitsdiff from astropy 1.0.2, and it's literally the tool you want when you need to compare two FITS image files and spill the tea on every difference in header keywords and data. no cap. π«Ά
β¨ NAME β¨
fitsdiff β compare two FITS image files and report the differences in header keywords and data. π
πΈ SYNOPSIS πΈ
fitsdiff [OPTION]... FILE1 FILE2
π¦ DESCRIPTION π¦
okay so fitsdiff is a command line script based on pyfits, and its whole job is comparing two FITS image files and reporting the differences in header keywords and data. it's giving diff but for astronomy. β¨
FILE1 and FILE2 are the two files to be compared. they can also be wild cards β but bestie, if they are, they must be enclosed by double or single quotes. or, plot twist, they can be directory names. π
- if both are directory names, all files in each of the directories will be included ποΈ
- if only one is a directory name, then the directory name will be prefixed to the file name(s) specified by the other argument
for example:
% fitsdiff "*.fits" "/machine/data1"
will compare all FITS files in the current directory to the corresponding files in the directory /machine/data1. lowkey iconic.
if the two files are identical within the specified conditions, it will report "No difference is found." β the most peaceful outcome fr fr. π
if the value(s) of -c and -k takes the form @filename, list is in the text file filename, and each line in that text file contains one keyword. π
fitsdiff commandline arguments can also be set using the environment variable FITSDIFF_SETTINGS. if the FITSDIFF_SETTINGS environment variable is present, each argument present will override the corresponding argument on the commandline. this environment variable exists to make it easier to change the behavior of fitsdiff on a global level, such as in a set of regression tests. it's the "set it once, forget it" queen. π
π GENERIC OPTIONS π
-h,--helpβ display terse usage information (help). the "just tell me what to do" button π-q,--quietβ produce no output and just return a status code. silent but the exit code speaks volumes. π€«-n INTEGER,--num-diffs=INTEGERβ max number of data differences (image pixel or table element) to report per extension (default10). keeps the receipts from overflowing. π§Ύ-d NUMBER,--difference-tolerance=NUMBERβ the relative tolerance for comparison of two numbers, specifically two floating point numbers. this applies to data in both images and tables, and to floating point keyword values in headers (default0.0). so like, tiny float drama can be forgiven. β¨-b,--no-ignore-blanksβ don't ignore trailing blanks (whitespace) in string values. otherwise trailing blanks both in header keywords/values and in table column values) are not treated as significant i.e. without this option'ABC 'and'ABC'are considered equivalent. with it? not equivalent, bestie. π«’--no-ignore-blank-cardsβ don't ignore entirely blank cards in headers. normallyfitsdiffdoes not consider blank cards when comparing headers, but this will ensure that even blank cards match up. yes, even the empty ones have to show up. π-o FILE,--output-file=FILEβ output results to this file; otherwise results are printed to stdout. take the notes somewhere else, main character. π
π HEADER COMPARISON OPTIONS π
-k KEYWORDS,--ignore-keywords=KEYWORDSβ comma-separated list of keywords not to be compared. keywords may contain wildcard patterns. to exclude all keywords, use"*"; make sure to have double or single quotes around the asterisk. quote the star, protect the star. β-c KEYWORDS,--ignore-comments=KEYWORDSβ comma-separated list of keywords whose comments will not be compared. wildcards may be used as with--ignore-keywords. the comments get a hall pass. π«
π TABLE COMPARISON OPTIONS π
-f COLUMNS,--ignore-fields=COLUMNSβ comma-separated list of fields (i.e. columns) not to be compared. all columns may be excluded using"*"as with--ignore-keywords. bye bye columns, not your problem anymore. π
π₯ EXAMPLES π₯
% fitsdiff -k filename,filtnam1 -n 5 -d 1.e-6 test1.fits test2
this command will compare files test1.fits and test2.fits, report maximum of 5 different pixels values per extension, only report data values larger than 1.e-6 relative to each other, and will neglect the different values of keywords FILENAME and FILTNAM1 (or their very existence). periodt. π
β¨
heads up bestie: if a file pair is identical within the conditions you specified, fitsdiff says "No difference is found." β so a quiet run is a good run. π
and that's the whole vibe check! this page came from astropy version 1.0.2, dated April 2015, and it's your girl fitsdiff on manual page fitsdiff(1) saying slay, go compare some FITS files, ily, bye π«Άππ
π¦ where this page comes from
- debian bookworm: astropy-utils 5.2.1-2+deb12u1 Β· BSD-3-Clause
- debian trixie: astropy-utils 7.0.1-3 Β· BSD-3-Clause
- ubuntu jammy: astropy-utils 5.0.2-1 Β· BSD-3-Clause
- ubuntu noble: astropy-utils 6.0.0-1ubuntu2 Β· BSD-3-Clause
- ubuntu questing: astropy-utils 7.0.1-3
- ubuntu resolute: astropy-utils 7.2.0-1build1 Β· BSD-3-Clause
- ubuntu stonking: astropy-utils 8.0.1-3 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms