def __repr__(self):
    prefixstr = (('<' + self.__class__.__name__) + ' ')
    try:
        radial_velocity = self.radial_velocity
        redshift = self.redshift
    except ValueError:
        radial_velocity = redshift = 'Undefined'
    repr_items = [f'{prefixstr}']
    if (self.observer is not None):
        observer_repr = indent(repr(self.observer), (14 * ' ')).lstrip()
        repr_items.append(f'    observer: {observer_repr}')
    if (self.target is not None):
        target_repr = indent(repr(self.target), (12 * ' ')).lstrip()
        repr_items.append(f'    target: {target_repr}')
    if (((self._observer is not None) and (self._target is not None)) or (self._radial_velocity is not None)):
        if ((self.observer is not None) and (self.target is not None)):
            repr_items.append('    observer to target (computed from above):')
        else:
            repr_items.append('    observer to target:')
        repr_items.append(f'      radial_velocity={radial_velocity}')
        repr_items.append(f'      redshift={redshift}')
    if ((self.doppler_rest is not None) or (self.doppler_convention is not None)):
        repr_items.append(f'    doppler_rest={self.doppler_rest}')
        repr_items.append(f'    doppler_convention={self.doppler_convention}')
    arrstr = np.array2string(self.view(np.ndarray), separator=', ', prefix='  ')
    if (len(repr_items) == 1):
        repr_items[0] += f'{arrstr}{self._unitstr:s}'
    else:
        repr_items[1] = ('   (' + repr_items[1].lstrip())
        repr_items[(- 1)] += ')'
        repr_items.append(f'  {arrstr}{self._unitstr:s}')
    return ('\n'.join(repr_items) + '>')
def __repr__(self):
    prefixstr = (('<' + self.__class__.__name__) + ' ')
    try:
        radial_velocity = self.radial_velocity
        redshift = self.redshift
    except ValueError:
        radial_velocity = redshift = 'Undefined'
    repr_items = [f'{prefixstr}']
    if (self.observer is not None):
        observer_repr = indent(repr(self.observer), (14 * ' ')).lstrip()
        repr_items.append(f'    observer: {observer_repr}')
    if (self.target is not None):
        target_repr = indent(repr(self.target), (12 * ' ')).lstrip()
        repr_items.append(f'    target: {target_repr}')
    if (((self._observer is not None) and (self._target is not None)) or (self._radial_velocity is not None)):
        if ((self.observer is not None) and (self.target is not None)):
            repr_items.append('    observer to target (computed from above):')
        else:
            repr_items.append('    observer to target:')
        repr_items.append(f'      radial_velocity={radial_velocity}')
        repr_items.append(f'      redshift={redshift}')
    if ((self.doppler_rest is not None) or (self.doppler_convention is not None)):
        repr_items.append(f'    doppler_rest={self.doppler_rest}')
        repr_items.append(f'    doppler_convention={self.doppler_convention}')
    arrstr = np.array2string(self.view(np.ndarray), separator=', ', prefix='  ')
    if (len(repr_items) == 1):
        repr_items[0] += f'{arrstr}{self._unitstr:s}'
    else:
        repr_items[1] = ('   (' + repr_items[1].lstrip())
        repr_items[(- 1)] += ')'
        repr_items.append(f'  {arrstr}{self._unitstr:s}')
    return ('\n'.join(repr_items) + '>')