SoFiA
SoFiA copied to clipboard
CASA support
We would like to be able to read in CASA images without requiring users to convert to FITS.
There is a python library "pyrap" which I think should be able to provide this functionality. A tutorial with some examples is here: http://www.astron.nl/~gvd/tutorial3.pdf
pyrap.images can open files in casa, fits, hdf5 and miriad format, so may be capable of solving many file formats in one go! It can make subimages and store in casa, fits or hdf5 format
Thanks, @apopping, for looking into this issue. It looks like pyrap is exactly what we need! I am particularly pleased to see that it can handle HDF5 and Miriad formats as well, so that would solve a few problems at once. It turns out that the ATNF website actually contains a copy of the full pyrap documentation.
Okay, I just found out that pyrap no longer exists; it was apparently replaced by python-casacore. I will have to look at the implications of this change.
Following the discussion at this week’s source finding telecon, it would appear that there are two possible ways forward that we should consider:
- We could use the
image2fitstool included in casacore to offer automatic conversion of CASA, Miriad and HDF5 cubes into FITS format for processing with SoFiA. This would require casacore to be installed, so should be made an optional feature such that SoFiA could still be run without casacore. Source code: https://github.com/casacore/casacore/blob/master/images/apps/image2fits.cc. - Astropy appears to natively support reading and writing of HDF5 files through its
astropy.io.misc.hdf5module. This might be a way forward to offer HDF5 support in SoFiA. Documentation: http://docs.astropy.org/en/stable/io/misc.html.