| 
 
      Set low (or high) intensity or exposure regions of an image to a
      constant value.
    
dmimgthresh infile outfile [expfile] [cut] [value] [verbose] [clobber] 
      
         For 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.
       
dmimgthresh 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).
             
dmimgthresh 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.
             
dmimgthresh 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.
             
dmimgthresh 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.
             
		The output thresholded image.
          
          
            
		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.
             
          
            
               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%.
             
          
            
               Thresholded pixels will be set to this value.
             
          
            
               Specifies the level of verbosity in displaying diagnostic messages.
             
          
            
               Specifies if an existing output file should be overwritten.
             
      
        `dmimghist' now supports null value checking.  Pixels with the
	value NULL are no longer included in the calculations.
       
      
	Thresholds can now be applied as both lower and upper-limits
	using the syntax cut="<min>:<max>".
       
	A value of INDEF creates NaN in the output listing for floating point calculations.
       |