TOFITS(1)
β¨ NAME β¨
okay so bestie, meet tofits β the lil tool that turns a list of keyrecords into a valid FITS file π (it's in the User Commands section, so it's a real one, iykyk)
πΈ DESCRIPTION πΈ
So basically tofits takes a whole list of FITS header keyrecords β one per line, no cap β and glows them up into a proper FITS header. How? It pads every single one with blanks until it hits 80 characters and strips the newline characters out. π
Then, if it needs to, it also pads the whole header so it lands on an integral number of 2880-byte blocks. Like, the header is not allowed to be a weird in-between size, periodt.
The input byte stream is assumed to be ASCII-encoded. And here's the tea β: any characters that live outside the set of text characters FITS allows (that's ASCII 0x20 to 0x7E) get ignored π β with literally one single exception. If a byte has the value 0xA0 (which is the non-breaking space in all variants of ISO/IEC 8859), it gets translated into an ordinary space (0x20). So like, a little glow-up for that one byte. β¨
Which means input encoded in ISO/IEC 8859 or UTF-8 should be interpreted correctly! π And any illegal characters sitting in keycomments? Just quietly ignored, no drama, we don't talk about them. π
tofits has no options β zero, none, nothing to configure, she simply is β and it operates as a filter, reading from stdin and writing to stdout, e.g.
tofits < infile > outfile
And one more thing bestie: input lines beginning with '#' are treated as comments. Slay. π
mwah π random date but iconic: this is tofits version 8.9, from June 2026 β go off, king π
π¦ where this page comes from
- ubuntu stonking: wcslib-tools 8.9+ds-2 Β· LGPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms