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

use 'auto' instead of 1 for spectral rechunk #730

Closed keflavich closed 3 years ago

keflavich commented 3 years ago

Minor correction to partly address #729

keflavich commented 3 years ago

this apparently breaks!

keflavich commented 3 years ago

This shows that apparently spectral_interpolate is changing the cube size in the spatial dimensions. ?!?!? image

codecov-commenter commented 3 years ago

Codecov Report

Merging #730 (7a48701) into master (c86c522) will increase coverage by 0.01%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #730      +/-   ##
==========================================
+ Coverage   77.81%   77.82%   +0.01%     
==========================================
  Files          24       24              
  Lines        5634     5637       +3     
==========================================
+ Hits         4384     4387       +3     
  Misses       1250     1250              
Impacted Files Coverage Δ
spectral_cube/dask_spectral_cube.py 85.19% <100.00%> (+0.07%) :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 c86c522...7a48701. Read the comment docs.

keflavich commented 3 years ago

I switched from np.interp to scipy.interpolate.interp1d because the latter allows for straightforward broadcasting, while the former does not - in our non-dask version, we have a loop over valid spectral pixels. This seems to work.