I have been using Mathematica 11.3 to analyze experimental data in the form of FITS format images. In 11.3, Import[filename] evauated to an image. In 12.0, it seems to evaluate to an association:
I do not know the reason for changing this, but 11.3 already returned an association for a “multi-HDU file” (whatever that means). I guess it was done for consistency: it is useful to have the same result format regardless of file type.
Thank you. That is a big help. I will update notebooks using this syntax, and they can be used with 11.3 or 12. I looked up the docs on this. The FITS files can contain multiple items called HDUs; not all are images. I agree with your assessment. This is likely for consistency, and is probably justified.
There is a further problem with this. In version 12 importing an “Image” from a FITS file imports an invalid image. To import a valid image, one needs to use
Image/@Import["Fiber005.fits", {"Data", 1}];
Essentially importing the data and making an image out of it.