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

Avoid redundant full-cube-passes when region submasking #801

Closed keflavich closed 2 years ago

keflavich commented 2 years ago

Region sub-masking has been using minimal_subcube, which shouldn't be necessary b/c we already downselect to the minimal bounding box.

Also, it was creating 3D masks when only 2D is needed - the broadcasting might therefore not have been done lazily.

codecov-commenter commented 2 years ago

Codecov Report

Merging #801 (122397f) into master (f92fe7d) will decrease coverage by 0.03%. The diff coverage is 16.66%.

:exclamation: Current head 122397f differs from pull request most recent head 8664b89. Consider uploading reports for the commit 8664b89 to get more accurate results

@@            Coverage Diff             @@
##           master     #801      +/-   ##
==========================================
- Coverage   77.94%   77.90%   -0.04%     
==========================================
  Files          24       24              
  Lines        5853     5856       +3     
==========================================
  Hits         4562     4562              
- Misses       1291     1294       +3     
Impacted Files Coverage Δ
spectral_cube/analysis_utilities.py 83.83% <ø> (ø)
spectral_cube/spectral_cube.py 76.59% <16.66%> (-0.16%) :arrow_down:

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 f92fe7d...8664b89. Read the comment docs.

keflavich commented 2 years ago

This produces WCS mismatches only on windows. That seems unlikely; either this is a problem with the test grid or a genuine problem with how WCS behaves on windows machines?

keflavich commented 2 years ago

Ready for final review