<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def pixscale(self):
 """Return the pixel scale of the detector, in arcseconds. This routine first attempts to compute the size of a pixel using the WCS. Then looks for PIXSCAL in header. @return: pixscal @rtype: float """

        try:
            (x, y) = self['NAXIS1'] / 2.0, self['NAXIS2'] / 2.0
            p1 = SkyCoord(*self.wcs.xy2sky(x, y) * units.degree)
            p2 = SkyCoord(*self.wcs.xy2sky(x + 1, y + 1) * units.degree)
            return round(p1.separation(p2).to(units.arcsecond).value / math.sqrt(2), 3)
        except Exception as ex:
            logging.debug("Failed to compute PIXSCALE using WCS: {}".format(ex))

        return float(self['PIXSCAL'])