# Backup Strategy

Munipack modifies the backup strategy of FITS files. Both the Unix philosophy, as well as common FITS conventions, are modified.

## The declaration

- All observed data are highly valuable original. They are untouchable.
- Any file, created by a processing, can be overwritten without caution.

## Practical implications:

- All actions which can potentially modify original image data (currently only `phcorr`) refuses actions on its by default. The rule can be supressed by `--enable-overwrite` switch for `phcorr`, yet strongly discouraged!
- All processing should be done under a dedicated working directory. The file handling is proposed by the way (see `-t destination_dir` on the current `"-t ."` directory):

      $ ls /obs/archive/*.fits
      $ mkdir work/
      $ cd work/
      work$ munipack phcorr [...] -t . /obs/archive/*.fits

- By default, the label `_proc` is included in filenames when the output directory, by `-t` switch, is not specified. This is common for `phcorr, astrometry, find, aphot, gphot`.
- The outputs of `phcal` are expected to be included in the working directory so the label `_cal` is added to original filenames by default.
- All newly created files by `bias, dark, flat, cone, kombine, colouring, votable, cross, artifical` are silently overwritten for convenience. Perhaps, some processing time can only be lost.

The backup strategy has been changed between versions 0.5.10 and 0.5.11 (January 2018), revised in 0.5.13 (November 2020) and 0.6.2 (January 2025).