Simple FITS Header Fixing Tool

Status: Completed 2022-10-17

Overview

It seems like everyone has a simple tool for adjusting FITS header keywords. This is a fairly simple-minded one written out of frustration with the limitations of the modhead routine distributed with the CFITSIO package. It utilizes the ccdproc.ImageFileCollection functionality (based on the astropy.io.fits module) to change a FITS keyword in a list of input files, using python’s smarter-than-C string functionality.

Usage

The script usage can be displayed by calling the script with the -h option:

$ fix_ldt_header -h
usage: fix_ldt_header [-h] file [file ...] keyword new_value

Fix a keyword in LDT FITS headers

positional arguments:
  file        File(s) on which to operate
  keyword     FITS keyword to change
  new_value   New header keyword value to insert

options:
  -h, --help  show this help message and exit