>  Docs Center  >  Libraries  >  ASTROLIB  >  XMEDSKY






      Subtract sky from an image as a 1-D function of X


      This procedure is designed to remove the sky from slitless spectra.
      The sky is assumed to vary with wavelength (along a row) but not with
      position (along a column). The sky is computed as the
      column-by-column median of pixels within 3 sigma of the image global
      median. This procedure is called by the cosmic ray rejection routine

Calling Sequence

      XMEDSKY, Image, Bkg, [ CLIP=[x0, x1, y0, y1], NSIG= ]


      Image: Input image for which sky vector is to be computed.

Input Keyword Parameters

      CLIP: [x0, x1, y0, y1]: region of image to be used for all
              statistical computations. Default is to use the entire
              image. For STIS 1024 x 512 slitless spectra, the suggested
              value is CLIP = [32,1023,12,499]
      NSIG: Positive scalar giving the number of sigma a pixel must be above
              the global median to be reject. Default is 3 sigma.

Output Parameter

      Bkg: Vector of sky values.

Modification History

      Written by: R. S. Hill, Hughes STX, 20 Oct. 1997
      Converted to V5.0, use STDDEV() W. Landsman June 1998
      Check for valid WHERE, added NSIG keyword W. Landsman December 2000
      Assume since V5.1 so always use STDDEV W. Landsman Feb 2004
      Assume since V5.6 use DIMEN keyword to MEDIAN W. Landsman Jan 2008

© 2022 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us