def replicate(self, value=None, unit=None, observer=None, target=None, radial_velocity=None, redshift=None, doppler_convention=None, doppler_rest=None, copy=False):
    '\n        Return a replica of the `SpectralCoord`, optionally changing the\n        values or attributes.\n\n        Note that no conversion is carried out by this method - this keeps\n        all the values and attributes the same, except for the ones explicitly\n        passed to this method which are changed.\n\n        If ``copy`` is set to `True` then a full copy of the internal arrays\n        will be made.  By default the replica will use a reference to the\n        original arrays when possible to save memory.\n\n        Parameters\n        ----------\n        value : ndarray or `~astropy.units.Quantity` or `SpectralCoord`, optional\n            Spectral values, which should be either wavelength, frequency,\n            energy, wavenumber, or velocity values.\n        unit : str or `~astropy.units.Unit`\n            Unit for the given spectral values.\n        observer : `~astropy.coordinates.BaseCoordinateFrame` or `~astropy.coordinates.SkyCoord`, optional\n            The coordinate (position and velocity) of observer.\n        target : `~astropy.coordinates.BaseCoordinateFrame` or `~astropy.coordinates.SkyCoord`, optional\n            The coordinate (position and velocity) of target.\n        radial_velocity : `~astropy.units.Quantity`, optional\n            The radial velocity of the target with respect to the observer.\n        redshift : float, optional\n            The relativistic redshift of the target with respect to the observer.\n        doppler_rest : `~astropy.units.Quantity`, optional\n            The rest value to use when expressing the spectral value as a velocity.\n        doppler_convention : str, optional\n            The Doppler convention to use when expressing the spectral value as a velocity.\n        copy : bool, optional\n            If `True`, and ``value`` is not specified, the values are copied to\n            the new `SkyCoord` - otherwise a reference to the same values is used.\n\n        Returns\n        -------\n        sc : `SpectralCoord` object\n            Replica of this object\n        '
    if isinstance(value, u.Quantity):
        if (unit is not None):
            raise ValueError('Cannot specify value as a Quantity and also specify unit')
        else:
            (value, unit) = (value.value, value.unit)
    value = (value if (value is not None) else self.value)
    unit = (unit or self.unit)
    observer = (self._validate_coordinate(observer) or self.observer)
    target = (self._validate_coordinate(target) or self.target)
    doppler_convention = (doppler_convention or self.doppler_convention)
    doppler_rest = (doppler_rest or self.doppler_rest)
    if copy:
        value = value.copy()
    if (((self.observer is None) or (self.target is None)) and (radial_velocity is None) and (redshift is None)):
        radial_velocity = self.radial_velocity
    with warnings.catch_warnings():
        warnings.simplefilter('ignore', NoVelocityWarning)
        return self.__class__(value=value, unit=unit, observer=observer, target=target, radial_velocity=radial_velocity, redshift=redshift, doppler_convention=doppler_convention, doppler_rest=doppler_rest, copy=False)
Return a replica of the `SpectralCoord`, optionally changing the
values or attributes.

Note that no conversion is carried out by this method - this keeps
all the values and attributes the same, except for the ones explicitly
passed to this method which are changed.

If ``copy`` is set to `True` then a full copy of the internal arrays
will be made.  By default the replica will use a reference to the
original arrays when possible to save memory.

Parameters
----------
value : ndarray or `~astropy.units.Quantity` or `SpectralCoord`, optional
    Spectral values, which should be either wavelength, frequency,
    energy, wavenumber, or velocity values.
unit : str or `~astropy.units.Unit`
    Unit for the given spectral values.
observer : `~astropy.coordinates.BaseCoordinateFrame` or `~astropy.coordinates.SkyCoord`, optional
    The coordinate (position and velocity) of observer.
target : `~astropy.coordinates.BaseCoordinateFrame` or `~astropy.coordinates.SkyCoord`, optional
    The coordinate (position and velocity) of target.
radial_velocity : `~astropy.units.Quantity`, optional
    The radial velocity of the target with respect to the observer.
redshift : float, optional
    The relativistic redshift of the target with respect to the observer.
doppler_rest : `~astropy.units.Quantity`, optional
    The rest value to use when expressing the spectral value as a velocity.
doppler_convention : str, optional
    The Doppler convention to use when expressing the spectral value as a velocity.
copy : bool, optional
    If `True`, and ``value`` is not specified, the values are copied to
    the new `SkyCoord` - otherwise a reference to the same values is used.

Returns
-------
sc : `SpectralCoord` object
    Replica of this object
def replicate(self, value=None, unit=None, observer=None, target=None, radial_velocity=None, redshift=None, doppler_convention=None, doppler_rest=None, copy=False):
    '\n        Return a replica of the `SpectralCoord`, optionally changing the\n        values or attributes.\n\n        Note that no conversion is carried out by this method - this keeps\n        all the values and attributes the same, except for the ones explicitly\n        passed to this method which are changed.\n\n        If ``copy`` is set to `True` then a full copy of the internal arrays\n        will be made.  By default the replica will use a reference to the\n        original arrays when possible to save memory.\n\n        Parameters\n        ----------\n        value : ndarray or `~astropy.units.Quantity` or `SpectralCoord`, optional\n            Spectral values, which should be either wavelength, frequency,\n            energy, wavenumber, or velocity values.\n        unit : str or `~astropy.units.Unit`\n            Unit for the given spectral values.\n        observer : `~astropy.coordinates.BaseCoordinateFrame` or `~astropy.coordinates.SkyCoord`, optional\n            The coordinate (position and velocity) of observer.\n        target : `~astropy.coordinates.BaseCoordinateFrame` or `~astropy.coordinates.SkyCoord`, optional\n            The coordinate (position and velocity) of target.\n        radial_velocity : `~astropy.units.Quantity`, optional\n            The radial velocity of the target with respect to the observer.\n        redshift : float, optional\n            The relativistic redshift of the target with respect to the observer.\n        doppler_rest : `~astropy.units.Quantity`, optional\n            The rest value to use when expressing the spectral value as a velocity.\n        doppler_convention : str, optional\n            The Doppler convention to use when expressing the spectral value as a velocity.\n        copy : bool, optional\n            If `True`, and ``value`` is not specified, the values are copied to\n            the new `SkyCoord` - otherwise a reference to the same values is used.\n\n        Returns\n        -------\n        sc : `SpectralCoord` object\n            Replica of this object\n        '
    if isinstance(value, u.Quantity):
        if (unit is not None):
            raise ValueError('Cannot specify value as a Quantity and also specify unit')
        else:
            (value, unit) = (value.value, value.unit)
    value = (value if (value is not None) else self.value)
    unit = (unit or self.unit)
    observer = (self._validate_coordinate(observer) or self.observer)
    target = (self._validate_coordinate(target) or self.target)
    doppler_convention = (doppler_convention or self.doppler_convention)
    doppler_rest = (doppler_rest or self.doppler_rest)
    if copy:
        value = value.copy()
    if (((self.observer is None) or (self.target is None)) and (radial_velocity is None) and (redshift is None)):
        radial_velocity = self.radial_velocity
    with warnings.catch_warnings():
        warnings.simplefilter('ignore', NoVelocityWarning)
        return self.__class__(value=value, unit=unit, observer=observer, target=target, radial_velocity=radial_velocity, redshift=redshift, doppler_convention=doppler_convention, doppler_rest=doppler_rest, copy=False)