code: def set_units(self,chip):
          
          # Determine output value of BUNITS
          # and make sure it is not specified as 'ergs/cm...'
          sci_chip = self._image[self.scienceExt,chip]
  
          _bunit = None
          if 'BUNIT' in sci_chip.header and sci_chip.header['BUNIT'].find('ergs') < 0:
              _bunit = sci_chip.header['BUNIT']
          else:
              _bunit = 'ELECTRONS/S'
          sci_chip._bunit = _bunit
          #
          if '/s' in _bunit.lower():
              _in_units = 'cps'
          else:
              _in_units = 'counts'
          sci_chip.in_units = _in_units
docs: Define units for this image.