def get_observed_magnitude(self, centroid=True):
        # NOTE: this import is only here so that we don't load up IRAF
        # unnecessarily (ex: for candidates processing).
        """
        Get the magnitude at the current pixel x/y location.

        :return: Table
        """

        max_count = float(self.astrom_header.get("MAXCOUNT", 30000))
        (x, y, hdulist_index) = self.pixel_coord
        tmp_file = self._hdu_on_disk(hdulist_index)
        try:
            from ossos import daophot
            phot = daophot.phot_mag(tmp_file,
                                    x, y,
                                    aperture=self.apcor.aperture,
                                    sky=self.apcor.sky,
                                    swidth=self.apcor.swidth,
                                    apcor=self.apcor.apcor,
                                    zmag=self.zmag,
                                    maxcount=max_count, extno=1,
                                    centroid=centroid)
            if not self.apcor.valid:
                phot['PIER'][0] = 1
            return phot
        except Exception as ex:
            print ex
            raise ex
        finally:
            self.close()