RedshiftMixin#
- class specutils.spectra.spectrum_mixin.RedshiftMixin[source]#
Bases:
objectMixin to define properties and methods related to redshift and radial velocity that are common to
SpectrumandSpectrumCollection.Attributes Summary
The radial velocity(s) of the objects represented by this spectrum.
The redshift(s) of the objects represented by this spectrum.
Returns the SpectralCoord object.
Methods Summary
set_radial_velocity_to(radial_velocity)This sets the radial velocity of the spectrum to be
radial_velocitywithout changing the values of thespectral_axis.set_redshift_to(redshift)This sets the redshift of the spectrum to be
redshiftwithout changing the values of thespectral_axis.shift_spectrum_to(*[, redshift, radial_velocity])This shifts in-place the values of the
spectral_axis, given either a redshift or radial velocity.Attributes Documentation
- radial_velocity#
The radial velocity(s) of the objects represented by this spectrum. May be scalar (if this spectrum’s
fluxis 1D) or vector. Note that the concept of “RV of a spectrum” can be ambiguous, so the interpretation is set to some extent by either the user, or operations (like template fitting) that set this attribute when they are run on a spectrum.
- redshift#
The redshift(s) of the objects represented by this spectrum. May be scalar (if this spectrum’s
fluxis 1D) or vector. Note that the concept of “redshift of a spectrum” can be ambiguous, so the interpretation is set to some extent by either the user, or operations (like template fitting) that set this attribute when they are run on a spectrum.
- spectral_axis#
Returns the SpectralCoord object.
Methods Documentation
- set_radial_velocity_to(radial_velocity)[source]#
This sets the radial velocity of the spectrum to be
radial_velocitywithout changing the values of thespectral_axis.If you want to shift the
spectral_axisbased on this value, useshift_spectrum_to.
- set_redshift_to(redshift)[source]#
This sets the redshift of the spectrum to be
redshiftwithout changing the values of thespectral_axis.If you want to shift the
spectral_axisbased on this value, useshift_spectrum_to.
- shift_spectrum_to(*, redshift=None, radial_velocity=None)[source]#
This shifts in-place the values of the
spectral_axis, given either a redshift or radial velocity.If you do not want to change the
spectral_axis, useset_redshift_toorset_radial_velocity_to.