INFO
Python utility for FITS file handling.
This tool needs Python 3.
Other requirements:
- NumPy - pip install numpy
- AstroPy - pip install astropy [--no-deps]
Usage: python FitsPy.py {list|move|header|coordinates|filter|summary|decompress} [file]
File name can have wildcards. Default is *.fit*.
Options:
- list - list some interesting FITS header info
- move - move files to XRESxYRES directory, directory is created automatically
- header - print all FITS header values
- coordinates - recursively find coordinates from FITS file names, result can be copied to Astro Mosaic target box
- filter - print FILTER header value
- summary - generate summary information from FITS files like telescopes, filters and exposure times
- decompress - decompress FITS images so they can be loaded into PixInsight. Decompressed files will have dc_ prefix.
- radecfix - Fix ra/dec coordinates in files. Can fix problems like 33 54 60.00 -> 33 55 00.00. Fixed files will have rdf_ prefix. Coordinates are assumed to be with names OBJCTRA and OBJCTDEC. Works only with coordinate format shown in the example.
Move option
If you are mixing images with different resolution and are using a tool like Pixinsight Blink then move option can be useful. Blink process does not seem to like images with different resolutions.
Command ‘python FitsPy.py move’ finds X and Y resolution of .fit image from FITS keywords, automatically creates a XRESxYRES directory for each found resolution and moves .fit files to directory matching that resolution. After that it is easy to find images by resolution and run Blink on those.
Coordinates option
If you have a set of coordinate missions for example for mosaic but do not know what area they actually cover then coordinates option can be useful. Command ‘python FitsPy.py coordinates’ recursively goes through subdirectories and finds all .fit files where coordinate information is encoded into the file name in format HHMMDD{p|n}HHMMDD.
Found coordinates are printed as a comma separated list. That list can be copied into Astro Mosaic tool target box to see what panels are available.
If you are mixing different telescopes then some panels are not correct since telescope information is not available at this format.