Open keflavich opened 1 year ago
Now branched off of #854
This is largely reimplementing reproject/mosaicking/coadd.py
, which is not good.
Some of the functionality I want here needs to be pushed into coadd
. Will split this into another PR.
Dang, I thought I was getting somewhere.
Traceback (most recent call last):
File "<ipython-input-1-349e0fbab013>", line 1, in <module>
from aces.imaging.mosaic_12m import cs21_cube_mosaicing_minimal_test; cs21_cube_mosaicing_minimal_test()
File "/orange/adamginsburg/ACES/reduction_ACES/aces/imaging/mosaic_12m.py", line 288, in cs21_cube_mosaicing_minimal_test
result,_ = mosaic_cubes(cubes,
File "/blue/adamginsburg/adamginsburg/repos/spectral-cube/spectral_cube/cube_utils.py", line 914, in mosaic_cubes
output_array, output_footprint = reproject_and_coadd(
File "/blue/adamginsburg/adamginsburg/repos/reproject/reproject/mosaicking/coadd.py", line 223, in reproject_and_coadd
array, footprint = reproject_function(
File "/blue/adamginsburg/adamginsburg/repos/astropy/astropy/utils/decorators.py", line 604, in wrapper
return function(*args, **kwargs)
File "/blue/adamginsburg/adamginsburg/repos/reproject/reproject/interpolation/high_level.py", line 121, in reproject_interp
return _reproject_blocked(
File "/blue/adamginsburg/adamginsburg/repos/reproject/reproject/utils.py", line 297, in _reproject_blocked
output_array_dask = da.empty(shape_out, chunks=block_size or "auto")
File "/blue/adamginsburg/adamginsburg/repos/dask/dask/array/wrap.py", line 60, in wrap_func_shape_as_first_arg
parsed = _parse_wrap_args(func, args, kwargs, shape)
File "/blue/adamginsburg/adamginsburg/repos/dask/dask/array/wrap.py", line 30, in _parse_wrap_args
chunks = normalize_chunks(chunks, shape, dtype=dtype)
File "/blue/adamginsburg/adamginsburg/repos/dask/dask/array/core.py", line 3106, in normalize_chunks
raise ValueError(
ValueError: Chunks do not add up to shape. Got chunks=((4,), (5, 80, 101), (5, 100, 101)), shape=(4, 161, 152)
It works with a simple test - but not with blocks yet
I've been using this in production for a while. @e-koch, want to give it a once-over? Looks like I have some failing tests to fix, but I'm not sure if they're also failing on master
Patch has no changes to coverable lines.
:exclamation: Current head e8083b7 differs from pull request most recent head 0cfcd02. Consider uploading reports for the commit 0cfcd02 to get more accurate results
Files Changed | Coverage |
---|---|
spectral_cube/cube_utils.py | 0.00% |
:loudspeaker: Thoughts on this report? Let us know!.
the cube utils mosaic header maker wasn't checking the spectral dimension before