'Delete BSCALE/BZERO from header if necessary.'

def _update_header_scale_info(self, dtype=None):

    if (self._dtype_for_bitpix() is not None):
        original_was_unsigned = (self._dtype_for_bitpix().kind == 'u')
    else:
        original_was_unsigned = False
    if (self._do_not_scale_image_data or ((self._orig_bzero == 0) and (self._orig_bscale == 1))):
        return
    if (dtype is None):
        dtype = self._dtype_for_bitpix()
    if ((dtype is not None) and (dtype.kind == 'u') and (self._scale_back or (self._scale_back is None))):
        return
    for keyword in ['BSCALE', 'BZERO']:
        try:
            del self._header[keyword]
            self._header.append()
        except KeyError:
            pass
    if (dtype is None):
        dtype = self._dtype_for_bitpix()
    if (dtype is not None):
        self._header['BITPIX'] = DTYPE2BITPIX[dtype.name]
    self._bzero = 0
    self._bscale = 1
    self._bitpix = self._header['BITPIX']
    self._blank = self._header.pop('BLANK', None)
