code: def clean(self):
          
          clean_files = ['blotImage','crmaskImage','finalMask',
                          'staticMask','singleDrizMask','outSky',
                          'outSContext','outSWeight','outSingle',
                          'outMedian','dqmask','tmpmask',
                          'skyMatchMask']
  
          log.info('Removing intermediate files for %s' % self._filename)
          # We need to remove the combined products first; namely, median image
          util.removeFileSafely(self.outputNames['outMedian'])
          # Now remove chip-specific intermediate files, if any were created.
          for chip in self.returnAllChips(extname='SCI'):
              for fname in clean_files:
                  if fname in chip.outputNames:
                      util.removeFileSafely(chip.outputNames[fname])
docs: Deletes intermediate products generated for this imageObject.