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
98 stars 65 forks source link

Occasional weird zarr error #900

Open keflavich opened 9 months ago

keflavich commented 9 months ago

This is an error somewhere related to #868. I don't expect to fix it here but I'm reporting it to take a note somewhere

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/orange/adamginsburg/ACES/reduction_ACES/aces/imaging/mosaic_12m.py", line 492, in make_giant_mosaic_cube_cs21
    make_giant_mosaic_cube(filelist,
  File "/orange/adamginsburg/ACES/reduction_ACES/aces/imaging/make_mosaic.py", line 688, in make_giant_mosaic_cube
    make_giant_mosaic_cube_channels(header, cubes, weightcubes,
  File "/orange/adamginsburg/ACES/reduction_ACES/aces/imaging/make_mosaic.py", line 544, in make_giant_mosaic_cube_channels
    mosaic_cubes(cubes,
  File "/blue/adamginsburg/adamginsburg/repos/spectral-cube/spectral_cube/cube_utils.py", line 1276, in mosaic_cubes
    output_array_, output_footprint_ = reproject_and_coadd(
  File "/blue/adamginsburg/adamginsburg/repos/reproject/reproject/mosaicking/coadd.py", line 275, in reproject_and_coadd
    weights, _ = reproject_function(
  File "/blue/adamginsburg/adamginsburg/repos/reproject/reproject/interpolation/high_level.py", line 133, in reproject_interp
    return _reproject_dispatcher(
  File "/blue/adamginsburg/adamginsburg/repos/reproject/reproject/common.py", line 139, in _reproject_dispatcher
    _, array_in = _dask_to_numpy_memmap(array_in, local_tmp_dir)
  File "/blue/adamginsburg/adamginsburg/repos/reproject/reproject/utils.py", line 41, in _dask_to_numpy_memmap
    dask_array.to_zarr(zarr_tmp)
  File "/blue/adamginsburg/adamginsburg/miniconda3/envs/python39/lib/python3.9/site-packages/dask/array/core.py", line 2948, in to_zarr
    return to_zarr(self, *args, **kwargs)
  File "/blue/adamginsburg/adamginsburg/miniconda3/envs/python39/lib/python3.9/site-packages/dask/array/core.py", line 3707, in to_zarr
    raise ValueError(
ValueError: Attempt to save array to zarr with irregular chunking, please call `arr.rechunk(...)` first.