Executable Scripts

Astropy installs a couple of useful utility programs on your system that are built with Astropy.

fitscheck

fitscheck is a command line script based on astropy.io.fits for verifying and updating the CHECKSUM and DATASUM keywords of .fits files. Fitscheck can also detect and often fix other FITS standards violations. fitscheck facilitates re-writing the non-standard checksums originally generated by astropy.io.fits with standard checksums which will interoperate with CFITSIO.

fitscheck will refuse to write new checksums if the checksum keywords are missing or their values are bad. Use –force to write new checksums regardless of whether or not they currently exist or pass. Use –ignore-missing to tolerate missing checksum keywords without comment.

Example uses of fitscheck:

  1. Verify and update checksums, tolerating non-standard checksums, updating to standard checksum:

    $ fitscheck --checksum either --write *.fits
  2. Write new checksums, even if existing checksums are bad or missing:

    $ fitscheck --write --force *.fits
  3. Verify standard checksums and FITS compliance without changing the files:

    $ fitscheck --compliance *.fits
  4. Verify original nonstandard checksums only:

    $ fitscheck --checksum nonstandard *.fits
  5. Only check and fix compliance problems, ignoring checksums:

    $ fitscheck --checksum none --compliance --write *.fits
  6. Verify standard interoperable checksums:

    $ fitscheck *.fits
  7. Delete checksum keywords:

    $ fitscheck --checksum none --write *.fits

With Astropy installed, please run fitscheck --help to see the full program usage documentation.

fitsdiff

fitsdiff provides a thin command-line wrapper around the FITSDiff interface–it outputs the report from a FITSDiff of two FITS files, and like common diff-like commands returns a 0 status code if no differences were found, and 1 if differences were found:

With Astropy installed, please run fitscheck --help to see the full program usage documentation.