<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def crpix(self):
 """ The location of the reference coordinate in the pixel frame. First simple respond with the header values, if they don't exist try usnig the DETSEC values @rtype: float, float """

        try:
            return self.wcs.crpix1, self.wcs.crpix2
        except Exception as ex:
            logging.debug("Couldn't get CRPIX from WCS: {}".format(ex))
            logging.debug("Switching to use DATASEC for CRPIX value computation.")

        try:
            (x1, x2), (y1, y2) = util.get_pixel_bounds_from_datasec_keyword(self['DETSEC'])
            dx = float(self['NAXIS1'])
            dy = float(self['NAXIS2'])
        except KeyError as ke:
            raise KeyError("Header missing keyword: {}, required for CRPIX[12] computation".format(ke.args[0]))

        crpix1 = self._DET_X_CEN - (x1 + x2) / 2. + dx / 2.
        crpix2 = self._DET_Y_CEN - (y1 + y2) / 2. + dy / 2.

        return crpix1, crpix2