|
|
|
|
SynopsisSet low (or high) intensity or exposure regions of an image to a constant value. Syntaxdmimgthresh infile outfile [expfile] [cut] [value] [verbose] [clobber] DescriptionFor observations with strongly variable exposure across an image, you can get spurious results (e.g. with smoothing or source detection algorithms) where the exposure is very low. It can therefore be useful to change parts of the image where the exposure is less than a given value (or percentage of its maximum value). Equivalently, the same task may be carried out for maximum values. The threshold may be expressed as a percentage of maximum or as an absolute value. The threshold value is compared to the values in the input exposure map (expfile parameter) and any pixel whose exposure value is less than threshold is set to a fixed value (often zero). If an exposure image is not supplied, the input image itself will be used, allowing you to threshold an image to alter all pixels above or below a certain value. Note that the user-supplied cut value will be truncated to a integer if the image data is of integer type. Example 1dmimgthresh sky.img new.img expfile=exp.img cut="1.5%" Zero-out all pixels whose exposure is less than 1.5 percent of the maximum exposure in exp.img. Note that the default replacement value is 0 (value parameter). Example 2dmimgthresh sky.img new.img expfile=exp.img cut=400.0 value=0.018 Threshold the image, setting all pixels whose exposure is less than 400 to a value of 0.018. Example 3dmimgthresh sky.img new.img expfile="" cut="20:80" value=0 Set all pixels whose value is less than 20 or greater than 80 to zero. Since an exposure image is not provided, the values in sky.img are used for the thresholding. Example 4dmimgthresh sky.img new.img expfile="" cut=":80%" value=0 Threshold the image, setting all pixels with values greater than 80% of the peak (of sky.img) to zero. Parameters
Detailed Parameter DescriptionsParameter=infile (file required filetype=input)The input image. Parameter=outfile (file required filetype=output)The output thresholded image. Parameter=expfile (file filetype=input)
The exposure image (e.g. an exposure map) used to determine which pixels are to be changed in the input image. If an exposure image is provided, it must be the same size as the data image. Parameter=cut (string)
The threshold value; it may be expressed as a percentage of maximum, e.g., cut="50%", as an actual value, e.g. cut=100.0, as a min:max value, e.g., "20:80" (set min at 20 counts, max at 80 counts), or as a min:max percentage, e.g., "20:80%" (set min at 20%, max at 80%). Both values do not need to be specified: cut="20:" is the same as cut="20": the minimum is set at 20 counts; cut=":70%" sets the upper limit to 70%. Parameter=verbose (integer default=0 min=0 max=5)
Specifies the level of verbosity in displaying diagnostic messages. CHANGES IN CIAO 4.0 Beta 2Specifiying an open-ended rangedmimgthresh now handles open-ended threshold ranges correctly, e.g. cut=<value>: or cut=:<value>. BugsSee the bugs page for this tool on the CIAO website for an up-to-date listing of known bugs. |
![]() |
The Chandra X-Ray
Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory. 60 Garden Street, Cambridge, MA 02138 USA. Email: cxcweb@head.cfa.harvard.edu Smithsonian Institution, Copyright © 1998-2004. All rights reserved. |