Astrophysics Source Code Library

Making codes discoverable since 1999

dfitspy: a dfits|fitsort implementation in python

Discussion topics for individual codes
Ada Coda
ASCL Robot
Posts: 1211
Joined: Thu May 08, 2014 5:37 am

dfitspy: a dfits|fitsort implementation in python

Postby Ada Coda » Fri Mar 15, 2019 2:42 am

dfitspy: a dfits|fitsort implementation in python

Abstract: The FITS format (Flexible Image Transport System) is a widely used format to store astronomical data. It is used to store a lot of different types of data such as 1D or 2D spectra, 3D data cubes. It has been developed in the late 1970 to reach its final form almost two decades ago. FITS files are built with two components. The data themselves are stored as tables and contains any types of data. A header is built containing set of keywords-value pairs aiming at describing the data themselves.

Accessing and displaying metadata inside FITS files is important in order to get an overview of their content properties without having to read the data themselves. It is particularly useful when dealing with large amount of files at once. Tools have been already publicly available for years with the dfits and fitsort algorithms (the documentation is available here ... node8.html). The main limitation is that they are stand-alone programs useable only in a terminal. They can not be used natively inside another program.

The python module presented here, dfitspy, is a project that migrates the main dfits and fitsort capabilities to python. It is a metadata searcher/displayer for FITS files. As dfits and fitsort, dfitspy is able to display in the terminal the result of a metadata search and is able to grep certain values of keywords inside large samples of files. Therefore it can be used directly with the command line interface. Nevertheless, dfitspy can be, and it is its strength, imported as a python module and the user can use these functionnalities inside another python code or the python interpretor.

Credit: Thomas, R

Site: ... index.html
http://Thomas, (2019).Journal of Open Source Software, 4(35), 1249,

Preferred citation method: Thomas, (2019), JOSS, 4(35), 1249

Return to “Astrophysics Source Code Library”

Who is online

Users browsing this forum: No registered users and 5 guests