Scroll to navigation



SubtractSky - subtract the sky value in an image


astsubtractsky [OPTION...] ASTRdata


SubtractSky is part of GNU Astronomy Utilities 0.2.33-8a3b. SubtractSky Finds the sky value over a grid on the input and subtracts it from the image to give a clear and uniform output.

For more information, please run any of the following commands. They will respectively show you the `Invoking SubtractSky' subsection, the complete `SubtractSky' section, or the full GNU Astronomy Utilities manual. In particular the first contains a very complete explanation of each option.

info astsubtractsky
info SubtractSky
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 information, please run:

info help-gnuastro

SubtractSky options:

-h, --hdu=STR
Extension name or number of input data.
-H, --mhdu=STR
Mask image header name.
-k, --kernel=STR
Kernel image file name for convolution.
-M, --mask=STR
Mask image file name.
-U, --khdu=STR
Kernel image header name for convolution.
Store convolved image in `_conv.fits' file.
Store final sky and its STD in `_sky.fits' file.
Include sky standard deviation in all checks too.
-D, --dontdelete
Don't delete output if it exists.
-K, --keepinputdir
Do not remove input's dir info for output.
-o, --output=STR
Output file or directory name.
Mesh grid:
-a, --nch1=INT
Number of channels along first FITS axis.
-b, --nch2=INT
Number of channels along second FITS axis.
Store mesh IDs in `_mesh.fits' file.
-d, --mirrordist=FLT
Distance beyond mirror point. Multiple of std.
Ignore channels in imageconvolution.
Ignore channels in interpolation.
Ignore channels in smoothing.
Only interpolate over the blank pixels.
-L, --lastmeshfrac=INT
Fraction of last mesh area to add new.
Each mesh in one pixel in mesh check images.
-n, --numnearest=INT
Number of nearest neighbors to interpolate.
-Q, --minmodeq=FLT
Minimum acceptable quantile for the mode.
-s, --meshsize=INT
Size of each mesh (tile) in the grid.
-T, --smoothwidth=INT
Width of smoothing kernel (odd number).

-t, --sigcliptolerance=FLT Difference in STD tolerance to halt iteration.

-u, --sigclipmultip=FLT
Multiple of standard deviation in sigma-clipping.
Operating modes:
-?, --help
give this help list
BibTeX citation for SubtractSky.
No log file for programs which make one.
-N, --numthreads=INT
Number of CPU threads to use.
Only read current directory configuration file.
Only run if the program version is this.
-P, --printparams
Print parameter values to be used and abort.
-q, --quiet
Only report errors, remain quiet about steps.
Set default values for this user and abort.
-S, --setdirconf
Set default values for this directory and abort.
give a short usage message
-V, --version
print program version

Mandatory or optional arguments to long options are also mandatory or optional for any corresponding short options.

GNU Astronomy Utilities home page:


Written by Mohammad Akhlaghi


Report bugs to


Copyright © 2015-2016, 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.


The full documentation for SubtractSky is maintained as a Texinfo manual. If the info and SubtractSky programs are properly installed at your site, the command
info SubtractSky

should give you access to the complete manual.

October 2016 GNU Astronomy Utilities 0.2.33-8a3b