Skip to content

Commit

Permalink
Added stokes_data public method
Browse files Browse the repository at this point in the history
It was previously not possible to cleanly access the underlying data of
a `StokesSpectralCube`, which only had the `_stokes_data` method. This
commit implements a simple `StokesSpectralCube.stokes_data` method for
public access.
  • Loading branch information
Kitchi committed Oct 5, 2021
1 parent 320d9c4 commit feecc04
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion spectral_cube/stokes_spectral_cube.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from . import wcs_utils
from .masks import BooleanArrayMask, is_broadcastable_and_smaller

__all__ = ['StokesSpectalCube']
__all__ = ['StokesSpectralCube']

VALID_STOKES = ['I', 'Q', 'U', 'V', 'RR', 'LL', 'RL', 'LR', 'XX', 'XY', 'YX', 'YY',
'RX', 'RY', 'LX', 'LY', 'XR,', 'XL', 'YR', 'YL', 'PP', 'PQ', 'QP', 'QQ',
Expand Down Expand Up @@ -65,6 +65,13 @@ def __init__(self, stokes_data, mask=None, meta=None, fill_value=None):
def shape(self):
return self._shape

@property
def stokes_data(self):
"""
The underlying data
"""
return self._stokes_data

@property
def mask(self):
"""
Expand Down

0 comments on commit feecc04

Please sign in to comment.