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

Add ".read" for 2D images #732

Open keflavich opened 3 years ago

keflavich commented 3 years ago

We should have a unified-io based reader for 2D and 1D images.

All CASA-produced images are spectral cubes, and a common (and good!) pattern is to do something like:

cube = SpectralCube.read('twodimage.fits')
image = cube[0]

but we should shorten this to encourage users to use this approach:

image = RadioImage.read('twodimage.fits')