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
95 stars 61 forks source link

Stokes Cube with beams in multiple axis can't be read in. Prevents the loading any cleaned CASA IQUV image. #825

Closed preshanth closed 2 years ago

preshanth commented 2 years ago

cube = SpectralCube.read(filenameL, format='casa', use_dask=True) or cube = StokesSpectralCube.read(filenameL, format='casa', use_dask=True)

results in the same error. File ~/miniconda3/envs/py38/lib/python3.8/site-packages/spectral_cube/io/casa_image.py:109, in load_casa_image(filename, skipdata, memmap, skipvalid, skipcs, target_cls, use_dask, targetchunksize, **kwargs) 107 bdict = beam['beams'] 108 if beam['nStokes'] > 1: --> 109 raise NotImplementedError() 110 nbeams = len(bdict) 111 assert nbeams == beam['nChannels']

NotImplementedError:

preshanth commented 2 years ago

Yeah that fix works for a fits cube where all the beams are identical across all the stokes. Closing this ticket as resolved for fits and opening a follow up for CASA images. Thanks @e-koch