fitsort(1)

✨ fitsort β€” the manual, but make it cute ✨

okay so bestie, welcome to fitsort(1), a General Commands Manual moment. this is the page where we sort FITS header info from a whole list of files, and honestly? it's giving backstage-pass-to-your-data energy. πŸ’…


🌸 NAME 🌸

fitsort β€” sort FITS header information from a list of files


πŸŽ€ SYNOPSIS πŸŽ€

dfits <FITS files...> | fitsort <FITS keywords...>

like, that's the whole vibe. you pipe dfits into fitsort and it just works. 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

fitsort extracts keyword values from a set of FITS headers and outputs them in an ASCII table format, which is compatible with most data processing software packages. and listen β€” it's only meant to be used in combination with the dfits utility. no solo runs, bestie, they're a duo. πŸ”₯

The ASCII output shows up in columns. the columns are aligned with blank characters and also separated by tabulations. the blank alignment is so us humans can gaze upon it and go "ooh pretty ✨", and the tabulations are there for spreadsheet compatibility. so if you want to load fitsort output into any spreadsheet, you tell it that fields shall be separated by tabulations and entries separated by linefeeds. easy. πŸ“Š

Examples :

dfits *.fits | fitsort BITPIX NAXIS NAXIS1 NAXIS2

The output would look like:

FILE           BITPIX   NAXIS    NAXIS1   NAXIS2
file0001.fits  16       2        128      128
file0002.fits  32       2        512      512
...

look at those tidy little columns. not a single crumb out of place. πŸ‘‘

ESO specific features in the FITS header are also supported. to get values for 'HIERARCH ESO' keywords, just give the complete names inside double quotes. e.g.

dfits *.fits | fitsort "HIERARCH ESO INS LENS"

Another way of giving HIERARCH ESO keywords is to use the short FITS notation β€” the above example can be written as:

dfits *.fits | fitsort INS.LENS

Example: to retrieve the DPR keywords from an ESO FITS header, you would use:

dfits *.fits | fitsort To be completed...  DPR.CATG DPR.TYPE DPR.TECH

This second way of requesting HIERARCH ESO keywords is not only shorter to type, it also avoids typing quotes or double-quotes on the command-line, making it easier to script with fitsort. like, fewer characters AND fewer finger gymnastics? we love efficiency. πŸ’–

Notice that the keywords you give on the command-line are case-insensitive. the above line is equivalent to:

dfits *.fits | fitsort dpr.catg dpr.type dpr.tech

same thing, lowercase era, no cap. 🌈


πŸ’œ OPTIONS πŸ’œ

  • -d β€” do not print out the first output line. this option is useful to get only the query results, without the top line (the one giving all the column names). this makes it easy to script fitsort from programs like awk or perl. 🧚

πŸ“ FILES πŸ“

Input files to dfits shall all comply with FITS format. fitsort also supports HIERARCH ESO FITS format.


πŸ‘‘ SEE ALSO πŸ‘‘

  • dfits (1)

ok so real talk: everything above is the actual documentation, i just gave it main character energy. don't come for me, come for the FITS headers. πŸ’€

and that's the page!! this little beauty comes from the General Commands Manual, it's fitsort(1), and it was dated 25 Jun 2001 β€” vintage but iconic, we stan a classic. mwah πŸ’…βœ¨πŸ’–