A parser with an interactive menu that can extract details from a FITS (Flexible Image Transport System) file, and lets the user:
- query keywords to get their values, and
- update values of keywords in file.
This project uses CMake, so if you don't have it, you'll need to get it from here before proceeding.
You can also install it through Cygwin (Windows), MacPorts (MacOS), Homebrew (MacOS/Linux) or MSYS2 (Windows).
Once CMake is installed:
- Open a terminal.
cd
to the directory where you want to download the repogit clone https://github.com/rishi255/fits_parser.git
- Once done, follow these steps to build:
cd fits_parser
cmake --build . --config Release
- To run the project:
cd build
./FITS_Parser.exe
(for Windows) or./FITS_Parser
(for Unix)
- Important: The FITS files that you want to parse have to be stored in the /fits_files subdirectory of the root. This is the directory the program searches for the FITS files in.
Can parse all HDUs (primary HDU and standard eXTENSIONs - IMAGE, BINTABLE and TABLE)
- DISPLAY - displays all keywords (HDU wise) with associated values and / comments present in the file.
- DISPLAY [HDU NUMBER] - displays all records from specified HDU number (0 for primary HDU, 1 for first extension and so on)
- UPDATE [HDU NUMBER] [KEYWORD] [VALUE] - update existing value of provided keyword with provided value.
- if [VALUE] is of invalid format/size, handles it accordingly.
(eg. if value is a character string, checks for single quotes at front and back, adds closing quote if not present.)
- if [VALUE] is of invalid format/size, handles it accordingly.
- [KEYWORD] - displays value of provided keyword (HDU wise, shows all results if keyword present in more than one HDU)
- COMMENT - displays all comments (HDU wise) in the order they are found in the file.
- END - end program.
- Unable to handle long-string keywords (CONTINUE).
Currently unable to handle HISTORY keywords, and can perform no actions on them.Unable to handle extensions, can only extract primary header.