Scroll to navigation

SEGMENT(1) User Commands SEGMENT(1)


Segment - segmentation based on signal structure


astsegment [OPTION...] ASTRdata


Segment is part of GNU Astronomy Utilities 0.8. Segment will segment an initially labeled region based on structure with the signal. It will first find true clumps (local maxima), estimate which ones have strong connections, and then grow them to cover the full area of each detection.

For more information, please run any of the following commands. In particular the second contains a very comprehensive explanation of Segment's invocation: expected input(s), output(s), and a full description of all the options.

All options and their values:
$ astsegment -P
Inputs/Outputs and options:
$ info astsegment
Full section in manual/book:
$ info Segment
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 information, please run:

$ info help-gnuastro

Segment options:

HDU/extension of convolved image in file.
Convolved image file to avoid convolution.
-d, --detection=STR
Filename of detection image (to segment).
HDU containing detection image.
-h, --hdu=STR/INT
Extension name or number of input data.
-k, --kernel=STR
Filename of kernel to convolve with input.
HDU containing kernel image.
Filename of Sky values image to subtract.
HDU containing Sky value to subtract.
Filename of Sky standard deviation.
HDU containing Sky standard deviation.
STD input is actually variance.
Tessellation (tile grid):
Tile IDs in an image, the size of input.
-F, --remainderfrac=FLT
Fraction of remainder to split last tile.
No. of neighbors to use for interpolation.
Only interpolate over the blank tiles.
-L, --largetilesize=INT[,INT]
Sim. to --tilesize, but for larger tiles.

-M, --numchannels=INT[,..] No. of channels in dim.s (FITS order).

Display 1 element/tile, not full input res.
Work (not tile) over channel edges.
-Z, --tilesize=INT[,INT]
Regular tile size on dim.s (FITS order).
-D, --dontdelete
Don't delete output if it exists.
-K, --keepinputdir
Keep input directory for automatic output.
Finish after finding true clumps.
-o, --output=STR
Output file name.
Output only object and clump labels.
`txt', `fits-ascii', `fits-binary'.
-B, --minskyfrac=FLT
Min. fraction of undetected area in tile.
Store segmentation steps in a file.
Save clump S/N values into a file.
-c, --snquant=FLT
S/N Quantile of true sky clumps.
Save grown clumps instead of original.
-G, --gthresh=FLT
Multiple of STD to stop growing clumps.
Built internal clumps from minima.
-m, --snminarea=INT
Minimum area of clumps for S/N estimation.
Minimum number for S/N estimation.
-O, --objbordersn=FLT
Min. S/N for grown clumps as one object.
-s, --clumpsnthresh=FLT
S/N threshold of true clumps.
-v, --keepmaxnearriver
Keep clumps with peak touching a river.
-y, --minriverlength=INT
Minimum len of useful grown clump rivers.
Operating modes:
-?, --help
give this help list
BibTeX citation for this program.
Read configuration file STR immediately.
-C, --continueaftercheck
Continue processing after checks.
Do not parse any more configuration files.
Minimum bytes in array to not use ram RAM.
-N, --numthreads=INT
Number of CPU threads to use.
Only run if the program version is STR.
-P, --printparams
Print parameter values to be used and abort.
-q, --quiet
Only report errors, remain quiet about steps.
-S, --setdirconf
Set default values for this directory and abort.
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.

GNU Astronomy Utilities home page:


Report bugs to


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

Written/developed by Mohammad Akhlaghi


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

should give you access to the complete manual.

December 2018 GNU Astronomy Utilities 0.8