'Determine the dtype that the data should be converted to depending on
the BITPIX value in the header, and possibly on the BSCALE value as
well.  Returns None if there should not be any change.'

def _dtype_for_bitpix(self):

    bitpix = self._orig_bitpix
    if (self._uint and (self._orig_bscale == 1)):
        for (bits, dtype) in ((16, np.dtype('uint16')), (32, np.dtype('uint32')), (64, np.dtype('uint64'))):
            if ((bitpix == bits) and (self._orig_bzero == (1 << (bits - 1)))):
                return dtype
    if (bitpix > 16):
        return np.dtype('float64')
    elif (bitpix > 0):
        return np.dtype('float32')
