radio-astro-tools / spectral-cube

Library for reading and analyzing astrophysical spectral data cubes
http://spectral-cube.rtfd.org
BSD 3-Clause "New" or "Revised" License
97 stars 65 forks source link

Added stokes_data public method #751

Closed Kitchi closed 2 years ago

Kitchi commented 3 years ago

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.

This implements the first suggestion in #750

codecov-commenter commented 2 years ago

Codecov Report

Merging #751 (daababa) into master (320d9c4) will increase coverage by 0.01%. The diff coverage is 53.84%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #751      +/-   ##
==========================================
+ Coverage   77.55%   77.57%   +0.01%     
==========================================
  Files          24       24              
  Lines        5775     5783       +8     
==========================================
+ Hits         4479     4486       +7     
- Misses       1296     1297       +1     
Impacted Files Coverage Δ
spectral_cube/stokes_spectral_cube.py 86.20% <53.84%> (-5.80%) :arrow_down:
spectral_cube/dask_spectral_cube.py 85.07% <0.00%> (-0.11%) :arrow_down:
spectral_cube/spectral_cube.py 76.77% <0.00%> (+0.33%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 320d9c4...daababa. Read the comment docs.

keflavich commented 2 years ago

I'm fine with this; will merge soon if there are no objections

e-koch commented 2 years ago

@Kitchi or @preshanth -- The tests are now fixed from #759. Can you rebase this branch?

preshanth commented 2 years ago

I just did @e-koch . Hope that is enough

e-koch commented 2 years ago

Windows test failure is unrelated and known from #759