FITS(1)
β¨ FITS(1) β the manual page, but make it cute β¨
okay bestie, welcome to FITS(1) from the User Commands section, aka the glow-up era of Fits π
πΈ NAME πΈ
Fits β view and manipulate FITS headers π¦
β SYNOPSIS β
astfits [OPTION...] ASTRdata
π DESCRIPTION π
Fits is part of GNU Astronomy Utilities 0.24. no cap, this is the tool. Fits lets you view and manipulate (add, delete, or modify) FITS extensions (or HDUs) and FITS header keywords within one extension. it's giving β¨cosmic filing cabinetβ¨ and honestly? obsessed.
want more tea? run any of these commands. the second one is the whole lore drop β it has the very comprehensive explanation of Fits's invocation: expected input(s), output(s), and a full description of all the options. π«Ά
all options and their values:
$ astfits -P
inputs/outputs and options:
$ info astfits
full section in the manual/book:
$ info Fits
full Gnuastro manual/book:
$ info gnuastro
if you couldn't find your answer in the manual, you can get direct help from experienced Gnuastro users and developers. for more info, just run:
$ info help-gnuastro
π FITS OPTIONS π
π§ INPUT π§
--arguments=STRβ plain-text file with command-line arguments. like, hand it a whole lil txt of args, iykyk.-h,--hdu=STR/INTβ extension name or number of input data. name it or number it, either way bestie.
π OUTPUT π
-K,--keepinputdirβ keep the input directory for automatic output. don't move it, it lives there π₯Ί--outfitsnocommitβ no Git commit in 0-th HDU of output FITS.--outfitsnoconfigβ no metadata in 0-th HDU of output FITS.--outfitsnodateβ no'DATE'in 0-th HDU of output FITS.--outfitsnoversionsβ no versions in 0-th HDU of output FITS.--outhdu=STRβ HDU/extension in output for--copykeys.-o,--output=STRβ output file name (not for keywords). so if you're doing keyword stuff, this one's not the move.-O,--colinfoinstdoutβ column info/metadata when printing to stdout.--tableformat=STRβ table fmt:'fits-ascii','fits-binary','txt'.-T,--type=STRβ type of output: e.g.,int16,float32, etc...
π₯ HDU (EXTENSION) INFORMATION π₯
--datasumβ calculate HDU's datasum and print in stdout.--datasum-encodedβ 16 character string encoding of'--datasum'.--hasimagehduβ file has at least one image HDU.--hastablehduβ file has at least one table HDU.--listallhdusβ list all HDUs within the file.--listimagehdusβ list all image HDUs within the file.--listtablehdusβ list all table HDUs within the file.-n,--numhdusβ print number of HDUs in the given FITS file.--pixelareaarcsec2β pixel area in arc-seconds squared.--pixelscaleβ return the pixel-scale of the HDU's WCS.--skycoverageβ image coverage in the WCS coordinates.
π¦ HDU (EXTENSION) MANIPULATION π¦
-C,--copy=STR/INTβ copy extension to output file.-k,--cut=STR/INTβ copy extension to output and remove from input. girl is moving out, taking her stuff π--primaryimghduβ copy/cut image HDUs to primary/zero-th HDU.-R,--remove=STR/INTβ remove extension from input file.
π KEYWORDS (IN ONE HDU) π
-a,--asis=STRβ write value as-is (may corrupt FITS file). β οΈ bestie this one is a little unhinged, it can genuinely wreck your FITS file, so know what you're doing.
fr fr,<red>may corrupt FITS file</red>is not a vibe check, it's a warning. proceed with main character caution π
--copykeys=INT:INT/STR,STRβ range/names of keywords to copy in output.-c,--comment=STRβ add COMMENT keyword, any length is ok.-d,--delete=STRβ delete a keyword from the header.-H,--history=STRβ add HISTORY keyword, any length is ok.-l,--keyvalue=STR[,STR,...]β only print the value of requested keyword(s).--printkeynamesβ print all keyword names.-p,--printallkeysβ print all keywords in the selected HDU.-r,--rename=STR,STRβ rename keyword, keeping value and comments. glow-up but keep the personality β¨-s,--datetosec=STRβ FITS date to sec from1970/01/01T00:00:00.-t,--dateβ set the DATE keyword to the current time.-u,--update=STR,STRβ update a keyword value or comments.-v,--verifyβ verify the CHECKSUM and DATASUM keywords.--wcscoordsys=STRβ convert WCS coordinate system.--wcsdistortion=STRβ convert WCS distortion to another type.-w,--write=STRβ write a keyword (with value, comments and units).
π META-IMAGE CREATION π
--edgesampling=INTβ number of extra samplings in pixel sides.--pixelareaonwcsβ image where pixels show their area in sky (WCS).
π OPERATING MODES π
-?,--helpβ give this help list.--checkconfigβ list all config files and variables read.--citeβ BibTeX citation for this program. cite your sources, queen π--config=STRβ read configuration file STR immediately.--config-prefix=STRβ custom prefix of option names config files.--lastconfigβ do not parse any more configuration files.--minmapsize=INTβ min. bytes to avoid RAM automatically.--onlyversion=STRβ only run if the program version is STR.-P,--printparamsβ print parameter values to be used and abort.--quietmmapβ don't print mmap'd file's name and size.-q,--quietβ only report errors, remain quiet about steps.-Q,--quitonerrorβ quit if there is an error on any action.-S,--setdirconfβ set default values for this directory and abort.--usageβ give a short usage message.-U,--setusrconfβ set default values for this user and abort.-V,--versionβ print program version.
mandatory or optional arguments to long options are also mandatory or optional for any corresponding short options. just so we're clear bestie π«Ά
GNU Astronomy Utilities home page: http://www.gnu.org/software/gnuastro/
π REPORTING BUGS π
report bugs to bug-gnuastro@gnu.org. not me being the one to tell you, but they genuinely wanna know π
β COPYRIGHT β
Copyright Β© 2015-2025 Free Software Foundation, Inc. License GPLv3+: GNU General public license version 3 or later.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. (fr fr, no warranty, it said it not me π)
Written/developed by Mohammad Akhlaghi π
π¦ SEE ALSO π¦
the full documentation for Fits is maintained as a Texinfo manual. if the info and Fits programs are properly installed at your site, the command
info Fits
should give you access to the complete manual.
and that's the whole page bestie, slay π β¨
GNU Astronomy Utilities 0.24 Β· November 2025 Β· FITS(1) β you've reached the end of the manual, go touch some grass and then come back and read your headers πΈπ«Ά
π¦ where this page comes from
- epel 10: gnuastro 0.24-1.el10_3 Β· GPL-3.0-or-later AND FSFAP AND GFDL-1.3-or-later
- epel 9: gnuastro 0.24-1.el9 Β· GPL-3.0-or-later AND FSFAP AND GFDL-1.3-or-later
- nixos 26.05: gnuastro 0.24
- nixpkgs unstable: gnuastro 0.24
- ubuntu resolute: gnuastro 0.24-1 Β· GPL-3.0-or-later
- ubuntu stonking: gnuastro 0.24-1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms