Skip to content

Commit

Permalink
Merge f1c0d35 into 5d4c3fb
Browse files Browse the repository at this point in the history
  • Loading branch information
SaOgaz committed Jul 25, 2019
2 parents 5d4c3fb + f1c0d35 commit 1fb0065
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
3 changes: 2 additions & 1 deletion docs/spectrum1d.rst
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ common spectral axis.
>>> spec = Spectrum1D(spectral_axis=np.arange(5000, 5010)*u.AA, flux=np.random.sample((5, 10))*u.Jy)
>>> spec_slice = spec[0] #doctest:+SKIP
>>> spec_slice.wavelength #doctest:+SKIP
>>> spec_slice.spectral_axis #doctest:+SKIP
<Quantity [0., 1., 2., 3., 4., 5., 6., 7., 8., 9.] Angstrom>
>>> spec_slice.flux #doctest:+SKIP
<Quantity [0.72722821, 0.32147784, 0.70256482, 0.04445197, 0.03390352,
Expand All @@ -143,6 +143,7 @@ Reference/API

.. automodapi:: specutils
:no-main-docstr:
:inherited-members:
:no-heading:
:headings: -~

Expand Down
6 changes: 3 additions & 3 deletions docs/spectrum_collection.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ solution.
(5,)
>>> spec_coll.flux.unit
Unit("Jy")
>>> spec_coll.wavelength.shape
>>> spec_coll.spectral_axis.shape
(5, 10)
>>> spec_coll.wavelength.unit
>>> spec_coll.spectral_axis.unit
Unit("Angstrom")
Collections from 1D spectra
Expand Down Expand Up @@ -67,7 +67,7 @@ a list of :class:`~specutils.Spectrum1D`:
Unit("Jy")
>>> spec_coll.wavelength.shape
(2, 50)
>>> spec_coll.wavelength.unit
>>> spec_coll.spectral_axis.unit
Unit("Angstrom")
:class:`~specutils.SpectrumCollection` objects can be treated just like
Expand Down
6 changes: 6 additions & 0 deletions specutils/spectra/spectrum_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ def _data_with_spectral_axis_first(self):

@property
def spectral_wcs(self):
"""
Returns the spectral axes of the WCS
"""
return self.wcs.axes.spectral

@lazyproperty
Expand Down Expand Up @@ -132,6 +135,9 @@ def new_flux_unit(self, unit, equivalencies=None, suppress_conversion=False):

@property
def velocity_convention(self):
"""
Returns the velocity convention
"""
return self._velocity_convention

def with_velocity_convention(self, velocity_convention):
Expand Down

0 comments on commit 1fb0065

Please sign in to comment.