fpack(1)

πŸ“¦
version 4.7.0 Β· 2 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– fpack(1) β€” the FITS glow-up page πŸ’–

okay bestie, welcome to fpack β€” it's a User Commands legend and it's about to become your new hyperfixation. πŸ¦‹


✨ NAME ✨

fpack β€” the FITS image compression program, no cap. πŸŽ€


🌸 SYNOPSIS 🌸

fpack [OPTION]... FILE...

πŸ’œ DESCRIPTION πŸ’œ

So, fpack is a utility program for optimally compressing images in the FITS data format. Think of it as the GZIP utility's cooler cousin β€” except it's optimized for FITS format images and offers a way wider choice of compression options. It's giving glow-up, it's giving options, it's giving main character energy. πŸ‘‘


✨ OPTIONS ✨

Real talk first, two house rules 🫢:

  • Flags must be separate and they have to appear before filenames. Also, use - to read from stdin.
  • The compression parameters you specify on the fpack command line may be overridden by compression directive keywords in the header of each HDU of the input file(s). So the file itself can lowkey talk back. πŸ’…

Now the menu, mwah:

  • -r β€” Rice compression (this is the default, the moment, the standard). πŸ“
  • -h β€” Hcompress compression.
  • -g or -g1 β€” GZIP_1 (per-tile) compression.
  • -g2 β€” GZIP_2 (per-tile) compression, and yes it comes with byte shuffling. ✨
  • -p β€” PLIO compression (only for positive 8 or 16-bit integer images, so don't get cute with it).
  • -d β€” Tile the image without compression (debugging mode, literally just vibes).
  • -w β€” Compress the whole image as a single large tile. One tile, one queen. πŸ‘‘
  • -t axes β€” Comma separated list of tile dimensions (default is row by row).
  • -q level β€” Quantized level spacing when converting floating point images to scaled integers. Here's the tea β˜•: +value is relative to sigma of background noise, and -value is absolute. The default q value of 4 gives a compression ratio of about 6 with very high fidelity (only 0.26% increase in noise). Using q values of 2, or 1 will give compression ratios of about 8, or 10, respectively (with 1.0% or 4.1% noise increase). The scaled quantized values are randomly dithered using a seed value determined from the system clock at run time. Use -q0 instead of -q to suppress random dithering. Use -qz instead of -q to not dither zero-valued pixels. Use -qt or -qzt to compute random dithering seed from first tile checksum. Use -qN or -qzN, (N in range 1 to 10000) to use a specific dithering seed. And here's the plot twist 😭 β€” floating-point images can be losslessly compressed by selecting the GZIP algorithm and specifying -q 0, but this is slower and often produces much less compression than the default quantization method.
  • -i2f β€” Convert integer images to floating point, then quantize and compress using the specified q level. When used appropriately, this lossy compression method can give much better compression than the normal lossless compression methods without significant loss of information. The -n3ratio and -n3min flags control the minimum noise thresholds; images below these thresholds will be losslessly compressed.
  • -n3ratio β€” Minimum ratio of background noise sigma divided by q. Default = 2.0.
  • -n3min β€” Minimum background noise sigma. Default = 6. The -i2f flag will be ignored if the noise level in the image does not exceed both thresholds. Both, bestie. It's strict. πŸ™ˆ
  • -s scale β€” Scale factor for lossy Hcompress (default = 0 = lossless). +value is relative to RMS noise; -value is absolute.
  • -n noise β€” Rescale scaled-integer images to reduce noise and improve compression.
  • -v β€” Verbose mode; it lists each file as it is processed. Not me watching every file get its moment. 🌈
  • -T β€” Show compression algorithm comparison test statistics; files unchanged. (Your files are safe, she's just observing. πŸ’€)
  • -R file β€” Write the comparison test report (the one from above) to a text file.
  • -table β€” Compress FITS binary tables using prototype method, as well as compress any image HDUs. Heads up: this option is intended for experimental use. πŸ§ͺ
  • -tableonly β€” Compress only FITS binary tables using prototype method; do not compress any image HDUs. Also intended for experimental use. πŸ§ͺ
  • -F β€” Overwrite input file by output file with same name. Dramatic, but okay. πŸ’…
  • -D β€” Delete input file after writing output. Gone. Poof. πŸ¦‹
  • -Y β€” Suppress prompts to confirm -F or -D options.
  • -S β€” Output compressed FITS files to STDOUT.
  • -L β€” List contents; files unchanged.
  • -C β€” Don't update FITS checksum keywords.
  • -H β€” Show this message. (Hi, that's this. πŸ‘‹)
  • -V β€” Show version number.
⚠️ gentle reminder: -table and -tableonly are experimental, and -F / -D do destructive-ish things to your actual files. Know before you go, bestie. 🫢

🌟 SEE ALSO 🌟

funpack(1), fitscopy(1) β€” go read the whole friend group. πŸ’–


and that's the page!! ✨ This one's rocking CFITSIO version 3.370, dated April 2014 β€” vintage but iconic, fr fr. slay, bye bestie! πŸ’…πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from