Right now one has to specify format='casa_image' for any .image files that have non-.image suffixes, including: .pbcor, .psf, .weight, .pb, .model, .image.tt*, etc.
We should have these auto-recognized. Not doing so makes it impossible to use SpectralCube.read as a default reader in other functions without passing on kwargs, which can result in really ugly code.
Case in point - I wanted to write feather_simple_cube to replace the file_in method with SpectralCube.read, but can't b/c pbcor images break this:
def feather_simple_cube(hires, lores, **kwargs):
if not hasattr(hires, shape):
hires = SpectralCube.read(hires)
if not hasattr(hires, shape):
lores = file_in(lores)
Right now one has to specify
format='casa_image'
for any.image
files that have non-.image
suffixes, including:.pbcor
,.psf
,.weight
,.pb
,.model
,.image.tt*
, etc.We should have these auto-recognized. Not doing so makes it impossible to use
SpectralCube.read
as a default reader in other functions without passing on kwargs, which can result in really ugly code.Case in point - I wanted to write
feather_simple_cube
to replace thefile_in
method withSpectralCube.read
, but can't b/cpbcor
images break this: