Validate that the attributes are self-consistent.

        This function does some basic checks of the object attributes to
        ensure that astrometric calculations can legally be performed. If the
        *complain* keyword is true, messages may be printed to
        :data:`sys.stderr` if non-fatal issues are encountered.

        Returns *self*.

def verify (self, complain=True):
        """Validate that the attributes are self-consistent.

        This function does some basic checks of the object attributes to
        ensure that astrometric calculations can legally be performed. If the
        *complain* keyword is true, messages may be printed to
        :data:`sys.stderr` if non-fatal issues are encountered.

        Returns *self*.

        """
        import sys

        if self.ra is None:
            raise ValueError ('AstrometryInfo missing "ra"')
        if self.dec is None:
            raise ValueError ('AstrometryInfo missing "dec"')

        if self._partial_info (self.promo_ra, self.promo_dec):
            raise ValueError ('partial proper-motion info in AstrometryInfo')

        if self._partial_info (self.pos_u_maj, self.pos_u_min, self.pos_u_pa):
            raise ValueError ('partial positional uncertainty info in AstrometryInfo')

        if self._partial_info (self.promo_u_maj, self.promo_u_min, self.promo_u_pa):
            raise ValueError ('partial proper-motion uncertainty info in AstrometryInfo')

        if self.pos_u_maj is None:
            if complain:
                print_ ('AstrometryInfo: no positional uncertainty info', file=sys.stderr)
        elif self.pos_u_maj < self.pos_u_min:
            # Based on experience with PM, this may be possible
            if complain:
                print_ ('AstrometryInfo: swapped positional uncertainty '
                        'major/minor axes', file=sys.stderr)
            self.pos_u_maj, self.pos_u_min = self.pos_u_min, self.pos_u_maj
            self.pos_u_pa += 0.5 * np.pi

        if self.pos_epoch is None:
            if complain:
                print_('AstrometryInfo: assuming epoch of position is J2000.0', file=sys.stderr)

        if self.promo_ra is None:
            if complain:
                print_ ('AstrometryInfo: assuming zero proper motion', file=sys.stderr)
        elif self.promo_u_maj is None:
            if complain:
                print_ ('AstrometryInfo: no uncertainty on proper motion', file=sys.stderr)
        elif self.promo_u_maj < self.promo_u_min:
            # I've seen this: V* V374 Peg
            if complain:
                print_ ('AstrometryInfo: swapped proper motion uncertainty '
                        'major/minor axes', file=sys.stderr)
            self.promo_u_maj, self.promo_u_min = self.promo_u_min, self.promo_u_maj
            self.promo_u_pa += 0.5 * np.pi

        if self.parallax is None:
            if complain:
                print_ ('AstrometryInfo: assuming zero parallax', file=sys.stderr)
        else:
            if self.parallax < 0.:
                raise ValueError ('negative parallax in AstrometryInfo')
            if self.u_parallax is None:
                if complain:
                    print_ ('AstrometryInfo: no uncertainty on parallax', file=sys.stderr)

        if self.vradial is None:
            pass # not worth complaining
        elif self.u_vradial is None:
            if complain:
                print_ ('AstrometryInfo: no uncertainty on v_radial', file=sys.stderr)

        return self