IMGFILT -- Applies filters to image data
   IMGFILT sdataset(s) ddataset <keywords> "comment
Paramters:
   sdataset | source ADDE dataset name and position; specify as
              alias.position or group/descriptor.position; to use default
              position, either enter "0" or omit .position portion;
              specify 2 sdatasets when using FILTER=CLOUD, CORE or DIS
              (no def for alias or group/descriptor, def=0 for position)
   ddataset | destination ADDE dataset name and absolute position;
              specify as alias.position or group/descriptor.position;
              only positive integers are valid for the position number
  "comment | description placed in the image file directory's memo field;
             32 characters maximum (def=no comment)
Keywords:
**********************  Image Positioning Keywords  **********************
   LATlon=lat lon | latitude and longitude of sdataset image to place at
                    ddataset image location specified in PLACE keyword
   LINele=line ele sys | line and element numbers and coordinate system
                         (F or I for file and image, respectively) of the
                         sdataset image to place at the ddataset image
                         location specified in the PLACE keyword
                         (line def=0, ele def=line, sys def=F)
   PLAce= | location in the ddataset image to place the point specified
            in LATLON, STATION or LINELE keyword; valid options for PLACE
            keyword are ULEFT and CENTER for upper-left corner and center
            of the ddataset image, respectively (def=ULEFT when LINELE
            is used, def=CENTER when LATLON or STATION is used)
   STAtion= | station ID, e.g., MSN, YSSY, 72201 to place at the ddataset
              image location specified in PLACE keyword
****************************  Output Keywords  ***************************
  BANd=b1 b2 | source image band number(s); specify b2 only if using
               FILTER=CLOUD, CORE or DIS (b1 def=existing band if image is
               single-band; no b1 def if image is multi-band; b2 def=b1)
  MAG=lmag emag | line and element magnification of the data
                  (lmag def=1, emag def=lmag)
  PROd= | product name for destination image, up to 4 chars (def=PRD)
  SCAle=prodlo prodhi britlo brithi | minimum and maximum product and
        brightness values for the calibration (def=MIN MAX 0 255)
  SIZe=line ele | number of lines and elements of the sdataset image to
                  copy (def=480 640)
      =ALL      | copies the entire sdataset image including all bands
                  and the documentation section
  TAIl=lo hi | tail percentage after filtering (def=0 0)
  UNIt= | calibration units for output (def=BRIT)
*********************  Filter and Stretch Keywords  **********************
  Note: There are 12 options listed below for the FILTER keyword.  Each
        option has an equation, where ddataset indicates the ouptut pixel
        value.  The input pixel value is indicated with s1 (and s2 for
        CLOUD, CORE and DIS since they use 2 source images).  See the
        User's Guide for more information.
  FILter=CLEAN replace bline eline pdiff ldiff | clean filter
            eq: ddataset element = s1, if diff between s1 and surrounding
                                       elements is < pdiff; else (replace)
                ddataset line = s1, if (diff between s1 line average and
                                    surrounding lines < ldiff) and
                                    (deviation of element values on s1
                                    line < 0); else (replace)
            where: replace | 'AVE' average of surrounding values (def)
                             'MIN' dataset minimum value
                             'MAX' dataset maximum value
                   bline | beginning image line (def=first image line)
                   eline | ending image line (def=last image line)
                   pdiff | absolute difference used for shot noise
                           selection (def=15)
                   ldiff | % diff used for bad line selection (def=15%)
        =CLOUD replace constant | cloud filter
            eq: ddataset = s1, if   (s1 > s2 + constant)
                               else (replace)
            where: replace | replacement value (def=MIN)
                   constant | additive constant (def=0)
        =CORE brkpnt1 brkpnt2 replace1 replace2 | core filter
            eq: ddataset = replace1, if   (s1 > brkpnt1)
                                     and  (s2 > brkpnt2)
                                     else (replace2)
            where: brkpnt1 | sdataset1 breakpoint value (def=MIN)
                   brkpnt2 | sdataset2 breakpoint value (def=MAX)
                   replace1 | success condition replacement value (def=MAX)
                   replace2 | failure condition replacement value (def=MIN)
        =DIS brkpnt1 brkpnt2 brkpnt3 brkpnt4 replace | discriminate filter
            eq: ddataset = s1, if   (brkpnt1 < s1 < brkpnt2)
                               and  (brkpnt3 < s2 < brkpnt4)
                               else (replace)
            where: brkpnt1 | low end breakpoint value for s1 (def=MIN)
                   brkpnt2 | high end breakpoint value for s1 (def=MAX)
                   brkpnt3 | low end breakpoint value for s2 (def=MIN)
                   brkpnt4 | high end breakpoint value for s2 (def=MAX)
                   replace | failure condition replacement value (def=MIN)
        =GRAD | gradient filter
            eq: ddataset = ABSOLUTE( s1 - (s1+1) )
        =HIGH1 distance efficiency | 1-dimensional high pass filter
            eq: ddataset = (s1 - (sample average) + (s1 midpoint))
                           eliminates low frequency deviations by
                           clustering them around the distribution's
                           midpoint
            where: distance | filter distance (def=50)
                   efficiency | filter efficiency (def=100)
        =HIGH2 | 2-dimensional high pass filter
            eq: ddataset = (s1 - (sample average) + (s1 midpoint))
                           eliminates low frequency deviations by
                           clustering them around the distribution's
                           midpoint
        =HOLE brkpnt1 brkpnt2 | hole (missing data) filter
            eq: ddataset = average, if (brkpnt1< s1 <brkpnt2)
                                    else (s1)
            where: brkpnt1 | low end breakpoint value (def=MIN)
                   brkpnt2 | high end breakpoint value (def=MAX)
        =LOW1 distance efficiency | 1-dimensional low pass filter
            eq: ddataset = (sample average)
                           eliminates high frequency deviations by
                           replacing the s1 data values with the average
                           of the values within the sample distance
            where: distance | filter distance in pixels (def=50)
                   efficiency | filter efficiency (def=100)
        =LOW2 lcoef ecoef | 2-dimensional low pass filter
            eq: ddataset = (sample average)
                           eliminates high frequency deviations by
                           replacing the s1 data values with the average
                           of the values within the sample radius
            where: lcoef | line coefficient; 0.0<lcoef<1.0 (def=0.5)
                   ecoef | element coefficient; 0.0<ecoef<1.0 (def=lcoef)
        =REPLACE outval bline eline belem eelem inval1..invalN | replace
                                                                 filter
            eq: ddataset = s1, if data value lies outside the region
                               defined by the line and element range or
                               its value is not in inval1..invalN;
                               else (replace with 'outval')
            where: outval | replacement value (def=0)
                   bline | beginning image line (def=first line)
                   eline | ending image line (def=last line)
                   belem | beginning image element (def=first element)
                   eelem | ending image element (def=last element)
                   inval1..invalN | sdataset values to replace with outval;
                           use list format, e.g., val1 val2 val3 etc and/or
                           range format, e.g., bval-eval (def=0-255)

        =SHOT bline eline pdiff | shot noise filter
            eq: ddataset = s1, if individual s1 values < pdiff
                               else (average of values surrounding s1)
            where: bline | beginning image line (def=first image line)
                   eline | ending image line (def=last image line)
                   pdiff | absolute difference between the value of s1
                           and the pixels on either side (def=15)
  STRetch=CONT     | contrast stretch (def)
         =HIST bin | histogram stretch where 'bin' is the binning
                     increment (bin def=16)
Remarks:
  IMGFILT generates a new image by applying a filter to data from a
  source image or images.  The CLOUD, CORE and DIS filters use two
  source images; all other filters use only one.  See the User's Guide
  for more information about all the filters and the output image.

  Use the IMGOPER command to perform arithmetic operations on individual
  image elements.
----------
