Birds Astronomy Site: Software: fixfits
This is a simple utility that "fixes" the FIT format files as produced by Registax 3.0 and Astra Image so they actually meet the standard, and can be loaded into other programs.
The FIT format is useful because it stores 16 bit data, but unfortunately Registax does not properly pad the size of the data to a multiple of 2880 bytes when creating data files as required in the FITS standard. Some programs are willing to overlook this error, but Astra Image is not one of them.
Astra Image makes an even worse mistake - it truncates the file size to be a multiple of 2880 bytes instead of padding it.
Download the EXE and store it somewhere that's on your PATH. If you don't know what I mean, then just store it in your Windows system directory (e.g. C:\WINNT or C:\WINDOWS).
Open a command prompt and change to the directory where you have the FITS files as produced by registax.
Type the command:
and all the FITS files in that directory will be fixed.
To see the full list of options available to fixfits, run it with no arguments. By default fixfits will detect and fix files produced by the following programs:
- Registax creates FIT files that are the wrong length. It fails to pad the file size to a multiple of 2880 bytes as required by the standard. Also, the data values are off by 1, leading to possible overflow (while pixels turning to black pixels). Both of these problems are automatically detected and fixed.
- Astra Image creates FIT files that are the wrong length. It truncates the file to a multiple of 2880 bytes, losing the values of some trailing pixels. I fix this by adding 2880 empty pixels at the end of the file so that it is the correct size. I can't put back the lost pixels.