imcopy(1)
π imcopy(1) β the copy-paste but make it FITS π
a User Commands girly, living in section 1 of the manual, serving absolute cromulence
β¨ NAME β¨
imcopy β bestie, it copies FITS images. that's the whole job. and it does it flawlessly.
πΈ SYNOPSIS πΈ
imcopy inputImage outputImage[compress]
like. two files. in goes one, out comes the other. optionally with the little [compress] sprinkle on the end. iykyk π
π¦ DESCRIPTION π¦
okay so here's the tea, pookie. imcopy takes an input image and copies it to an output image, and along the way it can optionally compress or uncompress that image. slay.
if you append the [compress] qualifier onto the end of the output file name, then the input image gets compressed using the tile-compressed format. and what does that mean? it means the image gets chopped up into rectangular tiles, and every single tile of pixels gets compressed and stashed away in a variable-length row of a binary table. it's giving β¨ efficient β¨.
and if you don't put the [compress] qualifier on there, but your input image is already in tile-compressed format? then the output image comes out uncompressed. automatic glow-down, but make it lossless-ish.
if you tack an extension name or number onto the input file name, wrapped up all cozy in square brackets, then only that single extension gets copied to the output file. just the one. no extras. main character only π
otherwise? every single extension in the input file gets processed one at a time, in turn, and copied over to the output file. the whole friend group is coming π«Ά
the full syntax of the compression qualifier is, and i need you to read this slowly because it's the moment:
[compress ALGORITHM TDIM1,TDIM2,...; NOISE_BITS]
where the allowed ALGORITHM values are Rice, GZIP, and PLIO, and TDIMn is the size of the compression tile in each dimension. and NOISE_BITS is 1, 2, 3, or 4, and it controls how much noise suppression happens when you're compressing floating point images. no cap.
π heads up bestie: it may be necessary to enclose the file names in single quote characters on the Unix command line. the shell does NOT play about square brackets. protect your filenames.
π EXAMPLES π
1. π the default diva
imcopy image.fit 'cimage.fit[compress]'
this compresses the input image using the default parameters. and the defaults are: the Rice compression algorithm, and row by row tiles. no thoughts, just vibes, and it ate.
2. π the uncompress arc
imcopy cimage.fit image2.fit
this uncompresses the image created in the first example. and image2.fit should be identical to image.fit if the image has an integer datatype. but β and listen β there will be small differences in the pixel values if it is a floating point image. floating point is a little chaotic like that. it's not a bug it's a personality π
3. π₯ the custom parameter serve
imcopy image.fit 'cimage.fit[compress GZIP 100,100;4]'
this compresses the input image using the following parameters:
GZIPcompression algorithm- 100 X 100 pixel compression tiles
noise_bits = 4(only used with floating point images)
obsessed. genuinely obsessed. β¨
π SEE ALSO π
fitscopy(1)β the other one. go say hi.
and that's the page, bestie!! π this was CFITSIO version 3.370, dated April 2014, and it's still out here compressing tiles like the icon it is. periodt. πβ¨π¦
π¦ where this page comes from
- debian bookworm: libcfitsio-bin 4.2.0-3
- debian trixie: libcfitsio-bin 4.6.2-2 Β· NOSA
- ubuntu jammy: libcfitsio-bin 4.0.0-1
- ubuntu noble: libcfitsio-bin 4.3.1-1.1build2
- ubuntu questing: libcfitsio-bin 4.6.2-2
- ubuntu resolute: libcfitsio-bin 4.6.3-1 Β· NOSA
- ubuntu stonking: libcfitsio-bin 4.7.0-2 Β· NOSA
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms