code: def _computeSky(image, skypars, memmap=False):
  
      
      #this object contains the returned values from the image stats routine
      _tmp = imagestats.ImageStats(image.data,
              fields      = skypars['skystat'],
              lower       = skypars['skylower'],
              upper       = skypars['skyupper'],
              nclip       = skypars['skyclip'],
              lsig        = skypars['skylsigma'],
              usig        = skypars['skyusigma'],
              binwidth    = skypars['skywidth']
              )
  
      _skyValue = _extractSkyValue(_tmp,skypars['skystat'].lower())
      log.info("    Computed sky value/pixel for %s: %s "%
               (image.rootname, _skyValue))
  
      del _tmp
  
      return _skyValue
docs: Compute the sky value for the data array passed to the function
      image is a fits object which contains the data and the header
      for one image extension
  
      skypars is passed in as paramDict