FITS Renamer

The FITS Renamer is a Java-based tool for automatically renaming astronomical FITS files based on their FITS header metadata. It supports both command-line batch processing and an interactive GUI.

Key Features

  • Automatic renaming based on header keywords such as OBJECT , DATE-OBS , TIME-OBS , EXPTIME , CCD-TEMP , GAIN , OFFSET , BINNING , IMAGETYP , FILTER , and OBJECT .
  • Recursive directory scanning with --recursive .
  • Ability to override any header key via command line or GUI input.
  • Automatic formatting and normalization of exposure, temperature, object names, and filters.
  • Detection of light, dark, flat, and bias frames, as well as processed and stacked images.
  • Hidden directories and files are ignored for safety.
  • Safe and OS-compatible file names (no spaces or illegal characters).

Example File Name

20251102_213045123_M42_L-ENHANCE_EXPTIME300s_-15.5C_GAIN1_OFFSET10_LN_FW_HCG.fits

Command Line Usage

java -jar fits-renamer.jar [options] <directory>

Options:

  • --recursive – scan subdirectories recursively
  • --nogui – run in console mode only
  • --key=value – override a FITS header key, e.g., --FILTER=L-Enhance

GUI Mode

If --nogui is not specified, the tool launches a GUI window allowing:

  • Directory selection
  • Editing of common FITS header values
  • Adding custom override parameters dynamically
  • Executing renaming with a "Rename" button

Safety and Behavior

  • Hidden directories and files are skipped
  • Directory symbolic links are not followed
  • File symbolic links are processed as regular files
  • All generated file names are safe for any operating system